Class ImpFormat

java.lang.Object
org.compiere.impexp.ImpFormat

public final class ImpFormat extends Object
Import implementation using MImpFormat and MImpFormatRow.
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 Details

      • ImpFormat

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

      • 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)
        Set separator character for column
        Parameters:
        newChar -
      • getSeparatorChar

        public String getSeparatorChar()
        Returns:
        separator character for column
      • setTable

        public void setTable(int AD_Table_ID)
        Set 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 Format Row
        Parameters:
        index - index
        Returns:
        Import Format Row or null (if index is not valid)
      • getRowCount

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

        public static ImpFormat load(int Id)
        Load import format
        Parameters:
        Id - id
        Returns:
        Import Format
      • parseLine

        public String[] parseLine(String line, boolean withLabel, boolean trace, boolean ignoreEmpty)
        Parse line and returns list 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