Module org.tentackle.persistence
Package org.tentackle.persist.security
Class SecurityPersistenceImpl
- java.lang.Object
-
- org.tentackle.dbms.AbstractDbObject<P>
-
- org.tentackle.persist.AbstractPersistentObject<Security,SecurityPersistenceImpl>
-
- org.tentackle.persist.security.SecurityPersistenceImpl
-
- All Implemented Interfaces:
Serializable,Cloneable,Comparable<SecurityPersistenceImpl>,ModificationLoggable,org.tentackle.misc.Identifiable,org.tentackle.misc.Immutable,org.tentackle.misc.Modifiable,org.tentackle.misc.SerialNumbered,org.tentackle.misc.Snapshotable<Security>,DomainContextDependable,DomainContextProvider,PdoMethodCacheProvider<Security>,PdoProvider<Security>,PersistenceDelegate<Security>,PersistentObject<Security>,ProxyDelegate<Security>,org.tentackle.reflect.EffectiveClassProvider<Security>,org.tentackle.reflect.Interceptable,SecurityPersistence,org.tentackle.session.SessionDependable,org.tentackle.session.SessionProvider,org.tentackle.validate.ScopeConfigurator,org.tentackle.validate.Validateable
@PersistentObjectService(org.tentackle.security.pdo.Security.class) public class SecurityPersistenceImpl extends AbstractPersistentObject<Security,SecurityPersistenceImpl> implements SecurityPersistence
Security rule persistence implementation.- Author:
- harald
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static PersistentObjectClassVariables<Security,SecurityPersistenceImpl>CLASSVARIABLESVariables common to all instances of SecurityPersistenceImpl.static StringCN_ALLOWEDdatabase column name for 'allowed'.static StringCN_DOMAINCONTEXTCLASSIDdatabase column name for 'domainContextClassId'.static StringCN_DOMAINCONTEXTIDdatabase column name for 'domainContextId'.static StringCN_GRANTEECLASSIDdatabase column name for 'granteeClassId'.static StringCN_GRANTEEIDdatabase column name for 'granteeId'.static StringCN_MESSAGEdatabase column name for 'message'.static StringCN_OBJECTCLASSIDdatabase column name for 'objectClassId'.static StringCN_OBJECTCLASSNAMEdatabase column name for 'objectClassName'.static StringCN_OBJECTIDdatabase column name for 'objectId'.static StringCN_PERMISSIONSdatabase column name for 'permissions'.static StringCN_PRIORITYdatabase column name for 'priority'.-
Fields inherited from class org.tentackle.persist.AbstractPersistentObject
AN_EDITEDBY, AN_EDITEDEXPIRY, AN_EDITEDSINCE, AN_NORMTEXT, AN_ROOTCLASSID, AN_ROOTID, CN_EDITEDBY, CN_EDITEDEXPIRY, CN_EDITEDSINCE, CN_NORMTEXT, CN_ROOTCLASSID, CN_ROOTID, TX_DELETE_ALL_IN_CONTEXT, TX_SAVE_COPY_IN_CONTEXT, TX_TRANSFER_TOKENLOCK, TX_UPDATE_TOKENLOCK, TX_UPDATE_TOKENLOCK_ONLY
-
Fields inherited from class org.tentackle.dbms.AbstractDbObject
AN_CLASSID, AN_ID, AN_SERIAL, AN_TABLESERIAL, CN_CLASSID, CN_ID, CN_SERIAL, CN_TABLESERIAL, TX_DELETE_LIST, TX_DELETE_MISSING_IN_LIST, TX_DELETE_OBJECT, TX_DUMMY_UPDATE, TX_INSERT_OBJECT, TX_INSERT_PLAIN, TX_SAVE, TX_SAVE_LIST, TX_SYNC, TX_UPDATE_OBJECT, TX_UPDATE_PLAIN, TX_UPDATE_SERIAL, TX_UPDATE_SERIAL_AND_TABLESERIAL, TX_UPDATE_TABLESERIAL
-
Fields inherited from interface org.tentackle.security.pdo.SecurityPersistence
AN_ALLOWED, AN_DOMAINCONTEXTCLASSID, AN_DOMAINCONTEXTID, AN_GRANTEECLASSID, AN_GRANTEEID, AN_MESSAGE, AN_OBJECTCLASSID, AN_OBJECTCLASSNAME, AN_OBJECTID, AN_PERMISSIONS, AN_PRIORITY, CL_OBJECTCLASSNAME, CL_PERMISSIONS
-
-
Constructor Summary
Constructors Constructor Description SecurityPersistenceImpl()Creates a security rule without domain context or session.SecurityPersistenceImpl(Security pdo)Creates a security rule without domain context or session.SecurityPersistenceImpl(Security pdo, DomainContext context)Creates a security rule.SecurityPersistenceImpl(Security pdo, org.tentackle.session.Session session)Creates a security rule with a session only.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidassertRemoteSecurityManagerInitialized()voidassertRootContextIsAccepted()Checks the root context agains the security rules.StringcreateInsertSql()StringcreateUpdateSql()intdeleteByDomainContext(int domainContextClassId, long domainContextId)intdeleteByGrantee(int granteeClassId, long granteeId)intdeleteByObject(int objectClassId, long objectId)intdeleteByObjectClass(String objectClassName)booleanexpireCache(long maxSerial)Expires the cache according to the serial numbers.
If objects of this class are cached, the cache must be expired on updates, etc...PdoCache<Security>getCache()Gets the cache.PersistentObjectClassVariables<Security,SecurityPersistenceImpl>getClassVariables()Gets the application oriented class variables for this object.
Class variables for classes derived from AbstractPersistentObject are kept in an instance ofPersistentObjectClassVariables.intgetDomainContextClassId()longgetDomainContextId()PersistentDomainObject<?>getDomainContextObject()Gets the application context's object.
The object will be loaded in its valid context.voidgetFields(ResultSetWrapper rs)PersistentDomainObject<?>getGrantee()Gets the grantee.intgetGranteeClassId()longgetGranteeId()StringgetMessage()PersistentDomainObject<?>getObject()Gets the object this rule applies to.
The object is retrieved in its valid context.Class<?>getObjectClass()intgetObjectClassId()StringgetObjectClassName()longgetObjectId()StringgetPermissions()intgetPriority()org.tentackle.persist.security.rmi.SecurityRemoteDelegategetRemoteDelegate()booleanisAllowed()booleanisCountingModification(ModificationType modType)booleanisReadAllowed()Determines whether the application is allowed to read this PDO.
Makes no sense to publish in PersistentObject because PDOs without read permissions are not read from the database at all.booleanisRootEntity()booleanisTracked()StringorderBy()Gets the natural ordering to be added in WHERE-clauses following "ORDER BY ".protected voidrevertAttributesToSnapshot(SecurityPersistenceImpl snapshot)Copies all attributes from a snapshot back to this object.List<Security>selectAllCached()Gets all objects in context via cache.org.tentackle.misc.TrackedList<Security>selectByDomainContext(int domainContextClassId, long domainContextId)List<Security>selectByGrantee(int granteeClassId, long granteeId)org.tentackle.misc.TrackedList<Security>selectByObject(int objectClassId, long objectId)org.tentackle.misc.TrackedList<Security>selectByObjectClass(String objectClassName)SecurityselectCached(long id)Gets the object via cache.
If there is no cache (i.e.SecurityselectCachedOnly(long id)Gets the object via cache only.
If there is no cache (i.e.voidsetAllowed(boolean allowed)voidsetDomainContextClassId(int domainContextClassId)voidsetDomainContextId(long domainContextId)voidsetDomainContextObject(PersistentDomainObject<?> contextObject)Sets the application context's object.intsetFields(PreparedStatementWrapper st)voidsetGrantee(PersistentDomainObject<?> grantee)Sets the grantee.voidsetGranteeClassId(int granteeClassId)voidsetGranteeId(long granteeId)voidsetMessage(String message)voidsetObject(PersistentDomainObject<?> object)Sets the object this rule applies to.
Setting the null object also clears the objectClass making the rule invalid.voidsetObjectClassId(int objectClassId)voidsetObjectClassName(String objectClassName)voidsetObjectId(long objectId)voidsetPermissions(String permissions)voidsetPriority(int priority)StringtoString()for debugging only-
Methods inherited from class org.tentackle.persist.AbstractPersistentObject
addComponents, addComponents, addReferencingClass, addSnapshot, applyTokenLockInfo, assertDomainContextMutable, assertMutable, assertNormTextProvided, assertNotAbstract, assertNotCached, assertPersistable, assertReadPermission, assertRootContext, assertRootEntity, assertTokenLockProvided, assertValidSnapshot, assertWritePermission, clearTokenLock, clone, configureRemoteObject, configureRemoteObjects, containsPattern, copy, countModification, createAttributesInSnapshot, createAttributesNormText, createComponentsInSnapshot, createDummyUpdateSql, createPropertySupport, createRelationsNormText, createSelectAllByIdInnerSql, createSelectAllIdSerialInnerSql, createSelectAllInnerSql, createSelectAllSql, createSelectAllWithExpiredTableSerialsSql, createSelectByNormTextSql, createSelectExpiredTableSerials1Sql, createSelectExpiredTableSerials2Sql, createSelectIdInnerSql, createSelectIdInnerSql, createSelectIdInnerSql, createSelectMaxIdSql, createSelectMaxTableSerialSql, createSelectSerialSql, createSelectTokenLockSql, createSnapshot, createTransferTokenLockSql, createTransferTokenLockWithTableSerialSql, createUpdateSerialAndTableSerialSql, createUpdateSerialSql, createUpdateTokenLockOnlySql, createUpdateTokenLockSql, createUpdateTokenLockWithCountSql, createValidContext, delete, delete, delete, deleteImpl, deleteImpl, deleteMissingInCollection, deleteObject, deletePlainWithComponents, deletePlainWithComponents, derivePdoFromPo, determineContextId, discardSnapshot, discardSnapshots, executeFirstPdoQuery, executeFirstPdoQuery, executeListQuery, executeListQuery, executeQueryToList, executeQueryToList, executeTrackedListQuery, executeTrackedListQuery, findDuplicate, finishModification, finishNotUpdated, getBaseContext, getBatchablePreparedStatement, getCacheAccessCount, getCacheAccessTime, getColumnName, getContextId, getContextUserId, getDefaultScopes, getDomainContext, getDomainDelegate, getEagerJoinedSelect, getEagerJoins, getEditedBy, getEditedExpiry, getEditedSince, getEffectiveClass, getEffectiveSuperClasses, getNormText, getPdo, getPdoClass, getPdoMethodCache, getPersistenceClass, getRootClassId, getRootId, getSecurityResult, getSnapshots, getSqlClassIdCondition, getSqlContextCondition, getTableAlias, getTableName, getTokenLockObject, getTokenLockTimeout, getTopSuperTableAlias, getTopSuperTableName, getTransientData, getValidClassId, initModification, insertImpl, insertObject, insertPlainWithComponents, insertPlainWithComponents, isAbstract, isCacheable, isCached, isClassIdRequiredInWhereClause, isComposite, isCopy, isCountingModificationForTokenLock, isDomainContextImmutable, isEditAllowed, isExpired, isExplicitIdAliasRequiredInJoins, isModified, isNormTextProvided, isPermissionAccepted, isPersistable, isReferenced, isRenewTokenLockRequested, isRootClassIdProvided, isRootEntityOf, isRootIdProvided, isSnapshot, isTokenLockableByMe, isTokenLocked, isTokenLockedBy, isTokenLockedByMe, isTokenLockProvided, isUpdateNecessary, isUpdatingSerialEvenIfNotModified, isValidated, isViewAllowed, isWriteAllowed, loadComponents, markCacheAccess, markDeleted, markDeleted, me, newId, persist, persistImpl, persistTokenLocked, readFromResultSetWrapper, readJoinedRow, releaseTokenLock, reload, reloadForUpdate, removeReferencingClass, requestTokenLock, resultAll, resultAllCursor, resultAllWithExpiredTableSerials, resultByNormText, resultByNormTextCursor, revertAttributesToSnapshot, revertComponentsToSnapshot, revertToSnapshot, save, save, save, saveImpl, select, select, selectAll, selectAllAsCursor, selectAllForCache, selectAllWithExpiredTableSerials, selectByNormText, selectByNormTextAsCursor, selectByTemplate, selectForCache, selectForUpdate, setClassIdsInStatement, setCopy, setDomainContext, setDomainContextImmutable, setEditedBy, setEditedExpiry, setEditedSince, setExpired, setModified, setNormText, setPdo, setPersistable, setRenewTokenLockRequested, setRootClassId, setRootId, setTokenLockObject, setTransientData, transferTokenLock, updateImpl, updateNormText, updateObject, updateRootContext, updateTokenLock, updateTokenLock, updateTokenLockOnly, validate, validate
-
Methods inherited from class org.tentackle.dbms.AbstractDbObject
acceptPersistenceVisitor, addPropertyListener, addPropertyListener, alignComponents, assertNew, assertNotNew, assertNotOverloaded, assertNotRemote, assertNumberOfRowsAffected, assertRemote, assertThisRowAffected, attributesModified, clearOnRemoteSave, compareTo, createAttributesInSnapshot, createDeleteAllSql, createDeleteSql, createPreparedStatement, createPreparedStatement, createSelectObjectsWithExpiredTableSerialsSql, createSelectSql, createSqlUpdate, createUpdateAndSetSerialSql, deletePlain, deleteReferencedRelations, deleteReferencingRelations, differsPersisted, dummyUpdate, equals, firePropertyChange, getBackend, getClassBaseName, getClassId, getColumnCount, getExpirationBacklog, getExpiredTableSerials, getId, getIdSource, getImmutableLoggingLevel, getModificationCount, getModificationLog, getPreparedStatement, getPreparedStatement, getPropertySupport, getSerial, getSession, getSessionHolder, getTableSerial, hashCode, insertPlain, isDeleted, isEntity, isFinallyImmutable, isForcedModified, isFromThisJVM, isIdValid, isImmutable, isLoggingModification, isModified, isNew, isOverloadable, isRemovable, isSessionImmutable, isStatementAlwaysPrepared, isTableSerialProvided, isVirgin, loadLazyReferences, logModification, markDeleted, newInstance, newInstance, newInstance, persistObject, prepareDelete, prepareSave, prepareSetFields, reloadObject, reloadObjectForUpdate, removeAllPropertyListeners, removePropertyListener, removePropertyListener, reserveId, reserveId, resultAllIdSerial, resultAllObjects, resultObjectsWithExpiredTableSerials, revertAttributesToSnapshot, saveObject, saveReferencedRelations, saveReferencingRelations, selectAllIdSerial, selectAllObjects, selectExpiredTableSerials, selectExpiredTableSerials, selectMaxId, selectMaxTableSerial, selectNextObject, selectObject, selectObjectForUpdate, selectObjectsWithExpiredTableSerials, selectSerial, setClassId, setFinallyImmutable, setId, setImmutable, setImmutableLoggingLevel, setModificationLog, setOverloadable, setSerial, setSession, setSessionHolder, setSessionImmutable, setStatementAlwaysPrepared, setTableSerial, toGenericString, toIdString, unmarkDeleted, updatePlain, updateSerial, updateSerial, updateSerialAndTableSerial
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.tentackle.pdo.DomainContextDependable
createValidContext, determineContextId, getBaseContext, getContextId, isDomainContextImmutable, setDomainContext, setDomainContextImmutable
-
Methods inherited from interface org.tentackle.pdo.DomainContextProvider
getDomainContext, on, op
-
Methods inherited from interface org.tentackle.misc.Immutable
getImmutableLoggingLevel, isFinallyImmutable, isImmutable, setFinallyImmutable, setImmutable, setImmutableLoggingLevel
-
Methods inherited from interface org.tentackle.dbms.ModificationLoggable
createModificationLog
-
Methods inherited from interface org.tentackle.pdo.PdoProvider
getPdo, on
-
Methods inherited from interface org.tentackle.pdo.PersistenceDelegate
getDomainDelegate
-
Methods inherited from interface org.tentackle.pdo.PersistentObject
attributesModified, containsPattern, delete, differsPersisted, findDuplicate, getCacheAccessCount, getCacheAccessTime, getClassBaseName, getClassId, getEditedBy, getEditedExpiry, getEditedSince, getExpiredTableSerials, getId, getModificationCount, getNormText, getRootClassId, getRootId, getSecurityResult, getSerial, getTableName, getTableSerial, getTokenLockObject, getTokenLockTimeout, isAbstract, isCacheable, isCached, isComposite, isDeleted, isEditAllowed, isExpired, isNew, isNormTextProvided, isPermissionAccepted, isPersistable, isReferenced, isRemovable, isRootClassIdProvided, isRootEntityOf, isRootIdProvided, isTableSerialProvided, isTokenLockableByMe, isTokenLocked, isTokenLockedBy, isTokenLockedByMe, isTokenLockProvided, isValidated, isViewAllowed, isWriteAllowed, loadComponents, markCacheAccess, persist, persistTokenLocked, releaseTokenLock, reload, reloadForUpdate, requestTokenLock, reserveId, reserveId, save, select, selectAll, selectAllAsCursor, selectAllForCache, selectAllIdSerial, selectAllWithExpiredTableSerials, selectByNormText, selectByNormTextAsCursor, selectExpiredTableSerials, selectExpiredTableSerials, selectForCache, selectForUpdate, selectMaxId, selectMaxTableSerial, selectSerial, setExpired, toIdString, transferTokenLock, validate
-
Methods inherited from interface org.tentackle.pdo.ProxyDelegate
me
-
Methods inherited from interface org.tentackle.session.SessionDependable
isSessionImmutable, setSession, setSessionImmutable
-
-
-
-
Field Detail
-
CLASSVARIABLES
public static final PersistentObjectClassVariables<Security,SecurityPersistenceImpl> CLASSVARIABLES
Variables common to all instances of SecurityPersistenceImpl.
-
CN_OBJECTCLASSNAME
public static final String CN_OBJECTCLASSNAME
database column name for 'objectClassName'.- See Also:
- Constant Field Values
-
CN_OBJECTCLASSID
public static final String CN_OBJECTCLASSID
database column name for 'objectClassId'.- See Also:
- Constant Field Values
-
CN_OBJECTID
public static final String CN_OBJECTID
database column name for 'objectId'.- See Also:
- Constant Field Values
-
CN_DOMAINCONTEXTCLASSID
public static final String CN_DOMAINCONTEXTCLASSID
database column name for 'domainContextClassId'.- See Also:
- Constant Field Values
-
CN_DOMAINCONTEXTID
public static final String CN_DOMAINCONTEXTID
database column name for 'domainContextId'.- See Also:
- Constant Field Values
-
CN_GRANTEECLASSID
public static final String CN_GRANTEECLASSID
database column name for 'granteeClassId'.- See Also:
- Constant Field Values
-
CN_GRANTEEID
public static final String CN_GRANTEEID
database column name for 'granteeId'.- See Also:
- Constant Field Values
-
CN_PRIORITY
public static final String CN_PRIORITY
database column name for 'priority'.- See Also:
- Constant Field Values
-
CN_PERMISSIONS
public static final String CN_PERMISSIONS
database column name for 'permissions'.- See Also:
- Constant Field Values
-
CN_ALLOWED
public static final String CN_ALLOWED
database column name for 'allowed'.- See Also:
- Constant Field Values
-
CN_MESSAGE
public static final String CN_MESSAGE
database column name for 'message'.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SecurityPersistenceImpl
public SecurityPersistenceImpl(Security pdo, DomainContext context)
Creates a security rule.- Parameters:
pdo- the security PDOcontext- the domain context
-
SecurityPersistenceImpl
public SecurityPersistenceImpl(Security pdo, org.tentackle.session.Session session)
Creates a security rule with a session only.- Parameters:
pdo- the security PDOsession- the session
-
SecurityPersistenceImpl
public SecurityPersistenceImpl(Security pdo)
Creates a security rule without domain context or session.- Parameters:
pdo- the security PDO
-
SecurityPersistenceImpl
public SecurityPersistenceImpl()
Creates a security rule without domain context or session.
-
-
Method Detail
-
getClassVariables
public PersistentObjectClassVariables<Security,SecurityPersistenceImpl> getClassVariables()
Description copied from class:AbstractPersistentObjectGets the application oriented class variables for this object.
Class variables for classes derived from AbstractPersistentObject are kept in an instance ofPersistentObjectClassVariables.- Overrides:
getClassVariablesin classAbstractPersistentObject<Security,SecurityPersistenceImpl>- Returns:
- the class variables
- See Also:
AbstractDbObject.getClassVariables()
-
getObject
public PersistentDomainObject<?> getObject()
Gets the object this rule applies to.
The object is retrieved in its valid context.- Specified by:
getObjectin interfaceSecurityPersistence- Returns:
- the object, null if none (class rule)
-
assertRootContextIsAccepted
public void assertRootContextIsAccepted()
Description copied from class:AbstractPersistentObjectChecks the root context agains the security rules.- Overrides:
assertRootContextIsAcceptedin classAbstractPersistentObject<Security,SecurityPersistenceImpl>
-
setObject
public void setObject(PersistentDomainObject<?> object)
Sets the object this rule applies to.
Setting the null object also clears the objectClass making the rule invalid.- Specified by:
setObjectin interfaceSecurityPersistence- Parameters:
object- the object, null to clear
-
getGrantee
public PersistentDomainObject<?> getGrantee()
Gets the grantee.- Specified by:
getGranteein interfaceSecurityPersistence- Returns:
- the grantee, null if grant class
-
setGrantee
public void setGrantee(PersistentDomainObject<?> grantee)
Sets the grantee.- Specified by:
setGranteein interfaceSecurityPersistence- Parameters:
grantee- the grantee, null to clear (all)
-
getDomainContextObject
public PersistentDomainObject<?> getDomainContextObject()
Gets the application context's object.
The object will be loaded in its valid context.- Specified by:
getDomainContextObjectin interfaceSecurityPersistence- Returns:
- the context object, null if no context (all)
-
setDomainContextObject
public void setDomainContextObject(PersistentDomainObject<?> contextObject)
Sets the application context's object.- Specified by:
setDomainContextObjectin interfaceSecurityPersistence- Parameters:
contextObject- the context object, null to clear (all)
-
toString
public String toString()
for debugging only- Overrides:
toStringin classAbstractDbObject<SecurityPersistenceImpl>
-
assertRemoteSecurityManagerInitialized
public void assertRemoteSecurityManagerInitialized()
- Specified by:
assertRemoteSecurityManagerInitializedin interfaceSecurityPersistence
-
getObjectClass
public Class<?> getObjectClass()
- Specified by:
getObjectClassin interfaceSecurityPersistence
-
getCache
public PdoCache<Security> getCache()
Description copied from class:AbstractPersistentObjectGets the cache. The default implementation returns null. Must be overridden to enable optimization features with RMI servers.- Specified by:
getCachein interfacePersistentObject<Security>- Overrides:
getCachein classAbstractPersistentObject<Security,SecurityPersistenceImpl>- Returns:
- the cache, null if uncached
-
isCountingModification
public boolean isCountingModification(ModificationType modType)
- Overrides:
isCountingModificationin classAbstractDbObject<SecurityPersistenceImpl>
-
isReadAllowed
public boolean isReadAllowed()
Description copied from class:AbstractPersistentObjectDetermines whether the application is allowed to read this PDO.
Makes no sense to publish in PersistentObject because PDOs without read permissions are not read from the database at all.- Overrides:
isReadAllowedin classAbstractPersistentObject<Security,SecurityPersistenceImpl>- Returns:
- true if allowed
-
expireCache
public boolean expireCache(long maxSerial)
Description copied from class:AbstractPersistentObjectExpires the cache according to the serial numbers.
If objects of this class are cached, the cache must be expired on updates, etc... Furthermore, if there is a cache, isCountingModification() MUST return true, in order for countModification() to invalidate the cache for the local JVM. Classes with a cache must override this method! The implementation with the PdoCache should look like this:cache.expire(maxSerial);while "cache" has been declared by the wurblet PdoCache.- Overrides:
expireCachein classAbstractPersistentObject<Security,SecurityPersistenceImpl>- Parameters:
maxSerial- is the new tableSerial this object will get- Returns:
- true if cache invalidated, false if there is no cache
- See Also:
PdoCache
-
selectCachedOnly
public Security selectCachedOnly(long id)
Description copied from class:AbstractPersistentObjectGets the object via cache only.
If there is no cache (i.e. the method is not overridden), the default implementation just loads from the db.- Specified by:
selectCachedOnlyin interfacePersistentObject<Security>- Overrides:
selectCachedOnlyin classAbstractPersistentObject<Security,SecurityPersistenceImpl>- Parameters:
id- the uniue object ID- Returns:
- the object, null if no such object
- See Also:
AbstractDbObject.selectObject(long)
-
selectCached
public Security selectCached(long id)
Description copied from class:AbstractPersistentObjectGets the object via cache.
If there is no cache (i.e. the method is not overridden), the default implementation just loads from the db.- Specified by:
selectCachedin interfacePersistentObject<Security>- Overrides:
selectCachedin classAbstractPersistentObject<Security,SecurityPersistenceImpl>- Parameters:
id- the uniue object ID- Returns:
- the object, null if no such object
- See Also:
AbstractDbObject.selectObject(long)
-
selectAllCached
public List<Security> selectAllCached()
Description copied from class:AbstractPersistentObjectGets all objects in context via cache. If there is no cache (i.e. the method is not overridden), the default implementation gets it from the db.- Specified by:
selectAllCachedin interfacePersistentObject<Security>- Overrides:
selectAllCachedin classAbstractPersistentObject<Security,SecurityPersistenceImpl>- Returns:
- the list, never null
- See Also:
AbstractPersistentObject.selectAll()
-
selectByGrantee
public List<Security> selectByGrantee(int granteeClassId, long granteeId)
- Specified by:
selectByGranteein interfaceSecurityPersistence
-
selectByObject
public org.tentackle.misc.TrackedList<Security> selectByObject(int objectClassId, long objectId)
- Specified by:
selectByObjectin interfaceSecurityPersistence
-
selectByObjectClass
public org.tentackle.misc.TrackedList<Security> selectByObjectClass(String objectClassName)
- Specified by:
selectByObjectClassin interfaceSecurityPersistence
-
selectByDomainContext
public org.tentackle.misc.TrackedList<Security> selectByDomainContext(int domainContextClassId, long domainContextId)
- Specified by:
selectByDomainContextin interfaceSecurityPersistence
-
deleteByGrantee
public int deleteByGrantee(int granteeClassId, long granteeId)- Specified by:
deleteByGranteein interfaceSecurityPersistence
-
deleteByObject
public int deleteByObject(int objectClassId, long objectId)- Specified by:
deleteByObjectin interfaceSecurityPersistence
-
deleteByObjectClass
public int deleteByObjectClass(String objectClassName)
- Specified by:
deleteByObjectClassin interfaceSecurityPersistence
-
deleteByDomainContext
public int deleteByDomainContext(int domainContextClassId, long domainContextId)- Specified by:
deleteByDomainContextin interfaceSecurityPersistence
-
getRemoteDelegate
public org.tentackle.persist.security.rmi.SecurityRemoteDelegate getRemoteDelegate()
Description copied from class:AbstractPersistentObjectOverridden due to covariance.
- Overrides:
getRemoteDelegatein classAbstractPersistentObject<Security,SecurityPersistenceImpl>
-
isRootEntity
public boolean isRootEntity()
Description copied from class:AbstractPersistentObjectThe default is false. Override if this is a root-entity.
- Specified by:
isRootEntityin interfacePersistentObject<Security>- Overrides:
isRootEntityin classAbstractPersistentObject<Security,SecurityPersistenceImpl>
-
isTracked
public boolean isTracked()
- Specified by:
isTrackedin interfacePersistentObject<Security>- Overrides:
isTrackedin classAbstractDbObject<SecurityPersistenceImpl>
-
orderBy
public String orderBy()
Description copied from class:AbstractPersistentObjectGets the natural ordering to be added in WHERE-clauses following "ORDER BY ". The wurblets will use it if --sort option set. Example:return CN_ID + "," + CN_PRINTED + " DESC";
For a single field with sort ascending returning the fieldname is sufficient. The default is null, i.e. no order-by-clause will be added.- Overrides:
orderByin classAbstractPersistentObject<Security,SecurityPersistenceImpl>- Returns:
- the order by appendix string, null if no order by
-
getFields
public void getFields(ResultSetWrapper rs)
- Overrides:
getFieldsin classAbstractDbObject<SecurityPersistenceImpl>
-
setFields
public int setFields(PreparedStatementWrapper st)
- Overrides:
setFieldsin classAbstractDbObject<SecurityPersistenceImpl>
-
createInsertSql
public String createInsertSql()
- Overrides:
createInsertSqlin classAbstractDbObject<SecurityPersistenceImpl>
-
createUpdateSql
public String createUpdateSql()
- Overrides:
createUpdateSqlin classAbstractDbObject<SecurityPersistenceImpl>
-
getObjectClassName
public String getObjectClassName()
- Specified by:
getObjectClassNamein interfaceSecurityPersistence
-
setObjectClassName
public void setObjectClassName(String objectClassName)
- Specified by:
setObjectClassNamein interfaceSecurityPersistence
-
getObjectClassId
public int getObjectClassId()
- Specified by:
getObjectClassIdin interfaceSecurityPersistence
-
setObjectClassId
public void setObjectClassId(int objectClassId)
- Specified by:
setObjectClassIdin interfaceSecurityPersistence
-
getObjectId
public long getObjectId()
- Specified by:
getObjectIdin interfaceSecurityPersistence
-
setObjectId
public void setObjectId(long objectId)
- Specified by:
setObjectIdin interfaceSecurityPersistence
-
getDomainContextClassId
public int getDomainContextClassId()
- Specified by:
getDomainContextClassIdin interfaceSecurityPersistence
-
setDomainContextClassId
public void setDomainContextClassId(int domainContextClassId)
- Specified by:
setDomainContextClassIdin interfaceSecurityPersistence
-
getDomainContextId
public long getDomainContextId()
- Specified by:
getDomainContextIdin interfaceSecurityPersistence
-
setDomainContextId
public void setDomainContextId(long domainContextId)
- Specified by:
setDomainContextIdin interfaceSecurityPersistence
-
getGranteeClassId
public int getGranteeClassId()
- Specified by:
getGranteeClassIdin interfaceSecurityPersistence
-
setGranteeClassId
public void setGranteeClassId(int granteeClassId)
- Specified by:
setGranteeClassIdin interfaceSecurityPersistence
-
getGranteeId
public long getGranteeId()
- Specified by:
getGranteeIdin interfaceSecurityPersistence
-
setGranteeId
public void setGranteeId(long granteeId)
- Specified by:
setGranteeIdin interfaceSecurityPersistence
-
getPriority
public int getPriority()
- Specified by:
getPriorityin interfaceSecurityPersistence
-
setPriority
public void setPriority(int priority)
- Specified by:
setPriorityin interfaceSecurityPersistence
-
getPermissions
public String getPermissions()
- Specified by:
getPermissionsin interfaceSecurityPersistence
-
setPermissions
public void setPermissions(String permissions)
- Specified by:
setPermissionsin interfaceSecurityPersistence
-
isAllowed
public boolean isAllowed()
- Specified by:
isAllowedin interfaceSecurityPersistence
-
setAllowed
public void setAllowed(boolean allowed)
- Specified by:
setAllowedin interfaceSecurityPersistence
-
getMessage
public String getMessage()
- Specified by:
getMessagein interfaceSecurityPersistence
-
setMessage
public void setMessage(String message)
- Specified by:
setMessagein interfaceSecurityPersistence
-
revertAttributesToSnapshot
protected void revertAttributesToSnapshot(SecurityPersistenceImpl snapshot)
Copies all attributes from a snapshot back to this object.- Parameters:
snapshot- the snapshot object
-
-