public class UserController extends JDBCObjectController<User>
User
class. Provides methods for
retrieving and persisting user table records in the database.Modifier and Type | Field and Description |
---|---|
private static long |
serialVersionUID
The class' serialization version id.
|
ivDBObjCls, ivFieldCount, ivFieldKeyAlt, ivFieldKeyPri, ivFieldResPfx, ivSyncLast, ivSyncType, ivTableName
ivHashCode, ivHashFlds, ivObjAttrs
Constructor and Description |
---|
UserController()
The constructor for the controller.
|
Modifier and Type | Method and Description |
---|---|
boolean |
deleteType(java.lang.String type)
Deletes all records from the user table for the given user type.
|
User |
get(java.lang.String id)
Returns the user record for the given user id.
|
java.lang.Object[] |
getAllAsRS()
Returns a result set of all user records.
|
java.util.ArrayList<java.lang.String> |
getAutoCompleteIds(java.lang.String chars,
java.lang.String type)
Returns a collection of user ids that begin with the given characters.
|
java.util.ArrayList<java.lang.String> |
getBilltoUserIds(java.lang.String billtoId)
Returns a collection of user ids that have the specified bill-to customer
assigned to them.
|
java.util.ArrayList<User> |
getEmailAddress(java.lang.String emailAddr)
Returns a collection of user records that have the given email address.
|
java.util.ArrayList<User> |
getMassEmail(boolean promos)
Returns a collection of user records for the given mass email promotion
flag.
|
int |
getMassEmailCount(boolean promos)
Returns the count of users for the given mass email promotion flag.
|
java.util.HashMap<java.lang.String,java.lang.Integer> |
getMassEmailCounts()
Returns the counts of users who potentially would be involved in mass email
processing.
|
java.util.ArrayList<User> |
getMatching(java.lang.String field,
java.lang.String operand,
java.lang.String argument)
Returns a collection of user records that have a field that contains
characters matching the given criteria.
|
java.util.ArrayList<User> |
getPurge(java.util.Date asof)
Returns a collection of user records that have not been accessed since
the given date.
|
java.util.ArrayList<Customer> |
getShiptoCustomers(User user)
Returns a collection of all ship-to customers associated with a given
user.
|
java.util.ArrayList<java.lang.String> |
getShiptoUserIds(java.lang.String shiptoId)
Returns a collection of user ids that have the specified ship-to customer
assigned to them.
|
java.util.ArrayList<User> |
getType(java.lang.String type)
Returns a collection of user records for the given user type.
|
boolean |
hasCategory(java.lang.String code)
Answers if a given category code exists in the user table.
|
boolean |
hasEmailAddress(java.lang.String emailaddr)
Answers if a given email address exists in the user table.
|
boolean |
hasSecurityProfile(java.lang.String code)
Answers if a given security profile code exists in the user table.
|
User |
valuesToObject(java.util.HashMap<java.lang.String,java.lang.Object> attrs)
Returns a database object from the given set of attributes.
|
add, add, add, arrayToMap, arrayToMap, countAll, delete, delete, deleteAll, dispose, equals, getAll, getConnection, getConnectionInfo, getController, getFieldNames, getFieldNamesForKey, getFieldNamesForUpdate, getFieldNulls, getFieldNullsForKey, getFieldNullsForUpdate, getFieldsForOrderBy, getFieldsForWhere, getFieldSize, getFieldTypes, getFieldTypesForKey, getFieldTypesForUpdate, getStatementForDelete, getStatementForGet, getStatementForGetAll, getStatementForInsert, getStatementForUpdate, getStatementKey, getStatementString, getTableName, hasFieldNamesForKey, hasFieldNamesForUpdate, isDuplicate, resultSetToArray, resultSetToMap, resultSetToMap, resultSetToObject, setConnectionInfo, setPSDeleteValues, setPSExistsValues, setPSInsertValues, setPSUpdateValues, setPSValue, update, update
cloneMapAttributes, formatValue, formatValue, getHashFields, getMapArrayList, getMapAttributes, getMapBigDecimal, getMapBoolean, getMapDate, getMapDouble, getMapInteger, getMapLong, getMapMapped, getMapObject, getMapShort, getMapString, getMapString, getMapStringBuffer, getMapStringBuilder, getMapTime, getMapTimestamp, getMapVector, hashCode, setHashFields, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMapAttributes, setMapObject, setMapTime, setMapTimestamp, toStringArray
private static final long serialVersionUID
public User valuesToObject(java.util.HashMap<java.lang.String,java.lang.Object> attrs)
valuesToObject
in JDBCObjectController
.valuesToObject
in class JDBCObjectController<User>
attrs
- (HashMap) The attributes to assign to the new object.public boolean deleteType(java.lang.String type)
type
is User.TYPE_CUSTUSER, the default user record is recreated
after delete.type
- (String) The type of users to be deleted. Must be one of
the defined user types (i.e. User.TYPE_CUSTUSER).true
if the deletes were successful,
otherwise false
.public User get(java.lang.String id)
id
- (String) The user id for the desired record.public java.lang.Object[] getAllAsRS()
The invoker of this method is responsible for closing the returned result set and prepared statement.
public java.util.ArrayList<java.lang.String> getAutoCompleteIds(java.lang.String chars, java.lang.String type)
chars
- (String) The characters on which to search.type
- (String) The user type for the desired records. Must be
one of the defined user types (i.e. User.TYPE_CUSTUSER).public java.util.ArrayList<java.lang.String> getBilltoUserIds(java.lang.String billtoId)
billtoId
- (String) The bill-to customer id for the desired users.public java.util.ArrayList<User> getEmailAddress(java.lang.String emailAddr)
emailAddr
- (String) The email address for the desired records.public java.util.ArrayList<User> getMassEmail(boolean promos)
promos
- (boolean) true
if only users who have
elected to receive promotions should be returned, otherwise
false
if all users are to be returned.public int getMassEmailCount(boolean promos)
promos
- (boolean) true
if only users who have
elected to receive promotions should be counted, otherwise
false
if all users are to be counted.public java.util.HashMap<java.lang.String,java.lang.Integer> getMassEmailCounts()
public java.util.ArrayList<User> getMatching(java.lang.String field, java.lang.String operand, java.lang.String argument)
field
- (String) The field that is to be involved in determining
the query results. This value is appended to the end of the
sql properties key when obtaining the appropriate sql statement
for the requested query.operand
- (String) The operation that the query is to perform
on the given field in order to determine the query results.
Currently only "contains" and "equals" are supported.argument
- (String) The query search argument. The character
string that the query is to use in determining its results.public java.util.ArrayList<User> getPurge(java.util.Date asof)
asof
- (java.util.Date) The cutoff date for the desired records.public java.util.ArrayList<Customer> getShiptoCustomers(User user)
user
- (User) The user for the desired ship-to customers.public java.util.ArrayList<java.lang.String> getShiptoUserIds(java.lang.String shiptoId)
shiptoId
- (String) The ship-to customer id for the desired users.public java.util.ArrayList<User> getType(java.lang.String type)
type
- (String) The user type for the desired records. Must be
one of the defined user types (i.e. User.TYPE_CUSTUSER).public boolean hasCategory(java.lang.String code)
code
- (String) The category code to check.true
if the category code exists, otherwise
false
.public boolean hasEmailAddress(java.lang.String emailaddr)
emailaddr
- (String) The email address to check.true
if the email address exists, otherwise
false
.public boolean hasSecurityProfile(java.lang.String code)
code
- (String) The security code to check.true
if the profile exists, otherwise
false
.