Package org.compiere.impexp
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 Summary
Constructors Constructor Description ImpFormatRow(int seqNo, String columnName, int startNo, int endNo, String dataType, int maxLength, String name)
Constructor for fixed formatImpFormatRow(int seqNo, String columnName, String dataType, int maxLength)
Constructor for non-fixed format
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getColumnName()
Get Column NameString
getConstantValue()
Get the constant valueString
getDataFormat()
Get FormatString
getDataType()
Data TypeString
getDecimalPoint()
Get Decimal Pointint
getEndNo()
Get End PositionString
getName()
Get Nameint
getSeqNo()
Sequence Noint
getStartNo()
Get Start Positionboolean
isConstant()
Is Constantboolean
isDate()
Is Dateboolean
isDivideBy100()
Divide result by 100boolean
isNumber()
Is Numberboolean
isString()
Is StringString
parse(String info)
Parse value.void
setColumnName(String columnName)
Columnvoid
setDataType(String dataType)
Data Typevoid
setEndNo(int newEndNo)
End Positionvoid
setFormatInfo(String dataFormat, String decimalPoint, boolean divideBy100, String constantValue, String callout, String importprefix)
Set Format Infovoid
setMaxLength(int maxLength)
Set maximum length for Strings (truncated).void
setName(String name)
Namevoid
setSeqNo(int newSeqNo)
Set Sequence Novoid
setStartNo(int newStartNo)
Start Position
-
-
-
Constructor Detail
-
ImpFormatRow
public ImpFormatRow(int seqNo, String columnName, int startNo, int endNo, String dataType, int maxLength, String name)
Constructor for fixed format- Parameters:
seqNo
- sequencecolumnName
- db column namestartNo
- start noendNo
- and nodataType
- data type - see constants DATATYPE_maxLength
- if String it is the maximum length (truncated)name
- column label
-
-
Method Detail
-
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 representationdivideBy100
- divide number by 100constantValue
- constant valuecallout
- Java calloutimportprefix
- 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
-
-