com.sri.emo.dbobj
Class MatrixCell

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.jcorporate.expresso.core.dbobj.RowSecuredDBObject
                      extended by com.sri.emo.dbobj.MatrixCell
All Implemented Interfaces:
Cacheable, ContextNested, DataObject, Securable, LookupInterface, Serializable

public class MatrixCell
extends RowSecuredDBObject

a row in a scoring or design matrix or covar matrix. The first two matrices are for Measurement Model. Covar matrix was added later in Student Model. first two matrices have rows corresponding to ObservableVar, while covar matrix has both row & column for SMVs. Covar usage was added last, so some methods calling for Obs.Var. are repurposed to "RowId".

Author:
larry hamel
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 ATTRIB_ID
          id of attribute linking matrix rows to measurement model attributes for matrices i.e., this attribute is stored as part of the measurement model node, and references information through this MatrixCell
static String COL_ID
          the column id is null for continuous SMVs, is SMV Category ID for discrete SMVs for a scoring matrix is the id of the observable variables for a design matrix
static String MATRIX_DESCRIPTION
           
static String ROW_ID
          row id, which is the attribute ID for the observable variable category or, for covar matrix, for SMV id
static String VALUE
           
 
Fields inherited from class com.jcorporate.expresso.core.dbobj.RowSecuredDBObject
DEFAULT_PERMISSION_CODE
 
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
MatrixCell()
           
MatrixCell(Attribute attrib, String columnId, int rowId, String value)
          constructor for new cell
MatrixCell(DBConnection theConnection, int theUser)
          Constructor
MatrixCell(ReadOnlyUser userSecurity)
          Constructor for security setup.
MatrixCell(String attribId)
           
 
Method Summary
 Attribute getAttrib(ControllerRequest request)
           
 String getAttribId()
           
 String getColumnId()
           
 Attribute getOVCat()
          will throw if OV Category not found
 String getOVCatId()
           
 String getRowId()
           
 Node getSMV()
          will throw if SMV not found
 Node getSMV(ControllerRequest request)
          will throw if SMV not found
 String getSMVId()
           
 String getValue()
           
 void setAttribID(String attribId)
           
 void setColId(String colId)
           
 void setRowId(int rowId)
           
 void setRowId(String rowId)
           
protected  void setupFields()
          Defines the database table name and fields for this DB object
 void setValue(String value)
           
 
Methods inherited from class com.jcorporate.expresso.core.dbobj.RowSecuredDBObject
add, add, addGroupPerm, canRequesterAdministrate, canRequesterRead, canRequesterWrite, checkDeleteDetailPerm, checkKeyLength, defaultGroup, defaultPermissions, delete, deleteAll, find, getAdministrateGroups, getGroups, getPermissions, getReadGroups, getWriteGroups, isAdminGroup, isReadGroup, isRowAllowed, isRowAllowed, isWriteGroup, ownerID, removeGroup, retrieve, searchAndRetrieveList, searchAndRetrieveList, setPermissions, setPermissions, update
 
Methods inherited from class com.jcorporate.expresso.core.dbobj.SecuredDBObject
canRequesterAdd, canRequesterDelete, canRequesterUpdate, checkAllowed, copyAttributes, count, createSecurityCache, delete, getRequestingUid, getRequestingUser, getString, getString, getString, getString, getString, getString, getSystemUid, instantiate, isAllowed, search, setRequestingUid, setRequestingUser
 
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, checkField, checkMutable, checkRef, checkRef, clear, clearDistinctFields, clearError, clearFieldsToInput, clearFieldsToRetrieve, clearSortKeys, clone, containsWildCards, copyAllFields, deleteAll, deleteDetails, denotesRange, equals, fetchImmut, fetchImmutable, forKey, formatDateTime, get, getAllAttributes, getAttribute, getAttributesIterator, getBooleanFieldValue, getCacheSize, getCacheStatsMap, getCacheUtil, getCheckZeroUpdate, getCustomWhereClause, getDataContext, getDataField, getDataTransferObject, getDBName, getDetails, getDistinctFieldCount, getDistinctFields, getField, 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, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ATTRIB_ID

public static final String ATTRIB_ID
id of attribute linking matrix rows to measurement model attributes for matrices i.e., this attribute is stored as part of the measurement model node, and references information through this MatrixCell

See Also:
Constant Field Values

ROW_ID

public static final String ROW_ID
row id, which is the attribute ID for the observable variable category or, for covar matrix, for SMV id

See Also:
Constant Field Values

COL_ID

public static final String COL_ID
the column id is null for continuous SMVs, is SMV Category ID for discrete SMVs for a scoring matrix is the id of the observable variables for a design matrix

See Also:
Constant Field Values

VALUE

public static final String VALUE
See Also:
Constant Field Values

MATRIX_DESCRIPTION

public static final String MATRIX_DESCRIPTION
See Also:
Constant Field Values
Constructor Detail

MatrixCell

public MatrixCell()
           throws DBException
Throws:
DBException - If the new object cannot be created

MatrixCell

public MatrixCell(Attribute attrib,
                  String columnId,
                  int rowId,
                  String value)
           throws DBException
constructor for new cell

Parameters:
attrib - existing attribute for matrix, or null if new
columnId - is either at the node ID for the student model variable (scoring matrix) or the attribute ID for the category (design matrix)
Throws:
DBException - If the new object cannot be created

MatrixCell

public MatrixCell(String attribId)
           throws DBException
Throws:
DBException

MatrixCell

public MatrixCell(DBConnection theConnection,
                  int theUser)
           throws DBException
Constructor

Parameters:
theConnection - DBConnection to be used to communicate with the database
theUser - User name attempting to access the object
Throws:
DBException - If the user cannot access this object or the object cannot be initialized

MatrixCell

public MatrixCell(ReadOnlyUser userSecurity)
           throws DBException
Constructor for security setup.

Parameters:
userSecurity - ReadOnlyUser security context.
Throws:
DBException - upon construction error.
Method Detail

setupFields

protected void setupFields()
                    throws DBException
Defines the database table name and fields for this DB object

Overrides:
setupFields in class DBObject
Throws:
DBException - if the operation cannot be performed

getAttribId

public String getAttribId()
                   throws DBException
Returns:
this cells attrib number which specifies its membership in a matrix (same attrib id for all cells)
Throws:
DBException

getValue

public String getValue()
                throws DBException
Throws:
DBException

getOVCatId

public String getOVCatId()
                  throws DBException
Throws:
DBException

getSMVId

public String getSMVId()
                throws DBException
Returns:
ID for student model variable, which is stored in the "COL_ID" field for scoring matrices
Throws:
DBException

getSMV

public Node getSMV(ControllerRequest request)
            throws DBException
will throw if SMV not found

Throws:
DBException

getSMV

public Node getSMV()
            throws DBException
will throw if SMV not found

Throws:
DBException

getOVCat

public Attribute getOVCat()
                   throws DBException
will throw if OV Category not found

Throws:
DBException

getColumnId

public String getColumnId()
                   throws DBException
Returns:
column id for this cell. for a scoring matrix, this is equivalent to getSMVId(); for a design matrix, this is a OVCat ID, but not to be confused with the other dimension
Throws:
DBException

getRowId

public String getRowId()
                throws DBException
Returns:
row id. must be an integer.
Throws:
DBException

getAttrib

public Attribute getAttrib(ControllerRequest request)
                    throws DBException
Throws:
DBException

setValue

public void setValue(String value)
              throws DBException
Throws:
DBException

setColId

public void setColId(String colId)
              throws DBException
Throws:
DBException

setRowId

public void setRowId(String rowId)
              throws DBException
Throws:
DBException

setRowId

public void setRowId(int rowId)
              throws DBException
Throws:
DBException

setAttribID

public void setAttribID(String attribId)
                 throws DBException
Throws:
DBException


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