org.compiere.model
Class NaturalAccountMap
java.lang.Object
java.util.AbstractMap<K,V>
java.util.concurrent.ConcurrentHashMap<K,V>
org.compiere.util.CCache<String,MElementValue>
org.compiere.model.NaturalAccountMap
- Type Parameters:
K - keyV - value
- All Implemented Interfaces:
- Serializable, ConcurrentMap<String,MElementValue>, Map<String,MElementValue>, CacheInterface
public final class NaturalAccountMap
- extends CCache<String,MElementValue>
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
- Version:
- $Id: NaturalAccountMap.java,v 1.3 2006/07/30 00:51:02 jjanke Exp $
- Author:
- Jorg Janke
- See Also:
- Serialized Form
| Nested classes/interfaces inherited from interface java.util.Map |
Map.Entry<K,V> |
| Methods inherited from class org.compiere.util.CCache |
addVetoableChangeListener, clear, containsKey, containsValue, entrySet, get, get, getExpireMinutes, getName, isEmpty, isReset, keySet, put, putAll, removeVetoableChangeListener, reset, setExpireMinutes, setUsed, size, sizeNoExpire, toString, values |
NaturalAccountMap
public NaturalAccountMap(Ctx 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
Compiere® is a registered trademark of ComPiere, Inc. ©2004-2008 HumanFlash.com All rights reserved.