Adempiere 3.5.2a

org.compiere.impexp
Class ImpFormatRow

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

public final class ImpFormatRow
extends Object

Import Format Row with pasing 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

Field Summary
static String DATATYPE_Constant
          Constant Data type
static String DATATYPE_Date
          Data Data type
static String DATATYPE_Number
          Numeric Data type
static String DATATYPE_String
          String Data type
 
Constructor Summary
ImpFormatRow(int seqNo, String columnName, int startNo, int endNo, String dataType, int maxLength)
          Constructor for fixed format
ImpFormatRow(int seqNo, String columnName, String dataType, int maxLength)
          Constructor for non-fixed format
 
Method Summary
 String getColumnName()
          Get Column Name
 String getConstantValue()
          Get the constant value
 String getDataFormat()
          Get Format
 String getDataType()
          Data Type
 String getDecimalPoint()
          Get Decimal Point
 int getEndNo()
          Get End Position
 int getSeqNo()
          Sequence No
 int getStartNo()
          Get Start Position
 boolean isConstant()
          Is Constant
 boolean isDate()
          Is Date
 boolean isDivideBy100()
          Divide result by 100
 boolean isNumber()
          Is Number
 boolean isString()
          Is String
 String parse(String info)
          Parse value.
 void setColumnName(String columnName)
          Column
 void setDataType(String dataType)
          Data Type
 void setEndNo(int newEndNo)
          End Position
 void setFormatInfo(String dataFormat, String decimalPoint, boolean divideBy100, String constantValue, String callout)
          Set Format Info
 void setMaxLength(int maxLength)
          Set maximum length for Strings (truncated).
 void setSeqNo(int newSeqNo)
          Set Sequence No
 void setStartNo(int newStartNo)
          Start Position
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DATATYPE_String

public static final String DATATYPE_String
String Data type

See Also:
Constant Field Values

DATATYPE_Date

public static final String DATATYPE_Date
Data Data type

See Also:
Constant Field Values

DATATYPE_Number

public static final String DATATYPE_Number
Numeric Data type

See Also:
Constant Field Values

DATATYPE_Constant

public static final String DATATYPE_Constant
Constant Data type

See Also:
Constant Field Values
Constructor Detail

ImpFormatRow

public ImpFormatRow(int seqNo,
                    String columnName,
                    int startNo,
                    int endNo,
                    String dataType,
                    int maxLength)
Constructor for fixed format

Parameters:
seqNo - sequence
columnName - db dolumn name
startNo - start no
endNo - and no
dataType - data type - see constants DATATYPE_
maxLength - if String it is the maximum length (truncated)

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 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

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)
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

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:
pased info

Adempiere 3.5.2a

Adempiere® is a registered trademark of ADempiere Business Inc. ©2004-2008 HumanFlash.com All rights reserved.