Module org.tentackle.persistence
Package org.tentackle.persist.security
Class SecurityPersistenceImpl
- java.lang.Object
-
- org.tentackle.dbms.AbstractDbObject<P>
-
- org.tentackle.persist.AbstractPersistentObject<org.tentackle.security.pdo.Security,SecurityPersistenceImpl>
-
- org.tentackle.persist.security.SecurityPersistenceImpl
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,java.lang.Comparable<SecurityPersistenceImpl>,org.tentackle.dbms.ModificationLoggable,org.tentackle.misc.Identifiable,org.tentackle.misc.Immutable,org.tentackle.misc.Modifiable,org.tentackle.misc.SerialNumbered,org.tentackle.misc.Snapshotable<org.tentackle.security.pdo.Security>,org.tentackle.pdo.DomainContextDependable,org.tentackle.pdo.DomainContextProvider,org.tentackle.pdo.PdoMethodCacheProvider<org.tentackle.security.pdo.Security>,org.tentackle.pdo.PdoProvider<org.tentackle.security.pdo.Security>,org.tentackle.pdo.PersistenceDelegate<org.tentackle.security.pdo.Security>,org.tentackle.pdo.PersistentObject<org.tentackle.security.pdo.Security>,org.tentackle.pdo.ProxyDelegate<org.tentackle.security.pdo.Security>,org.tentackle.reflect.EffectiveClassProvider<org.tentackle.security.pdo.Security>,org.tentackle.reflect.Interceptable,org.tentackle.security.pdo.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<org.tentackle.security.pdo.Security,SecurityPersistenceImpl> implements org.tentackle.security.pdo.SecurityPersistence
Security rule persistence implementation.- Author:
- harald
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static PersistentObjectClassVariables<org.tentackle.security.pdo.Security,SecurityPersistenceImpl>CLASSVARIABLESVariables common to all instances of SecurityPersistenceImpl.static java.lang.StringCN_ALLOWEDdatabase column name for 'allowed'.static java.lang.StringCN_DOMAINCONTEXTCLASSIDdatabase column name for 'domainContextClassId'.static java.lang.StringCN_DOMAINCONTEXTIDdatabase column name for 'domainContextId'.static java.lang.StringCN_GRANTEECLASSIDdatabase column name for 'granteeClassId'.static java.lang.StringCN_GRANTEEIDdatabase column name for 'granteeId'.static java.lang.StringCN_MESSAGEdatabase column name for 'message'.static java.lang.StringCN_OBJECTCLASSIDdatabase column name for 'objectClassId'.static java.lang.StringCN_OBJECTCLASSNAMEdatabase column name for 'objectClassName'.static java.lang.StringCN_OBJECTIDdatabase column name for 'objectId'.static java.lang.StringCN_PERMISSIONSdatabase column name for 'permissions'.static java.lang.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
-
-
Constructor Summary
Constructors Constructor Description SecurityPersistenceImpl()Creates a security rule without domain context or session.SecurityPersistenceImpl(org.tentackle.security.pdo.Security pdo)Creates a security rule without domain context or session.SecurityPersistenceImpl(org.tentackle.security.pdo.Security pdo, org.tentackle.pdo.DomainContext context)Creates a security rule.SecurityPersistenceImpl(org.tentackle.security.pdo.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.java.lang.StringcreateInsertSql()java.lang.StringcreateUpdateSql()intdeleteByDomainContext(int domainContextClassId, long domainContextId)intdeleteByGrantee(int granteeClassId, long granteeId)intdeleteByObject(int objectClassId, long objectId)intdeleteByObjectClass(java.lang.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...org.tentackle.pdo.PdoCache<org.tentackle.security.pdo.Security>getCache()Gets the cache.PersistentObjectClassVariables<org.tentackle.security.pdo.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()org.tentackle.pdo.PersistentDomainObject<?>getDomainContextObject()Gets the application context's object.
The object will be loaded in its valid context.voidgetFields(org.tentackle.dbms.ResultSetWrapper rs)org.tentackle.pdo.PersistentDomainObject<?>getGrantee()Gets the grantee.intgetGranteeClassId()longgetGranteeId()java.lang.StringgetMessage()org.tentackle.pdo.PersistentDomainObject<?>getObject()Gets the object this rule applies to.
The object is retrieved in its valid context.java.lang.Class<?>getObjectClass()intgetObjectClassId()java.lang.StringgetObjectClassName()longgetObjectId()java.lang.StringgetPermissions()intgetPriority()org.tentackle.persist.security.rmi.SecurityRemoteDelegategetRemoteDelegate()booleanisAllowed()booleanisCountingModification(char 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()java.lang.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.java.util.List<org.tentackle.security.pdo.Security>selectAllCached()Gets all objects in context via cache.org.tentackle.misc.TrackedList<org.tentackle.security.pdo.Security>selectByDomainContext(int domainContextClassId, long domainContextId)java.util.List<org.tentackle.security.pdo.Security>selectByGrantee(int granteeClassId, long granteeId)org.tentackle.misc.TrackedList<org.tentackle.security.pdo.Security>selectByObject(int objectClassId, long objectId)org.tentackle.misc.TrackedList<org.tentackle.security.pdo.Security>selectByObjectClass(java.lang.String objectClassName)org.tentackle.security.pdo.SecurityselectCached(long id)Gets the object via cache.
If there is no cache (i.e.org.tentackle.security.pdo.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(org.tentackle.pdo.PersistentDomainObject<?> contextObject)Sets the application context's object.intsetFields(org.tentackle.dbms.PreparedStatementWrapper st)voidsetGrantee(org.tentackle.pdo.PersistentDomainObject<?> grantee)Sets the grantee.voidsetGranteeClassId(int granteeClassId)voidsetGranteeId(long granteeId)voidsetMessage(java.lang.String message)voidsetObject(org.tentackle.pdo.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(java.lang.String objectClassName)voidsetObjectId(long objectId)voidsetPermissions(java.lang.String permissions)voidsetPriority(int priority)java.lang.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, deleteMissingInCollection, deleteObject, deletePlainWithComponents, deletePlainWithComponents, derivePdoFromPo, determineContextId, discardSnapshot, discardSnapshots, executeFirstPdoQuery, executeFirstPdoQuery, executeListQuery, executeListQuery, executeQueryToList, executeQueryToList, executeTrackedListQuery, executeTrackedListQuery, findDuplicate, finishModification, finishNotUpdated, getBaseContext, 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, 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, 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, deleteImpl, 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, insertImpl, 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, updateImpl, 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.misc.Immutable
getImmutableLoggingLevel, isFinallyImmutable, isImmutable, setFinallyImmutable, setImmutable, setImmutableLoggingLevel
-
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.session.SessionDependable
isSessionImmutable, setSession, setSessionImmutable
-
-
-
-
Field Detail
-
CLASSVARIABLES
public static final PersistentObjectClassVariables<org.tentackle.security.pdo.Security,SecurityPersistenceImpl> CLASSVARIABLES
Variables common to all instances of SecurityPersistenceImpl.
-
CN_OBJECTCLASSNAME
public static final java.lang.String CN_OBJECTCLASSNAME
database column name for 'objectClassName'.- See Also:
- Constant Field Values
-
CN_OBJECTCLASSID
public static final java.lang.String CN_OBJECTCLASSID
database column name for 'objectClassId'.- See Also:
- Constant Field Values
-
CN_OBJECTID
public static final java.lang.String CN_OBJECTID
database column name for 'objectId'.- See Also:
- Constant Field Values
-
CN_DOMAINCONTEXTCLASSID
public static final java.lang.String CN_DOMAINCONTEXTCLASSID
database column name for 'domainContextClassId'.- See Also:
- Constant Field Values
-
CN_DOMAINCONTEXTID
public static final java.lang.String CN_DOMAINCONTEXTID
database column name for 'domainContextId'.- See Also:
- Constant Field Values
-
CN_GRANTEECLASSID
public static final java.lang.String CN_GRANTEECLASSID
database column name for 'granteeClassId'.- See Also:
- Constant Field Values
-
CN_GRANTEEID
public static final java.lang.String CN_GRANTEEID
database column name for 'granteeId'.- See Also:
- Constant Field Values
-
CN_PRIORITY
public static final java.lang.String CN_PRIORITY
database column name for 'priority'.- See Also:
- Constant Field Values
-
CN_PERMISSIONS
public static final java.lang.String CN_PERMISSIONS
database column name for 'permissions'.- See Also:
- Constant Field Values
-
CN_ALLOWED
public static final java.lang.String CN_ALLOWED
database column name for 'allowed'.- See Also:
- Constant Field Values
-
CN_MESSAGE
public static final java.lang.String CN_MESSAGE
database column name for 'message'.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SecurityPersistenceImpl
public SecurityPersistenceImpl(org.tentackle.security.pdo.Security pdo, org.tentackle.pdo.DomainContext context)Creates a security rule.- Parameters:
pdo- the security PDOcontext- the domain context
-
SecurityPersistenceImpl
public SecurityPersistenceImpl(org.tentackle.security.pdo.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(org.tentackle.security.pdo.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<org.tentackle.security.pdo.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<org.tentackle.security.pdo.Security,SecurityPersistenceImpl>- Returns:
- the class variables
- See Also:
AbstractDbObject.getClassVariables()
-
getObject
public org.tentackle.pdo.PersistentDomainObject<?> getObject()
Gets the object this rule applies to.
The object is retrieved in its valid context.- Specified by:
getObjectin interfaceorg.tentackle.security.pdo.SecurityPersistence- 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<org.tentackle.security.pdo.Security,SecurityPersistenceImpl>
-
setObject
public void setObject(org.tentackle.pdo.PersistentDomainObject<?> object)
Sets the object this rule applies to.
Setting the null object also clears the objectClass making the rule invalid.- Specified by:
setObjectin interfaceorg.tentackle.security.pdo.SecurityPersistence- Parameters:
object- the object, null to clear
-
getGrantee
public org.tentackle.pdo.PersistentDomainObject<?> getGrantee()
Gets the grantee.- Specified by:
getGranteein interfaceorg.tentackle.security.pdo.SecurityPersistence- Returns:
- the grantee, null if grant class
-
setGrantee
public void setGrantee(org.tentackle.pdo.PersistentDomainObject<?> grantee)
Sets the grantee.- Specified by:
setGranteein interfaceorg.tentackle.security.pdo.SecurityPersistence- Parameters:
grantee- the grantee, null to clear (all)
-
getDomainContextObject
public org.tentackle.pdo.PersistentDomainObject<?> getDomainContextObject()
Gets the application context's object.
The object will be loaded in its valid context.- Specified by:
getDomainContextObjectin interfaceorg.tentackle.security.pdo.SecurityPersistence- Returns:
- the context object, null if no context (all)
-
setDomainContextObject
public void setDomainContextObject(org.tentackle.pdo.PersistentDomainObject<?> contextObject)
Sets the application context's object.- Specified by:
setDomainContextObjectin interfaceorg.tentackle.security.pdo.SecurityPersistence- Parameters:
contextObject- the context object, null to clear (all)
-
toString
public java.lang.String toString()
for debugging only- Overrides:
toStringin classorg.tentackle.dbms.AbstractDbObject<SecurityPersistenceImpl>
-
assertRemoteSecurityManagerInitialized
public void assertRemoteSecurityManagerInitialized()
- Specified by:
assertRemoteSecurityManagerInitializedin interfaceorg.tentackle.security.pdo.SecurityPersistence
-
getObjectClass
public java.lang.Class<?> getObjectClass()
- Specified by:
getObjectClassin interfaceorg.tentackle.security.pdo.SecurityPersistence
-
getCache
public org.tentackle.pdo.PdoCache<org.tentackle.security.pdo.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 interfaceorg.tentackle.pdo.PersistentObject<org.tentackle.security.pdo.Security>- Overrides:
getCachein classAbstractPersistentObject<org.tentackle.security.pdo.Security,SecurityPersistenceImpl>- Returns:
- the cache, null if uncached
-
isCountingModification
public boolean isCountingModification(char modType)
- Overrides:
isCountingModificationin classorg.tentackle.dbms.AbstractDbObject<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<org.tentackle.security.pdo.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<org.tentackle.security.pdo.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 org.tentackle.security.pdo.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 interfaceorg.tentackle.pdo.PersistentObject<org.tentackle.security.pdo.Security>- Overrides:
selectCachedOnlyin classAbstractPersistentObject<org.tentackle.security.pdo.Security,SecurityPersistenceImpl>- Parameters:
id- the uniue object ID- Returns:
- the object, null if no such object
- See Also:
AbstractDbObject.selectObject(long)
-
selectCached
public org.tentackle.security.pdo.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 interfaceorg.tentackle.pdo.PersistentObject<org.tentackle.security.pdo.Security>- Overrides:
selectCachedin classAbstractPersistentObject<org.tentackle.security.pdo.Security,SecurityPersistenceImpl>- Parameters:
id- the uniue object ID- Returns:
- the object, null if no such object
- See Also:
AbstractDbObject.selectObject(long)
-
selectAllCached
public java.util.List<org.tentackle.security.pdo.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 interfaceorg.tentackle.pdo.PersistentObject<org.tentackle.security.pdo.Security>- Overrides:
selectAllCachedin classAbstractPersistentObject<org.tentackle.security.pdo.Security,SecurityPersistenceImpl>- Returns:
- the list, never null
- See Also:
AbstractPersistentObject.selectAll()
-
selectByGrantee
public java.util.List<org.tentackle.security.pdo.Security> selectByGrantee(int granteeClassId, long granteeId)- Specified by:
selectByGranteein interfaceorg.tentackle.security.pdo.SecurityPersistence
-
selectByObject
public org.tentackle.misc.TrackedList<org.tentackle.security.pdo.Security> selectByObject(int objectClassId, long objectId)- Specified by:
selectByObjectin interfaceorg.tentackle.security.pdo.SecurityPersistence
-
selectByObjectClass
public org.tentackle.misc.TrackedList<org.tentackle.security.pdo.Security> selectByObjectClass(java.lang.String objectClassName)
- Specified by:
selectByObjectClassin interfaceorg.tentackle.security.pdo.SecurityPersistence
-
selectByDomainContext
public org.tentackle.misc.TrackedList<org.tentackle.security.pdo.Security> selectByDomainContext(int domainContextClassId, long domainContextId)- Specified by:
selectByDomainContextin interfaceorg.tentackle.security.pdo.SecurityPersistence
-
deleteByGrantee
public int deleteByGrantee(int granteeClassId, long granteeId)- Specified by:
deleteByGranteein interfaceorg.tentackle.security.pdo.SecurityPersistence
-
deleteByObject
public int deleteByObject(int objectClassId, long objectId)- Specified by:
deleteByObjectin interfaceorg.tentackle.security.pdo.SecurityPersistence
-
deleteByObjectClass
public int deleteByObjectClass(java.lang.String objectClassName)
- Specified by:
deleteByObjectClassin interfaceorg.tentackle.security.pdo.SecurityPersistence
-
deleteByDomainContext
public int deleteByDomainContext(int domainContextClassId, long domainContextId)- Specified by:
deleteByDomainContextin interfaceorg.tentackle.security.pdo.SecurityPersistence
-
getRemoteDelegate
public org.tentackle.persist.security.rmi.SecurityRemoteDelegate getRemoteDelegate()
Description copied from class:AbstractPersistentObjectOverridden due to covariance.
- Overrides:
getRemoteDelegatein classAbstractPersistentObject<org.tentackle.security.pdo.Security,SecurityPersistenceImpl>
-
isRootEntity
public boolean isRootEntity()
Description copied from class:AbstractPersistentObjectThe default is false. Override if this is a root-entity.
- Specified by:
isRootEntityin interfaceorg.tentackle.pdo.PersistentObject<org.tentackle.security.pdo.Security>- Overrides:
isRootEntityin classAbstractPersistentObject<org.tentackle.security.pdo.Security,SecurityPersistenceImpl>
-
isTracked
public boolean isTracked()
- Specified by:
isTrackedin interfaceorg.tentackle.pdo.PersistentObject<org.tentackle.security.pdo.Security>- Overrides:
isTrackedin classorg.tentackle.dbms.AbstractDbObject<SecurityPersistenceImpl>
-
orderBy
public java.lang.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<org.tentackle.security.pdo.Security,SecurityPersistenceImpl>- Returns:
- the order by appendix string, null if no order by
-
getFields
public void getFields(org.tentackle.dbms.ResultSetWrapper rs)
- Overrides:
getFieldsin classorg.tentackle.dbms.AbstractDbObject<SecurityPersistenceImpl>
-
setFields
public int setFields(org.tentackle.dbms.PreparedStatementWrapper st)
- Overrides:
setFieldsin classorg.tentackle.dbms.AbstractDbObject<SecurityPersistenceImpl>
-
createInsertSql
public java.lang.String createInsertSql()
- Overrides:
createInsertSqlin classorg.tentackle.dbms.AbstractDbObject<SecurityPersistenceImpl>
-
createUpdateSql
public java.lang.String createUpdateSql()
- Overrides:
createUpdateSqlin classorg.tentackle.dbms.AbstractDbObject<SecurityPersistenceImpl>
-
getObjectClassName
public java.lang.String getObjectClassName()
- Specified by:
getObjectClassNamein interfaceorg.tentackle.security.pdo.SecurityPersistence
-
setObjectClassName
public void setObjectClassName(java.lang.String objectClassName)
- Specified by:
setObjectClassNamein interfaceorg.tentackle.security.pdo.SecurityPersistence
-
getObjectClassId
public int getObjectClassId()
- Specified by:
getObjectClassIdin interfaceorg.tentackle.security.pdo.SecurityPersistence
-
setObjectClassId
public void setObjectClassId(int objectClassId)
- Specified by:
setObjectClassIdin interfaceorg.tentackle.security.pdo.SecurityPersistence
-
getObjectId
public long getObjectId()
- Specified by:
getObjectIdin interfaceorg.tentackle.security.pdo.SecurityPersistence
-
setObjectId
public void setObjectId(long objectId)
- Specified by:
setObjectIdin interfaceorg.tentackle.security.pdo.SecurityPersistence
-
getDomainContextClassId
public int getDomainContextClassId()
- Specified by:
getDomainContextClassIdin interfaceorg.tentackle.security.pdo.SecurityPersistence
-
setDomainContextClassId
public void setDomainContextClassId(int domainContextClassId)
- Specified by:
setDomainContextClassIdin interfaceorg.tentackle.security.pdo.SecurityPersistence
-
getDomainContextId
public long getDomainContextId()
- Specified by:
getDomainContextIdin interfaceorg.tentackle.security.pdo.SecurityPersistence
-
setDomainContextId
public void setDomainContextId(long domainContextId)
- Specified by:
setDomainContextIdin interfaceorg.tentackle.security.pdo.SecurityPersistence
-
getGranteeClassId
public int getGranteeClassId()
- Specified by:
getGranteeClassIdin interfaceorg.tentackle.security.pdo.SecurityPersistence
-
setGranteeClassId
public void setGranteeClassId(int granteeClassId)
- Specified by:
setGranteeClassIdin interfaceorg.tentackle.security.pdo.SecurityPersistence
-
getGranteeId
public long getGranteeId()
- Specified by:
getGranteeIdin interfaceorg.tentackle.security.pdo.SecurityPersistence
-
setGranteeId
public void setGranteeId(long granteeId)
- Specified by:
setGranteeIdin interfaceorg.tentackle.security.pdo.SecurityPersistence
-
getPriority
public int getPriority()
- Specified by:
getPriorityin interfaceorg.tentackle.security.pdo.SecurityPersistence
-
setPriority
public void setPriority(int priority)
- Specified by:
setPriorityin interfaceorg.tentackle.security.pdo.SecurityPersistence
-
getPermissions
public java.lang.String getPermissions()
- Specified by:
getPermissionsin interfaceorg.tentackle.security.pdo.SecurityPersistence
-
setPermissions
public void setPermissions(java.lang.String permissions)
- Specified by:
setPermissionsin interfaceorg.tentackle.security.pdo.SecurityPersistence
-
isAllowed
public boolean isAllowed()
- Specified by:
isAllowedin interfaceorg.tentackle.security.pdo.SecurityPersistence
-
setAllowed
public void setAllowed(boolean allowed)
- Specified by:
setAllowedin interfaceorg.tentackle.security.pdo.SecurityPersistence
-
getMessage
public java.lang.String getMessage()
- Specified by:
getMessagein interfaceorg.tentackle.security.pdo.SecurityPersistence
-
setMessage
public void setMessage(java.lang.String message)
- Specified by:
setMessagein interfaceorg.tentackle.security.pdo.SecurityPersistence
-
revertAttributesToSnapshot
protected void revertAttributesToSnapshot(SecurityPersistenceImpl snapshot)
Copies all attributes from a snapshot back to this object.- Parameters:
snapshot- the snapshot object
-
-