Class ImpFormatRow

java.lang.Object
org.compiere.impexp.ImpFormatRow

public final class ImpFormatRow extends Object
Import Format Row with parsing capability
Version:
$Id: ImpFormatRow.java,v 1.2 2006/07/30 00:51:05 jjanke Exp $ globalqss: integrate Teo Sarca bug fix [ 1623817 ] Minor bug on importing calendar date
Author:
Jorg Janke, Trifon Trifonov, Catura AG (www.catura.de)
  • FR [ 3010957 ] Custom Separator Character, https://sourceforge.net/p/adempiere/feature-requests/975/
    • Constructor Details

      • ImpFormatRow

        public ImpFormatRow(int seqNo, String columnName, int startNo, int endNo, String dataType, int maxLength, String name)
        Constructor for fixed format
        Parameters:
        seqNo - sequence
        columnName - db column name
        startNo - start no
        endNo - and no
        dataType - data type - see constants DATATYPE_
        maxLength - if String it is the maximum length (truncated)
        name - column label
      • ImpFormatRow

        public ImpFormatRow(int seqNo, String columnName, String dataType, int maxLength)
        Constructor for non-fixed format
        Parameters:
        seqNo - sequence
        columnName - db column name
        dataType - data type - see constants DATATYPE_
        maxLength - if String it is the maximum length (truncated)
    • Method Details

      • getSeqNo

        public int getSeqNo()
        Sequence No
        Returns:
        seq no
      • setSeqNo

        public void setSeqNo(int newSeqNo)
        Set Sequence No
        Parameters:
        newSeqNo - sequence
      • setStartNo

        public void setStartNo(int newStartNo)
        Start Position
        Parameters:
        newStartNo - start position
      • getStartNo

        public int getStartNo()
        Get Start Position
        Returns:
        start position
      • setEndNo

        public void setEndNo(int newEndNo)
        End Position
        Parameters:
        newEndNo - end position
      • getEndNo

        public int getEndNo()
        Get End Position
        Returns:
        End Position
      • setColumnName

        public void setColumnName(String columnName)
        Column
        Parameters:
        columnName - column name
      • getColumnName

        public String getColumnName()
        Get Column Name
        Returns:
        Column Name
      • setName

        public void setName(String name)
        Name
        Parameters:
        name - name
      • getName

        public String getName()
        Get Name
        Returns:
        Name
      • setDataType

        public void setDataType(String dataType)
        Data Type
        Parameters:
        dataType - data type - see constants DATATYPE_
      • getDataType

        public String getDataType()
        Data Type
        Returns:
        data type
      • isString

        public boolean isString()
        Is String
        Returns:
        true if data type is String
      • isNumber

        public boolean isNumber()
        Is Number
        Returns:
        true if data type is Number
      • isDate

        public boolean isDate()
        Is Date
        Returns:
        true if data type is Date
      • isConstant

        public boolean isConstant()
        Is Constant
        Returns:
        true if data type is Constant
      • setFormatInfo

        public void setFormatInfo(String dataFormat, String decimalPoint, boolean divideBy100, String constantValue, String callout, String importprefix)
        Set Format Info
        Parameters:
        dataFormat - data format - see constants DATATYPE_
        decimalPoint - decimal point representation
        divideBy100 - divide number by 100
        constantValue - constant value
        callout - Java callout
        importprefix - Prefix to be added if value is not null or empty
      • getDataFormat

        public String getDataFormat()
        Get Format
        Returns:
        Data Format
      • getDecimalPoint

        public String getDecimalPoint()
        Get Decimal Point
        Returns:
        Decimal Point
      • isDivideBy100

        public boolean isDivideBy100()
        Divide result by 100
        Returns:
        true if result will be divided by 100
      • getConstantValue

        public String getConstantValue()
        Get the constant value
        Returns:
        constant value
      • setMaxLength

        public void setMaxLength(int maxLength)
        Set maximum length for Strings (truncated). Ignored, if 0.
        Parameters:
        maxLength - max length
      • parse

        public String parse(String info)
        Parse value. Field content in [] are treated as comments
        Parameters:
        info - data item
        Returns:
        parsed info