Class NaturalAccountMap<K,V>

java.lang.Object
org.compiere.util.CCache<K,V>
org.compiere.model.NaturalAccountMap<K,V>
Type Parameters:
K - key
V - value
All Implemented Interfaces:
Serializable, Map<K,V>, CacheInterface

public final class NaturalAccountMap<K,V> extends CCache<K,V>
Natural Account (HashMap) Management. <String,MElementValue>
  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:
  • Constructor Details

    • NaturalAccountMap

      public NaturalAccountMap(Properties ctx, String trxName)
      Constructor. Parse File does the processing.
      Parameters:
      ctx - context
      trxName - transaction
  • Method Details

    • 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, int lineNo) 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
      lineNo -
      Returns:
      error message or "" if OK
      Throws:
      Exception
    • saveAccounts

      public boolean saveAccounts(int AD_Client_ID, int AD_Org_ID, int C_Element_ID, boolean isActive)
      Save all Accounts
      Parameters:
      AD_Client_ID - client
      AD_Org_ID - org
      C_Element_ID - element
      isActive -
      Returns:
      true if success
    • getC_ElementValue_ID

      public int getC_ElementValue_ID(String key)
      Get C_ElementValue_ID
      Parameters:
      key - search key
      Returns:
      C_ElementValue_ID or 0 if not found