Expresso 5-6

com.jcorporate.expresso.services.dbobj
Class RegistrationDBObject

java.lang.Object
  extended bycom.jcorporate.expresso.core.dataobjects.BaseDataObject
      extended bycom.jcorporate.expresso.core.dataobjects.jdbc.JDBCDataObject
          extended bycom.jcorporate.expresso.core.dbobj.DBObject
              extended bycom.jcorporate.expresso.core.dbobj.SecuredDBObject
                  extended bycom.jcorporate.expresso.services.dbobj.RegistrationDBObject
All Implemented Interfaces:
Cacheable, ContextNested, DataObject, LookupInterface, Securable, Serializable, UserListener
Direct Known Subclasses:
Address, Contact, Person, Phone, RegisteredUser

public abstract class RegistrationDBObject
extends SecuredDBObject
implements UserListener

Whenever you create a DBObject to be used for Registration, you need to derive it from this class. What this does is make sure that the registration information is deleted when a User is deleted.

Author:
Michael Rimov
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class com.jcorporate.expresso.core.dbobj.DBObject
DBObject.FieldError, DBObject.FieldUpdate
 
Field Summary
 
Fields inherited from class com.jcorporate.expresso.core.dbobj.SecuredDBObject
ADD, ALL_FUNCTIONS, CACHE_NAME, CACHE_TTY, DELETE, SEARCH, SYSTEM_ACCOUNT, SYSTEM_ACCOUNT_NAME, UPDATE
 
Fields inherited from class com.jcorporate.expresso.core.dbobj.DBObject
ATTRIBUTE_ERROR, ATTRIBUTE_ERROR_MESSAGE, ATTRIBUTE_PAGE_LIMIT, BIG_DECIMAL_ZERO, EMAIL_MASK, EVENT_ADD, EVENT_DELETE, EVENT_UPDATE, FLOAT_MASK, INT_MASK, IS_CHECK_RELATIONAL_INTEGRITY, UPDATE_CHANGED_ONLY, WHERE_KEYWORD
 
Fields inherited from class com.jcorporate.expresso.core.dataobjects.jdbc.JDBCDataObject
anyFieldsDistinct, anyFieldsToRetrieve, appendCustomWhere, caseSensitiveQuery, customWhereClause, dbKey, distinctFields, localConnection, LONGBINARY_READ_DEFAULT_SIZE, maxRecords, myClassName, myUpdates, offsetRecord, recordSet, retrieveFields, sMetadataMap, sortKeys
 
Fields inherited from class com.jcorporate.expresso.core.dataobjects.BaseDataObject
currentStatus, globalMask
 
Fields inherited from interface com.jcorporate.expresso.core.dataobjects.DataObject
STATUS_CURRENT, STATUS_DELETED, STATUS_NEW, STATUS_UPDATED
 
Constructor Summary
RegistrationDBObject()
          Constructor
RegistrationDBObject(DBConnection myConnection)
          Constructor
RegistrationDBObject(DBConnection dbConnection, String securityContext)
          

Constructor that sets a connection as the object is created - typically this is used when a particular DBConnection is required for the purposes of maintaining a database transaction.

RegistrationDBObject(int uid)
          Use over (String) constructor.
RegistrationDBObject(RequestContext request)
          For using DBObjects within Controllers.
 
Method Summary
protected static void addAsUserListener(UserListener ul)
           
 void addedUser(User user)
          This method is called just after a new user is added Creation date: (5/12/2001 2:26:17 PM)
 void deletedUser(User user)
          Whenever a user is deleted, we must delete all of their registration records for security reasons.
 void loggedOffUser(User user)
          This method is called just before a user is logged off Creation date: (5/12/2001 2:26:17 PM)
 void loggedOnUser(User user)
          This method is called just after a user is logged on Creation date: (5/12/2001 2:26:17 PM)
 void modifiedUser(User user)
          This method is called just after a user is modified Creation date: (5/12/2001 2:26:17 PM)
 
Methods inherited from class com.jcorporate.expresso.core.dbobj.SecuredDBObject
add, canRequesterAdd, canRequesterDelete, canRequesterRead, canRequesterUpdate, checkAllowed, copyAttributes, count, createSecurityCache, delete, deleteAll, find, getRequestingUid, getString, getString, getString, getString, getString, getString, getSystemUid, instantiate, isAllowed, retrieve, search, searchAndRetrieveList, searchAndRetrieveList, setRequestingUid, update
 
Methods inherited from class com.jcorporate.expresso.core.dbobj.DBObject
addDetail, addField, addField, addFieldError, addFoundKeys, addIfNeeded, addIndex, addKey, addOrUpdate, addSortKey, addTransition, addVirtualField, addVirtualField, addVirtualField, addVirtualField, average, basicAdd, cacheIsChangedComparison, checkAllReferredToBy, checkAllRefs, checkAllRefsPublic, checkDeleteDetailPerm, checkField, checkRef, checkRef, clear, clearDistinctFields, clearError, clearFieldsToRetrieve, clearSortKeys, containsWildCards, delete, deleteAll, deleteDetails, denotesRange, equals, forKey, formatDateTime, get, getAllAttributes, getAttribute, getAttributesIterator, getBooleanFieldValue, getCacheSize, getCacheStatsMap, getCacheUtil, getCheckZeroUpdate, getCustomWhereClause, getDataContext, getDataField, getDataTransferObject, getDBName, getDetails, getDistinctFieldCount, getDistinctFields, getField, getFieldBigDecimal, getFieldBoolean, getFieldByte, getFieldByteArray, getFieldData, getFieldDate, getFieldDecimalFormatted, getFieldDouble, getFieldErrorMessage, getFieldFloat, getFieldInt, getFieldLong, getFieldMetaData, getFieldShort, getFieldsToRetrieveCount, getFilterClass, getFoundCount, getFoundKeysArray, getIndexArray, getISOValuesDefault, getISOValuesDefault, getISOValuesDefault, getKey, getKeyFieldListIterator, getLength, getLengthInt, getLocalConnection, getLocale, getLogger, getLookupObject, getMax, getMax, getMaxRecords, getMyKeys, getMyUpdatesArray, getOffsetRecord, getPatternMatcher, getPrecision, getSerializedForm, getStringFilter, getThisDBbj, getThisDBObj, getValidValueDescrip, getValidValues, getValidValuesList, getValues, getValuesDefault, getValuesDefault, getValuesDefault, hasError, hasErrors, haveAllKeys, initialize, isCached, isChanged, isDistinct, isEmpty, isFieldDistinct, isFieldNull, isFieldsToRetrieve, isFieldToRetrieve, isMultiValued, isReadOnly, isSecret, isVirtual, loadFromConnection, logChange, max, min, newInstance, noNewLine, noQuotes, notifyListeners, populateDefaultValues, referredToBy, removeAttribute, removeFromCache, retrieveFromCache, saveBinaryField, search, set, setAttribute, setCacheSize, setCharset, setCheckZeroUpdate, setConnection, setConnection, setCustomWhereClause, setCustomWhereClause, setDataContext, setDataField, setDataTransferObject, setDefaultValue, setDescription, setField, setField, setField, setField, setField, setField, setField, setField, setField, setField, setFieldData, setFieldData, setFieldDistinct, setFieldsToRetrieve, setFilterClass, setFilterClass, setKeys, setLocale, setLookupField, setLookupObject, setMask, setMaxRecords, setMultiValued, setName, setOffsetRecord, setReadOnly, setSchema, setSecret, setSortKey, setStringFilter, setStringFiltersOnAll, setTargetDbSchema, setTargetTable, setupFields, sqlAggrFunction, sum, toDebugString, update, updateAll, updateAll, verify
 
Methods inherited from class com.jcorporate.expresso.core.dataobjects.jdbc.JDBCDataObject
addInParam, addOutParam, buildWhereClause, buildWhereClauseBuffer, checkZeroUpdate, constructNewMetaData, createAndExecuteSearch, createAndRunStoreProcedure, getConnectionPool, getCustomStringFieldValue, getDef, getDistinctFieldArrayList, getExecutor, getFieldsToRetrieveIterator, getJDBCMetaData, getJDBCUtil, getMappedDataContext, getMetaData, getQueryInterface, getSerialForm, loadFromConnection, makeLimitationStub, quoteIfNeeded, runStoredProcedure, runStoredProcedureAndRetrieveList, selectFieldString, setCaseSensitiveQuery, setDBConnectionPool, setDBName, setMappedDataContext, setOriginalDBName, setTargetStoreProcedure
 
Methods inherited from class com.jcorporate.expresso.core.dataobjects.BaseDataObject
getGlobalMask, getStatus, isGlobalMasked, setFieldsWithDefaults, setGlobalMask, setStatus
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegistrationDBObject

public RegistrationDBObject()
                     throws DBException
Constructor

Throws:
DBException - on error

RegistrationDBObject

public RegistrationDBObject(DBConnection myConnection)
                     throws DBException
Constructor

Parameters:
myConnection - The DBConnection retrieved from the ConnectionPool

RegistrationDBObject

public RegistrationDBObject(DBConnection dbConnection,
                            String securityContext)
                     throws DBException

Constructor that sets a connection as the object is created - typically this is used when a particular DBConnection is required for the purposes of maintaining a database transaction. If a specific connection is not used, there is no way to use commit() and rollback() in the event of failure, as a different DBConnection might be used for each phase of the transaction. Critial sections should therefore explicity request a DBConnection from the connection pool and pass it to each of the DB objects in that section.

This constructor is neceesary to work with otherDBMap and transaction capabilities

Parameters:
dbConnection - The DBConnection to utilize
securityContext - The data context that contains the setup (and security) tables for this object
Throws:
DBException - upon initialization error

RegistrationDBObject

public RegistrationDBObject(int uid)
                     throws DBException
Use over (String) constructor. Initializes the object in the context of the user who's uid belongs to the parameter.

Parameters:
uid - the Uid of the user context
Throws:
DBException - if there's an initialization problem

RegistrationDBObject

public RegistrationDBObject(RequestContext request)
                     throws DBException
For using DBObjects within Controllers. Initializes based upon the current user and the requested db. [Of course this can be modified later]

Parameters:
request - - The controller request handed to you by the framework.
Method Detail

deletedUser

public void deletedUser(User user)
                 throws DBException
Whenever a user is deleted, we must delete all of their registration records for security reasons.

Specified by:
deletedUser in interface UserListener
Parameters:
user - the User that was deleted
Throws:
DBException

addAsUserListener

protected static void addAsUserListener(UserListener ul)

addedUser

public void addedUser(User user)
               throws DBException
Description copied from interface: UserListener
This method is called just after a new user is added Creation date: (5/12/2001 2:26:17 PM)

Specified by:
addedUser in interface UserListener
Parameters:
user - com.jcorporate.expresso.core.security.User
Throws:
DBException

loggedOffUser

public void loggedOffUser(User user)
                   throws DBException
Description copied from interface: UserListener
This method is called just before a user is logged off Creation date: (5/12/2001 2:26:17 PM)

Specified by:
loggedOffUser in interface UserListener
Parameters:
user - com.jcorporate.expresso.core.security.User
Throws:
DBException

loggedOnUser

public void loggedOnUser(User user)
                  throws DBException
Description copied from interface: UserListener
This method is called just after a user is logged on Creation date: (5/12/2001 2:26:17 PM)

Specified by:
loggedOnUser in interface UserListener
Parameters:
user - com.jcorporate.expresso.core.security.User
Throws:
DBException

modifiedUser

public void modifiedUser(User user)
                  throws DBException
Description copied from interface: UserListener
This method is called just after a user is modified Creation date: (5/12/2001 2:26:17 PM)

Specified by:
modifiedUser in interface UserListener
Parameters:
user - com.jcorporate.expresso.core.security.User
Throws:
DBException

Expresso 5-6

Please see www.jcorporate.com for information about new Expresso releases.