Expresso 5-5-0

com.jcorporate.expresso.services.dbobj
Class RowGroupPerms

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.services.dbobj.RowGroupPerms
All Implemented Interfaces:
Cacheable, ContextNested, DataObject, LookupInterface, Serializable

public class RowGroupPerms
extends DBObject

storage for read/write permissions for a group, concerning a given row in the database this object and its table are a complement to the RowPermissions object and table. RowGroupPerms holds group permissions. this object and its table should be manipulated only through RowSecuredDBObject

Author:
larry hamel
See Also:
RowSecuredDBObject, RowPermissions, Serialized Form

Nested Class Summary
 
Nested classes inherited from class com.jcorporate.expresso.core.dbobj.DBObject
DBObject.FieldError, DBObject.FieldUpdate
 
Field Summary
static String GROUP
          field name for the group about which "group privilege settings" (read/write) apply
static String GROUP_PERMISSIONS_TABLE_NAME
           
static String PERMISSIONS
          field name for bits that make up permissions
static String ROW_KEY
          field name for primary key of row
static String TABLE_NAME
          field name for name of table
 
Fields inherited from class com.jcorporate.expresso.core.dbobj.DBObject
ATTRIBUTE_ERROR, ATTRIBUTE_ERROR_MESSAGE, ATTRIBUTE_PAGE_LIMIT, BIG_DECIMAL_ZERO, EMAIL_MASK, FLOAT_MASK, INT_MASK, IS_CHECK_RELATIONAL_INTEGRITY
 
Fields inherited from class com.jcorporate.expresso.core.dataobjects.jdbc.JDBCDataObject
anyFieldsDistinct, anyFieldsToRetrieve, appendCustomWhere, caseSensitiveQuery, customWhereClause, dbKey, distinctFields, localConnection, maxRecords, myClassName, myUpdates, offsetRecord, recordSet, retrieveFields, sMetadataMap, sortKeys
 
Fields inherited from class com.jcorporate.expresso.core.dataobjects.BaseDataObject
currentStatus
 
Fields inherited from interface com.jcorporate.expresso.core.dataobjects.DataObject
STATUS_CURRENT, STATUS_DELETED, STATUS_NEW, STATUS_UPDATED
 
Constructor Summary
RowGroupPerms()
           
RowGroupPerms(String table, String rowKey)
           
 
Method Summary
 boolean canGroupAdministrate()
           
 boolean canGroupRead()
           
 boolean canGroupWrite()
           
 String group()
           
 void group(String group)
          Set group; will throw run-time exception if the entire key for this row, which includes tablename, row key, and group name, is longer than permitted maximum for the host database.
 int permissions()
          set permissions; not protected by test
 void permissions(int perm)
          set permissions
 void setDefaultPermissions()
          set group group is "Everybody" just sets fields--does not save; caller must call update()
protected  void setupFields()
          override in subclesses, and be sure to call this as first line of override
 
Methods inherited from class com.jcorporate.expresso.core.dbobj.DBObject
add, addCacheEventListener, addDetail, addField, addField, addFieldError, addFoundKeys, addIfNeeded, addIndex, addKey, addOrUpdate, addSortKey, addToCache, addTransition, addVirtualField, addVirtualField, addVirtualField, addVirtualField, allowsNull, average, basicAdd, checkAllowed, checkAllReferredToBy, checkAllRefs, checkAllRefsPublic, checkDeleteDetailPerm, checkField, checkRef, checkRef, clear, clearDistinctFields, clearError, clearFieldsToRetrieve, clearSortKeys, containsWildCards, copyAttributes, count, delete, delete, deleteAll, deleteDetails, denotesRange, disableLogging, enableLogging, equals, find, forKey, formatDateTime, get, getAllAttributes, getAllDBFields, getAllFields, getAllFieldsIterator, getAllFieldsMap, getAllKeys, getAllKeysIterator, getAllKeysMap, getAttribute, getAttribute, getAttributesIterator, getBinaryField, getBooleanFieldValue, getCacheSize, getCacheStats, getCacheStatsMap, getCharset, getCheckZeroUpdate, getCustomWhereClause, getDataContext, getDataField, getDataTransferObject, getDBName, getDefaultValue, getDescription, getDescription, getDetailFieldsForeign, getDetailFieldsLocal, getDetails, getDistinctFieldCount, getDistinctFieldList, getDistinctFields, getField, getFieldBigDecimal, getFieldBoolean, getFieldByte, getFieldData, getFieldDate, getFieldDecimalFormatted, getFieldDouble, getFieldErrorMessage, getFieldFloat, getFieldInt, getFieldList, getFieldListArray, getFieldListIterator, getFieldLong, getFieldMetaData, getFields, getFieldShort, getFieldsToRetrieveCount, getFilterClass, getFoundCount, getFoundKeys, getFoundKeysArray, getIndexArray, getISOValuesDefault, getISOValuesDefault, getISOValuesDefault, getKey, getKeyFieldList, getKeyFieldListArray, getKeyFieldListIterator, getLength, getLengthInt, getLimitationPosition, getLimitationSyntax, getLocalConnection, getLocale, getLookupObject, getMax, getMax, getMaxRecords, getMyKeys, getMyUpdates, getMyUpdatesArray, getName, getOffsetRecord, getOriginalDBName, getPatternMatcher, getPrecision, getRecordSet, getRecordSetArrayList, getSchema, getSerializedForm, getStringFilter, getTableName, getTargetTable, getThisDBbj, getThisDBObj, getTransitionsIterator, getType, getValidValueDescrip, getValidValues, getValidValuesList, getValues, getValuesDefault, getValuesDefault, getValuesDefault, hasError, hasErrors, hasField, hasIndex, haveAllKeys, initialize, isCached, isDateType, isDistinct, isEmpty, isField, isFieldDistinct, isFieldIgnoreCase, isFieldNull, isFieldsToRetrieve, isFieldToRetrieve, isMultiValued, isNumericType, isQuotedType, isReadOnly, isSecret, isVirtual, loadFromConnection, logChange, max, min, newInstance, noNewLine, noQuotes, notifyListeners, populateDefaultValues, referredToBy, removeAttribute, removeAttribute, removeFromCache, retrieve, retrieveFromCache, saveBinaryField, saveBinaryField, search, search, searchAndRetrieveList, searchAndRetrieveList, set, setAttribute, setAttribute, setCacheSize, setCharset, setCheckZeroUpdate, setConnection, setConnection, setCustomWhereClause, setCustomWhereClause, setDataContext, setDataField, setDataTransferObject, setDefaultValue, setDescription, setField, setField, setField, setField, setField, setField, setField, setField, setField, setFieldData, setFieldDistinct, setFieldsToRetrieve, setFilterClass, setFilterClass, setKeys, setLocale, setLookupField, setLookupObject, setMask, setMaxRecords, setMultiValued, setName, setOffsetRecord, setReadOnly, setSchema, setSchema, setSecret, setSortKey, setStringFilter, setStringFiltersOnAll, setTargetTable, sqlAggrFunction, sum, toDebugString, update, update, verify
 
Methods inherited from class com.jcorporate.expresso.core.dataobjects.jdbc.JDBCDataObject
buildWhereClause, buildWhereClauseBuffer, checkZeroUpdate, constructNewMetaData, createAndExecuteSearch, getConnectionPool, getCustomStringFieldValue, getDef, getDistinctFieldArrayList, getExecutor, getFieldsToRetrieveIterator, getJDBCMetaData, getJDBCUtil, getMappedDataContext, getMetaData, getQueryInterface, getSerialForm, loadFromConnection, makeLimitationStub, quoteIfNeeded, selectFieldString, setCaseSensitiveQuery, setDBConnectionPool, setDBName, setMappedDataContext, setOriginalDBName
 
Methods inherited from class com.jcorporate.expresso.core.dataobjects.BaseDataObject
getStatus, setStatus
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GROUP_PERMISSIONS_TABLE_NAME

public static final String GROUP_PERMISSIONS_TABLE_NAME
See Also:
Constant Field Values

TABLE_NAME

public static final String TABLE_NAME
field name for name of table

See Also:
Constant Field Values

ROW_KEY

public static final String ROW_KEY
field name for primary key of row

See Also:
Constant Field Values

GROUP

public static final String GROUP
field name for the group about which "group privilege settings" (read/write) apply

See Also:
Constant Field Values

PERMISSIONS

public static final String PERMISSIONS
field name for bits that make up permissions

See Also:
Constant Field Values
Constructor Detail

RowGroupPerms

public RowGroupPerms()
              throws DBException

RowGroupPerms

public RowGroupPerms(String table,
                     String rowKey)
              throws DBException
Method Detail

canGroupAdministrate

public boolean canGroupAdministrate()
                             throws DBException
Throws:
DBException

canGroupRead

public boolean canGroupRead()
                     throws DBException
Throws:
DBException

canGroupWrite

public boolean canGroupWrite()
                      throws DBException
Throws:
DBException

setupFields

protected void setupFields()
                    throws DBException
override in subclesses, and be sure to call this as first line of override

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

group

public String group()
             throws DBException
Throws:
DBException

group

public void group(String group)
           throws DBException
Set group; will throw run-time exception if the entire key for this row, which includes tablename, row key, and group name, is longer than permitted maximum for the host database.

Parameters:
group - the group string?
Throws:
DBException - upon error

setDefaultPermissions

public void setDefaultPermissions()
                           throws DBException
set group group is "Everybody" just sets fields--does not save; caller must call update()

Throws:
DBException - upon error

permissions

public void permissions(int perm)
                 throws DBException
set permissions

Parameters:
perm - Permissions code
Throws:
DBException - upon error

permissions

public int permissions()
                throws DBException
set permissions; not protected by test

Returns:
integer permission code
Throws:
DBException - upon error

Expresso 5-5-0

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