org.compiere.model
Class NaturalAccountMap<K,V>
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<K,V>
org.compiere.util.CCache<K,V>
org.compiere.model.NaturalAccountMap<K,V>
- Type Parameters:
K - keyV - value
- All Implemented Interfaces:
- Serializable, Cloneable, Map<K,V>, CacheInterface
public final class NaturalAccountMap<K,V>
- extends CCache<K,V>
Natural Account (HashMap) Management.
The key is a String of the column name (e.g. SUSPENSEBALANCING_ACCT)
The value is an NaturalAccount
a) Account information are loaded via the parse functions
b) Accounts are created via the createAccounts function
c) retrieve the C_ElementValue_ID for the given key
Change log:
- 2007-02-12 - teo_sarca - [ 1658127 ] Select charset encoding on import
- 2007-01-27 - teo_sarca - [ 1619158 ] Import is not working with UTF-8
- Version:
- $Id: NaturalAccountMap.java,v 1.3 2006/07/30 00:51:02 jjanke Exp $
- Author:
- Jorg Janke
- See Also:
- Serialized Form
| Methods inherited from class org.compiere.util.CCache |
addVetoableChangeListener, clear, containsKey, containsValue, entrySet, get, getExpireMinutes, getName, isEmpty, isReset, keySet, put, putAll, removeVetoableChangeListener, reset, setExpireMinutes, setUsed, size, sizeNoExpire, toString, values |
NaturalAccountMap
public NaturalAccountMap(Properties ctx,
String trxName)
- Constructor.
Parse File does the processing
- Parameters:
ctx - contexttrxName - transaction
parseFile
public String parseFile(File file)
- Read and Parse File
- Parameters:
file - Accounts file
- Returns:
- error message or "" if OK
parseLine
public String parseLine(String line)
throws Exception
- Create Account Entry for Default Accounts only.
- Parameters:
line - line with info
Line format (9 fields)
1 A [Account Value]
2 B [Account Name]
3 C [Description]
4 D [Account Type]
5 E [Account Sign]
6 F [Document Controlled]
7 G [Summary Account]
8 H [Default_Account]
9 I [Parent Value] - ignored
- Returns:
- error message or "" if OK
- Throws:
Exception
saveAccounts
public boolean saveAccounts(int AD_Client_ID,
int AD_Org_ID,
int C_Element_ID)
- Save all Accounts
- Parameters:
AD_Client_ID - clientAD_Org_ID - orgC_Element_ID - element
- Returns:
- true if created
getC_ElementValue_ID
public int getC_ElementValue_ID(String key)
- Get ElementValue
- Parameters:
key - key
- Returns:
- 0 if error
Adempiere® is a registered trademark of ADempiere Business Inc. ©2004-2008 HumanFlash.com All rights reserved.