com.sri.emo.dbobj
Class WizDecisionSet

java.lang.Object
  extended by com.jcorporate.expresso.core.dataobjects.BaseDataObject
      extended by com.jcorporate.expresso.core.dataobjects.jdbc.JDBCDataObject
          extended by com.jcorporate.expresso.core.dbobj.DBObject
              extended by com.jcorporate.expresso.core.dbobj.SecuredDBObject
                  extended by com.sri.emo.dbobj.WizDecisionSet
All Implemented Interfaces:
Cacheable, ContextNested, DataObject, Securable, LookupInterface, Serializable

public class WizDecisionSet
extends SecuredDBObject

WizDecisionSet represents a set of responses that make up a "row" in the decision matrix.

Author:
Michael Rimov
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.jcorporate.expresso.core.dbobj.DBObject
DBObject.FieldError, DBObject.FieldUpdate
 
Field Summary
static String FLD_DECISIONRESULT
          Public constant for access to field "Decision Result"
static String FLD_DECISIONTITLE
          Public constant for access to field "Example Title"
static String FLD_ID
          Public constant for access to field "Item ID"
static String FLD_WIZID
          Public constant for access to field "Wizard Id"
 
Fields inherited from class com.jcorporate.expresso.core.dbobj.SecuredDBObject
ADD, ALL_FUNCTIONS, CACHE_NAME, CACHE_TTY, DELETE, SEARCH, 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, CACHE_LIMIT_PERCENT, CACHE_LIMIT_TTL, EMAIL_MASK, EVENT_ADD, EVENT_DELETE, EVENT_UPDATE, FLOAT_MASK, INT_MASK, IS_CHECK_RELATIONAL_INTEGRITY, IS_MUTABLE, sCacheStats, UPDATE_CHANGED_ONLY, WHERE_KEYWORD
 
Fields inherited from class com.jcorporate.expresso.core.dataobjects.jdbc.JDBCDataObject
anyFieldsDistinct, anyFieldsToInput, anyFieldsToRetrieve, appendCustomWhere, caseSensitiveQuery, customWhereClause, dbKey, distinctFields, inputFields, 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.Securable
SYSTEM_ACCOUNT
 
Fields inherited from interface com.jcorporate.expresso.core.dataobjects.DataObject
STATUS_CURRENT, STATUS_DELETED, STATUS_NEW, STATUS_UPDATED
 
Constructor Summary
WizDecisionSet()
          Creates an instance of WizDecisionSet.
WizDecisionSet(DBConnection dbConnection, int uid)
          

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.

WizDecisionSet(ReadOnlyUser user)
          Creates an instance of WizDecisionSet automatically setting the object's requesting user.
 
Method Summary
 void addDecisionEntity(int[] wizStepIds, String[] pickListIds)
          Adds a decision entry into this 'set' of decisions.
 void addSingleDecisionEntity(DBConnection connection, int wizStepId, String pickListId)
          Adds a single decision entity to the set.
 boolean equals(Object obj)
          Indicates whether some other object is "equal to" this one.
 List getDecisionEntities()
          Retrieve all details for this object.
 Node getDecisionNode()
          Retrieves the node associated with this decision set.
 String getDecisionResult()
           
 String getField(String fieldName)
          Override of getField to provide for virtual field 'decision title'
 Integer getWizardId()
          Retrieve the wizard id for this decision set.
 int hashCode()
          Returns a hash code value for the object.
 void setDecisionResult(int parameterValue)
           
protected  void setupFields()
          One time intiialization of all the field types.
 void setWizardId(int newValue)
          Set the wizard id for this decision set.
 void setWizardId(String newValue)
          Set the wizard id for this decision set.
 
Methods inherited from class com.jcorporate.expresso.core.dbobj.SecuredDBObject
add, canRequesterAdd, canRequesterDelete, canRequesterRead, canRequesterUpdate, checkAllowed, copyAttributes, count, createSecurityCache, delete, deleteAll, find, getRequestingUid, getRequestingUser, getString, getString, getString, getString, getString, getString, getSystemUid, instantiate, isAllowed, retrieve, search, searchAndRetrieveList, searchAndRetrieveList, setRequestingUid, setRequestingUser, update
 
Methods inherited from class com.jcorporate.expresso.core.dbobj.DBObject
addDetail, addField, addField, addFieldError, addFoundKeys, addIfNeeded, addIndex, addKey, addMaster, addOrUpdate, addSortKey, addTransition, addVirtualField, addVirtualField, addVirtualField, addVirtualField, average, basicAdd, cacheIsChangedComparison, canUseRetrieve, checkAllReferredToBy, checkAllRefs, checkAllRefsPublic, checkDeleteDetailPerm, checkField, checkMutable, checkRef, checkRef, clear, clearDistinctFields, clearError, clearFieldsToInput, clearFieldsToRetrieve, clearSortKeys, clone, containsWildCards, copyAllFields, delete, deleteAll, deleteDetails, denotesRange, fetchImmut, fetchImmutable, forKey, formatDateTime, get, getAllAttributes, getAttribute, getAttributesIterator, getBooleanFieldValue, getCacheSize, getCacheStatsMap, getCacheUtil, getCheckZeroUpdate, getCustomWhereClause, getDataContext, getDataField, getDataTransferObject, getDBName, getDetails, getDistinctFieldCount, getDistinctFields, getFieldAttributesIterator, getFieldBigDecimal, getFieldBoolean, getFieldByte, getFieldByteArray, getFieldData, getFieldDate, getFieldDecimalFormatted, getFieldDouble, getFieldErrorMessage, getFieldFloat, getFieldInt, getFieldLong, getFieldMetaData, getFieldShort, getFieldsToInputCount, getFieldsToRetrieveCount, getFilterClass, getFoundCount, getFoundKeysArray, getIndexArray, getISOValuesDefault, getISOValuesDefault, getISOValuesDefault, getKey, getKeyFieldListIterator, getLength, getLengthInt, getLocale, getLogger, getLookupObject, getMax, getMax, getMaxRecords, getMyKeys, getMyUpdatesArray, getOffsetRecord, getPatternMatcher, getPrecision, getSerializedForm, getSizeEstimate, getStringFilter, getThisDBbj, getThisDBObj, getValidValueDescrip, getValidValues, getValidValuesList, getValues, getValuesDefault, getValuesDefault, getValuesDefault, hasError, hasErrors, haveAllKeys, initialize, isCached, isChanged, isDistinct, isEmpty, isFieldDistinct, isFieldNull, isFieldsToInput, isFieldsToRetrieve, isFieldToRetrieve, isMultiValued, isMutable, isMutable, isReadOnly, isSecret, isVirtual, loadFromConnection, logChange, max, min, newInstance, noNewLine, noQuotes, notifyListeners, populateDefaultValues, referredToBy, removeAttribute, removeFromCache, retrieveFromCache, saveBinaryField, search, set, setAttribute, setCacheLimit, setCacheLimit, setCacheLimitAsPercent, 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, setFieldsToInput, setFieldsToRetrieve, setFilterClass, setFilterClass, setKey, setKeys, setLocale, setLookupField, setLookupObject, setMask, setMaxRecords, setMultiValued, setName, setOffsetRecord, setReadOnly, setSchema, setSecret, setSortKey, setStringFilter, setStringFiltersOnAll, setTargetDbSchema, setTargetTable, sqlAggrFunction, sum, toDebugString, update, updateAll, updateAll, updateIsChanged, verify
 
Methods inherited from class com.jcorporate.expresso.core.dataobjects.jdbc.JDBCDataObject
addInParam, addOutParam, buildWhereClause, buildWhereClauseBuffer, checkZeroUpdate, constructNewMetaData, createAndExecuteSearch, createAndRunStoreProcedure, createSQLSelectStatement, createSQLSelectStatement, getConnectionPool, getCustomStringFieldValue, getDef, getDistinctFieldArrayList, getExecutor, getFieldsToInputIterator, getFieldsToRetrieveIterator, getJDBCMetaData, getJDBCUtil, getLocalConnection, 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
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FLD_ID

public static final String FLD_ID
Public constant for access to field "Item ID"

See Also:
Constant Field Values

FLD_WIZID

public static final String FLD_WIZID
Public constant for access to field "Wizard Id"

See Also:
Constant Field Values

FLD_DECISIONRESULT

public static final String FLD_DECISIONRESULT
Public constant for access to field "Decision Result"

See Also:
Constant Field Values

FLD_DECISIONTITLE

public static final String FLD_DECISIONTITLE
Public constant for access to field "Example Title"

See Also:
Constant Field Values
Constructor Detail

WizDecisionSet

public WizDecisionSet()
               throws DBException
Creates an instance of WizDecisionSet. Call setRequestingUid() and setDataContext() before using.

Throws:
DBException - upon initialization exception.
See Also:
SecuredDBObject.SecuredDBObject(java.lang.String, int)

WizDecisionSet

public WizDecisionSet(DBConnection dbConnection,
                      int uid)
               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
uid - User Uid.
Throws:
DBException - upon initialization error

WizDecisionSet

public WizDecisionSet(ReadOnlyUser user)
               throws DBException
Creates an instance of WizDecisionSet automatically setting the object's requesting user.

Parameters:
user - The user's security context.
Throws:
DBException - upon construction error
Method Detail

getDecisionNode

public Node getDecisionNode()
                     throws DBException
Retrieves the node associated with this decision set.

Returns:
Node
Throws:
DBException

setupFields

protected void setupFields()
                    throws DBException
One time intiialization of all the field types. Set all specifications here such as field names, table name, friendly name of the data object, characterset, etc.

Overrides:
setupFields in class DBObject
Throws:
DBException - upon error

getDecisionEntities

public List getDecisionEntities()
                         throws DBException
Retrieve all details for this object.

Returns:
Throws:
DBException

addDecisionEntity

public void addDecisionEntity(int[] wizStepIds,
                              String[] pickListIds)
                       throws DBException
Adds a decision entry into this 'set' of decisions.

Assertions:

wizStepIds[].length == pickListIds[].length

wizStepsIds[i] maps to pickListIds[i]

This object's local connection MUST be already set: ie this occurs within a transaction

Parameters:
wizStepIds - int[] the step ids corresponding to the picklist ids.
pickListIds - String[] the picklist ids corresponding to the step ids.
Throws:
DBException - upon add() error.

addSingleDecisionEntity

public void addSingleDecisionEntity(DBConnection connection,
                                    int wizStepId,
                                    String pickListId)
                             throws DBException
Adds a single decision entity to the set.

Parameters:
connection - DBConnection the database connection
wizStepId - int the step id.
pickListId - String the corresponding picklist string
Throws:
DBException - upon addOrUpdate() error.

setWizardId

public void setWizardId(int newValue)
                 throws DBException
Set the wizard id for this decision set.

Parameters:
newValue - int the new wizard id (integer > 0)
Throws:
DBException - upon setField() error

setWizardId

public void setWizardId(String newValue)
                 throws DBException
Set the wizard id for this decision set.

Parameters:
newValue - int the new wizard id (integer > 0)
Throws:
DBException - upon setField() error

getWizardId

public Integer getWizardId()
                    throws DBException
Retrieve the wizard id for this decision set.

Returns:
Integer or null if it is not set.
Throws:
DBException - upon getDataField() generated error.

hashCode

public int hashCode()
Returns a hash code value for the object.

Overrides:
hashCode in class Object
Returns:
a hash code value for this object.

equals

public boolean equals(Object obj)
Indicates whether some other object is "equal to" this one. This particular implementation delegates equality to the base DBObject class which has per-field comparison.

Specified by:
equals in interface DataObject
Overrides:
equals in class DBObject
Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.

getField

public String getField(String fieldName)
                throws DBException
Override of getField to provide for virtual field 'decision title'

Specified by:
getField in interface DataObject
Overrides:
getField in class DBObject
Parameters:
fieldName - the name of the field to retrieve
Returns:
Object or null if the field was null
Throws:
DBException - upon error

setDecisionResult

public void setDecisionResult(int parameterValue)
                       throws DBException
Throws:
DBException

getDecisionResult

public String getDecisionResult()
                         throws DBException
Throws:
DBException


Copyright © 2004-2006 Codeguild, Inc.. All Rights Reserved.