Adempiere 3.5.2a

org.compiere.impexp
Class ImpFormat

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

public final class ImpFormat
extends Object

Import Format a Row

Version:
$Id: ImpFormat.java,v 1.3 2006/07/30 00:51:05 jjanke Exp $
Author:
Jorg Janke

Field Summary
static String FORMATTYPE_COMMA
          Format Type - Comma Separated C
static String FORMATTYPE_FIXED
          Format Type - Fixed Length F
static String FORMATTYPE_TAB
          Format Type - Tab Separated T
static String FORMATTYPE_XML
          Format Type - XML X
 
Constructor Summary
ImpFormat(String name, int AD_Table_ID, String formatType)
          Format
 
Method Summary
 void addRow(ImpFormatRow row)
          Add Format Row
 int getAD_Table_ID()
          Get Import Table Name
 String getBPartner()
          Get Business Partner
 String getFormatType()
          Set Format Type
 String getName()
          Get Name
 ImpFormatRow getRow(int index)
          Get Row
 int getRowCount()
          Get Row Count
static ImpFormat load(String name)
          Factory load
 String[] parseLine(String line, boolean withLabel, boolean trace, boolean ignoreEmpty)
          Parse Line returns ArrayList of values
 void setBPartner(String newBPartner)
          Set Business Partner
 void setFormatType(String newFormatType)
          Set Format Type
 void setName(String newName)
          Set Name
 void setTable(int AD_Table_ID)
          Import Table
 boolean updateDB(Properties ctx, String line, String trxName)
          Insert/Update Database.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FORMATTYPE_FIXED

public static final String FORMATTYPE_FIXED
Format Type - Fixed Length F

See Also:
Constant Field Values

FORMATTYPE_COMMA

public static final String FORMATTYPE_COMMA
Format Type - Comma Separated C

See Also:
Constant Field Values

FORMATTYPE_TAB

public static final String FORMATTYPE_TAB
Format Type - Tab Separated T

See Also:
Constant Field Values

FORMATTYPE_XML

public static final String FORMATTYPE_XML
Format Type - XML X

See Also:
Constant Field Values
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

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)
Set Business Partner

Parameters:
newBPartner - (value)

getBPartner

public String getBPartner()
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(String name)
Factory load

Parameters:
name - name
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

Adempiere 3.5.2a

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