public class SalesRepController extends JDBCObjectController<SalesRep>
SalesRep
class. Provides methods for
retrieving and persisting sales rep 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 |
---|
SalesRepController()
The constructor for the controller.
|
Modifier and Type | Method and Description |
---|---|
boolean |
delete(SalesRep obj)
Deletes an existing record from the table associated with the controller.
|
boolean |
deleteAll()
Deletes all records in the table associated with the controller.
|
SalesRep |
get(java.lang.String code)
Returns the sales rep record for the given sales rep code.
|
java.util.ArrayList<SalesRep> |
getAll()
Returns a collection of all records in the table associated with the
controller.
|
Select |
getUISelect(java.lang.String code,
boolean inclType)
Returns an HTML
Select object that contains all sales reps and has
the given code as the preselected code in the set of options. |
add, add, add, arrayToMap, arrayToMap, countAll, delete, dispose, equals, 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, valuesToObject
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 SalesRepController()
public boolean delete(SalesRep obj)
Deletes the sales rep plus all sales rep customers and sales rep users associated with the sales rep.
Overridesdelete
in JDBCObjectController
.delete
in class JDBCObjectController<SalesRep>
obj
- (JDBCObject) The object for the record to be deleted.true
if the record deleted successfully,
otherwise false
.public boolean deleteAll()
Deletes all sales reps plus all sales rep customers and all sales rep users.
OverridesdeleteAll
in JDBCObjectController
.deleteAll
in class JDBCObjectController<SalesRep>
true
if the deletes are successful,
otherwise false
.public java.util.ArrayList<SalesRep> getAll()
getAll
in JDBCObjectController
.getAll
in class JDBCObjectController<SalesRep>
public SalesRep get(java.lang.String code)
code
- (String) The sales rep code for the desired record.public Select getUISelect(java.lang.String code, boolean inclType)
Select
object that contains all sales reps and has
the given code as the preselected code in the set of options. Invokers must
assign a form field name to the returned object via the setName
method before adding the object to the velocity template data.code
- (String) The sales rep code to preselect in the select's set
of options. Pass an empty string for this parameter if a blank
option is to be created as the first option and then preselected.
Pass a null
for this parameter if no blank option and no
preselecting is desired.inclType
- (boolean) true
to include the sales rep type
as a prefix to the code, otherwise false
..Select
object.