public class SalesRepUserImport extends Import<SalesRepUser>
NOTE: A single instance of this class is cached by ImportProcessor
and used throughout the import processing.
Modifier and Type | Field and Description |
---|---|
private int |
ivPwdMaxLen
The configured password maximum length.
|
private int |
ivPwdMinLen
The configured password minimum length.
|
private SalesRep |
ivSalesRep
A sales rep object.
|
private java.util.ArrayList<SalesRep> |
ivSalesReps
A cache of all sales reps.
|
private SecurityProfile |
ivSecurityProfile
A security profile object.
|
private java.util.ArrayList<SecurityProfile> |
ivSecurityProfiles
A cache of all security profiles.
|
private User |
ivUser
A user object.
|
private static long |
serialVersionUID
The class' serialization version id.
|
ACTION_ADD, ACTION_CLEAR, ACTION_DELETE, ACTION_UPDATE, ACTION_UPDATE_ADD, ivContext, ivLineNo, ivNumFields, ivObject, ivStarAll, ivTextLine, ivUseMixedCase, ivValues
Constructor and Description |
---|
SalesRepUserImport()
Constructs a new sales rep user import class.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
addRecord()
Adds a new record to the Flash database.
|
protected boolean |
addUser()
Adds a new user to the Flash database.
|
protected boolean |
deleteRecord()
Deletes an existing record from the Flash database.
|
void |
housekeeping()
Garbage collection: Kills (nullifies) objects used by the import class.
|
boolean |
importData(int action,
java.util.ArrayList<java.lang.String> data,
int lineNo)
Imports a record of data values into the Flash database.
|
protected boolean |
updateRecord()
Updates an existing record in the Flash database.
|
protected boolean |
updateUser()
Updates an existing user in the Flash database.
|
protected boolean |
validForAdd()
Answers if appropriate data has been supplied in order to add a record
to the Flash database.
|
protected boolean |
validForDelete()
Answers if appropriate data has been supplied in order to delete a record
in the Flash database.
|
protected boolean |
validForUpdate()
Answers if appropriate data has been supplied in order to update a record
in the Flash database.
|
private boolean |
validSalesRep(java.lang.String code)
Answers if a sales rep exists in the Flash database.
|
private boolean |
validSecurityProfile(java.lang.String code)
Answers if a security profile exists in the Flash database.
|
getContext, getMixedCase, getNumFields, getProperty, getTrueAction, isDecimal, isInteger, isStarAll, isTrue, log, log, qualifyKey, qualifyMsgId, setContext, setTextLine
private static final long serialVersionUID
private int ivPwdMinLen
private int ivPwdMaxLen
private SalesRep ivSalesRep
private java.util.ArrayList<SalesRep> ivSalesReps
private SecurityProfile ivSecurityProfile
private java.util.ArrayList<SecurityProfile> ivSecurityProfiles
private User ivUser
public SalesRepUserImport()
public void housekeeping()
housekeeping
in Import
.housekeeping
in class Import<SalesRepUser>
public boolean importData(int action, java.util.ArrayList<java.lang.String> data, int lineNo)
importData
in Import
.importData
in class Import<SalesRepUser>
action
- (int) The action code (i.e. add, update, delete).data
- (ArrayList) The set of data values to be imported. Each
element corresponds to a field in the original text line.lineNo
- (int) The current line number being processedtrue
if the import of data was successful,
otherwise false
.protected boolean addRecord()
addRecord
in Import
.addRecord
in class Import<SalesRepUser>
true
if the add was successful,
otherwise false
.protected boolean deleteRecord()
deleteRecord
in Import
.deleteRecord
in class Import<SalesRepUser>
true
if the delete was successful,
otherwise false
.protected boolean updateRecord()
updateRecord
in Import
.updateRecord
in class Import<SalesRepUser>
true
if the update was successful,
otherwise false
.protected boolean validForAdd()
validForAdd
in Import
.validForAdd
in class Import<SalesRepUser>
true
if appropriate data has been supplied,
otherwise false
.protected boolean validForDelete()
validForDelete
in Import
.validForDelete
in class Import<SalesRepUser>
true
if appropriate data has been supplied,
otherwise false
.protected boolean validForUpdate()
validForUpdate
in Import
.validForUpdate
in class Import<SalesRepUser>
true
if appropriate data has been supplied,
otherwise false
.private boolean validSalesRep(java.lang.String code)
code
- (String) The code for the sales rep to check.true
if the sales rep exists in the database,
otherwise false
.private boolean validSecurityProfile(java.lang.String code)
code
- (String) The code for the security profile to check.true
if the security profile exists in the
database, otherwise false
.protected boolean addUser()
true
if the add was successful,
otherwise false
.protected boolean updateUser()
true
if the update was successful,
otherwise false
.