Class ImpFormat


  • public final class ImpFormat
    extends Object
    Import Format a Row
    Version:
    $Id$
    Author:
    Jorg Janke, Trifon Trifonov, Catura AG (www.catura.de)
  • FR [ 3010957 ] Custom Separator Character, https://sourceforge.net/p/adempiere/feature-requests/975/
  • , eugen.hanussek@klst.com
  • BF [ 3564464 ] Import File Loader discards input records , https://sourceforge.net/p/adempiere/bugs/2727/
    • Constructor Detail

      • ImpFormat

        public ImpFormat​(String name,
                         int AD_Table_ID,
                         String formatType)
        Format
        Parameters:
        name - name
        AD_Table_ID - table
        formatType - format type
    • Method Detail

      • setName

        public void setName​(String newName)
        Set Name
        Parameters:
        newName - new name
      • getName

        public String getName()
        Get Name
        Returns:
        name
      • setSeparatorChar

        public void setSeparatorChar​(String newChar)
      • getSeparatorChar

        public String getSeparatorChar()
      • setTable

        public void setTable​(int AD_Table_ID)
        Import Table
        Parameters:
        AD_Table_ID - table
      • getAD_Table_ID

        public int getAD_Table_ID()
        Get Import Table Name
        Returns:
        AD_Table_ID
      • setFormatType

        public void setFormatType​(String newFormatType)
        Set Format Type
        Parameters:
        newFormatType - - F/C/T/X
      • getFormatType

        public String getFormatType()
        Set Format Type
        Returns:
        format type - F/C/T/X
      • setBPartner

        public void setBPartner​(String newBPartner)
        Deprecated.
        Set Business Partner
        Parameters:
        newBPartner - (value)
      • getBPartner

        public String getBPartner()
        Deprecated.
        Get Business Partner
        Returns:
        BPartner (value)
      • addRow

        public void addRow​(ImpFormatRow row)
        Add Format Row
        Parameters:
        row - row
      • getRow

        public ImpFormatRow getRow​(int index)
        Get Row
        Parameters:
        index - index
        Returns:
        Import Format Row
      • getRowCount

        public int getRowCount()
        Get Row Count
        Returns:
        row count
      • load

        public static ImpFormat load​(int Id)
        Factory load
        Parameters:
        Id - id
        Returns:
        Import Format
      • parseLine

        public String[] parseLine​(String line,
                                  boolean withLabel,
                                  boolean trace,
                                  boolean ignoreEmpty)
        Parse Line returns ArrayList of values
        Parameters:
        line - line
        withLabel - true if with label
        trace - create trace info
        ignoreEmpty - - ignore empty fields
        Returns:
        Array of values
      • updateDB

        public boolean updateDB​(Properties ctx,
                                String line,
                                String trxName)
        Insert/Update Database.
        Parameters:
        ctx - context
        line - line
        trxName - transaction
        Returns:
        true if inserted/updated