public final class CompanyLoader extends java.lang.Object implements ImportLoader
Load Company and Address data from a single source
Company loader creates or updates simultaneously registers at k_companies and k_addresses tables and the links between them k_x_contact_addr. Loading a Company is a special case of loading a contact, and thus this class delegates all its behavious to a private ContactLoader member.Modifier and Type | Field and Description |
---|---|
static int |
ADD_TO_LIST |
static int |
MODE_APPEND |
static int |
MODE_APPENDUPDATE |
static int |
MODE_UPDATE |
static int |
WRITE_ADDRESSES |
static int |
WRITE_LOOKUPS |
LOOUKP_TR_COLUMNS, LOOUKP_TR_COUNT
Constructor and Description |
---|
CompanyLoader()
Default Constructor
|
CompanyLoader(java.sql.Connection oConn)
Create ContactLoader and call prepare() on Connection
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Method close
|
int |
columnCount()
Get columns count
|
java.lang.String[] |
columnNames()
Get array of column names
|
java.lang.Object |
get(int iColumnIndex)
Method get
|
java.lang.Object |
get(java.lang.String sColumnName)
Method get
|
int |
getColumnIndex(java.lang.String sColumnName)
Method getColumnIndex
|
void |
prepare(java.sql.Connection oConn,
ColumnList oCols)
Method prepare
|
void |
put(int iColumnIndex,
java.lang.Object oValue)
Method put
|
void |
put(java.lang.String sColumnName,
java.lang.Object oValue)
Method put
|
void |
setAllColumnsToNull()
Method setAllColumnsToNull
|
void |
store(java.sql.Connection oConn,
java.lang.String sWorkArea,
int iFlags)
Method store
|
public static final int MODE_APPEND
public static final int MODE_UPDATE
public static final int MODE_APPENDUPDATE
public static final int WRITE_LOOKUPS
public static final int WRITE_ADDRESSES
public static final int ADD_TO_LIST
public CompanyLoader()
public CompanyLoader(java.sql.Connection oConn) throws java.sql.SQLException
oConn
- Connectionjava.sql.SQLException
public int columnCount()
ImportLoader
columnCount
in interface ImportLoader
public java.lang.String[] columnNames() throws java.lang.IllegalStateException
ImportLoader
columnNames
in interface ImportLoader
java.lang.IllegalStateException
public java.lang.Object get(int iColumnIndex) throws java.lang.ArrayIndexOutOfBoundsException
get
in interface ImportLoader
iColumnIndex
- java.lang.ArrayIndexOutOfBoundsException
public java.lang.Object get(java.lang.String sColumnName) throws java.lang.ArrayIndexOutOfBoundsException
get
in interface ImportLoader
sColumnName
- java.lang.ArrayIndexOutOfBoundsException
public int getColumnIndex(java.lang.String sColumnName)
getColumnIndex
in interface ImportLoader
sColumnName
- public void put(int iColumnIndex, java.lang.Object oValue) throws java.lang.ArrayIndexOutOfBoundsException
put
in interface ImportLoader
iColumnIndex
- oValue
- java.lang.ArrayIndexOutOfBoundsException
public void put(java.lang.String sColumnName, java.lang.Object oValue) throws java.lang.ArrayIndexOutOfBoundsException
put
in interface ImportLoader
sColumnName
- oValue
- java.lang.ArrayIndexOutOfBoundsException
public void setAllColumnsToNull()
setAllColumnsToNull
in interface ImportLoader
public void prepare(java.sql.Connection oConn, ColumnList oCols) throws java.sql.SQLException
prepare
in interface ImportLoader
oConn
- oCols
- java.sql.SQLException
public void close() throws java.sql.SQLException
close
in interface ImportLoader
java.sql.SQLException
public void store(java.sql.Connection oConn, java.lang.String sWorkArea, int iFlags) throws java.sql.SQLException, java.lang.IllegalArgumentException, java.lang.NullPointerException
store
in interface ImportLoader
oConn
- sWorkArea
- iFlags
- java.sql.SQLException
java.lang.IllegalArgumentException
java.lang.NullPointerException