public final class UserLoader extends java.lang.Object implements ImportLoader
Load user data from a single source
Modifier and Type | Field and Description |
---|---|
static int |
bo_active |
static int |
bo_change_pwd |
static int |
bo_searchable |
static int |
de_title |
static int |
dt_birth |
static int |
dt_cancel |
static int |
dt_created |
static int |
dt_last_update |
static int |
dt_last_visit |
static int |
dt_pwd_expires |
static int |
gu_acl_group |
static int |
gu_category |
static int |
gu_user |
static int |
gu_workarea |
static int |
icq_id |
static int |
id_account |
static int |
id_domain |
static int |
id_gender |
static int |
len_quota |
static int |
marital_status |
static int |
max_quota |
static int |
MODE_APPEND |
static int |
MODE_APPENDUPDATE |
static int |
MODE_UPDATE |
static int |
nm_acl_group |
static int |
nm_company |
static int |
nm_user |
static int |
nm_workarea |
static int |
ny_age |
static int |
sn_passport |
static int |
tp_account |
static int |
tp_passport |
static int |
tx_alt_email |
static int |
tx_challenge |
static int |
tx_comments |
static int |
tx_education |
static int |
tx_main_email |
static int |
tx_nickname |
static int |
tx_pwd |
static int |
tx_pwd_sign |
static int |
tx_reply |
static int |
tx_surname1 |
static int |
tx_surname2 |
LOOUKP_TR_COLUMNS, LOOUKP_TR_COUNT, WRITE_LOOKUPS
Constructor and Description |
---|
UserLoader() |
UserLoader(java.sql.Connection oConn)
Create UserLoader and call prepare() on Connection
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close ImportLoader
Must be always called before ImportLoader is destroyed
|
int |
columnCount()
Get columns count
|
java.lang.String[] |
columnNames()
Get array of column names
|
java.lang.Object |
get(int iColumnIndex)
Get column by index
|
java.lang.Object |
get(java.lang.String sColumnName)
Get column by name
|
int |
getColumnIndex(java.lang.String sColumnName)
Get column index at ColumnNames array given its name
This method performs binary search assuming that ColumnNames is sorted in
ascending order
|
void |
prepare(java.sql.Connection oConn,
ColumnList oColList)
Prepare statements for execution
This method needs to be called only once if the default constructor was used.
|
void |
put(int iColumnIndex,
java.lang.Object oValue)
Put value for a given column
|
void |
put(java.lang.String sColumnName,
java.lang.Object oValue)
Put value for a given column
If a previous value already exists then it is replaced
|
void |
putAll(java.util.Map oValues)
Put all values from a map on their corresponding columns matching by name
|
void |
setAllColumnsToNull()
Set all column values to null
|
void |
store(java.sql.Connection oConn,
java.lang.String sWorkArea,
int iFlags)
Store a single row or a set of related rows
|
public static final int MODE_APPEND
public static final int MODE_UPDATE
public static final int MODE_APPENDUPDATE
public static int bo_active
public static int bo_change_pwd
public static int bo_searchable
public static int de_title
public static int dt_birth
public static int dt_cancel
public static int dt_created
public static int dt_last_update
public static int dt_last_visit
public static int dt_pwd_expires
public static int gu_acl_group
public static int gu_category
public static int gu_user
public static int gu_workarea
public static int icq_id
public static int id_account
public static int id_domain
public static int id_gender
public static int len_quota
public static int marital_status
public static int max_quota
public static int nm_acl_group
public static int nm_company
public static int nm_user
public static int nm_workarea
public static int ny_age
public static int sn_passport
public static int tp_account
public static int tp_passport
public static int tx_alt_email
public static int tx_challenge
public static int tx_comments
public static int tx_education
public static int tx_main_email
public static int tx_nickname
public static int tx_pwd
public static int tx_pwd_sign
public static int tx_reply
public static int tx_surname1
public static int tx_surname2
public UserLoader()
public UserLoader(java.sql.Connection oConn) throws java.sql.SQLException
oConn
- Connectionjava.sql.SQLException
public void setAllColumnsToNull()
setAllColumnsToNull
in interface ImportLoader
public int getColumnIndex(java.lang.String sColumnName)
Get column index at ColumnNames array given its name
This method performs binary search assuming that ColumnNames is sorted in ascending ordergetColumnIndex
in interface ImportLoader
sColumnName
- String Column name (case insensitive)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 void put(int iColumnIndex, java.lang.Object oValue) throws java.lang.ArrayIndexOutOfBoundsException
put
in interface ImportLoader
iColumnIndex
- Column index [0..getColumnCount()-1]oValue
- Value for columnjava.lang.ArrayIndexOutOfBoundsException
public void put(java.lang.String sColumnName, java.lang.Object oValue) throws java.lang.ArrayIndexOutOfBoundsException
Put value for a given column
If a previous value already exists then it is replacedput
in interface ImportLoader
sColumnName
- Column name (case sensitive)oValue
- Value for columnjava.lang.ArrayIndexOutOfBoundsException
public void putAll(java.util.Map oValues)
oValues
- Mappublic java.lang.Object get(int iColumnIndex) throws java.lang.ArrayIndexOutOfBoundsException
get
in interface ImportLoader
iColumnIndex
- int Colunm index [0..getColumnCount()-1]java.lang.ArrayIndexOutOfBoundsException
public java.lang.Object get(java.lang.String sColumnName) throws java.lang.ArrayIndexOutOfBoundsException
get
in interface ImportLoader
sColumnName
- String Column name (case sensitive)java.lang.ArrayIndexOutOfBoundsException
- If no column with sucjh name was foundpublic void prepare(java.sql.Connection oConn, ColumnList oColList) throws java.sql.SQLException
Prepare statements for execution
This method needs to be called only once if the default constructor was used.prepare
in interface ImportLoader
oConn
- Connection Open JDBC database connectionoColList
- ColumnList This parameter is ignoredjava.sql.SQLException
public void close() throws java.sql.SQLException
ImportLoader
Close ImportLoader
Must be always called before ImportLoader is destroyedclose
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, java.lang.ClassCastException, java.lang.NumberFormatException
ImportLoader
store
in interface ImportLoader
oConn
- ConnectionsWorkArea
- StringiFlags
- intjava.sql.SQLException
java.lang.IllegalArgumentException
java.lang.NullPointerException
java.lang.ClassCastException
java.lang.NumberFormatException