org.benow.repository.util
Class TypedPersistentObjectImpl

java.lang.Object
  extended by org.benow.security.SecureObject
      extended by org.benow.repository.util.PersistentObjectImpl
          extended by org.benow.repository.mapping.JSQLObject
              extended by org.benow.repository.util.TypedPersistentObjectImpl
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable, PersistentObject, TypedPersistentObject
Direct Known Subclasses:
NamedTypedPersistentObjectImpl

public class TypedPersistentObjectImpl
extends JSQLObject
implements TypedPersistentObject

A TypedPersistentObject is used for resolving descendant classes in castor. Castor will not correctly rebuild the object hierarchy when retrieving objects. The object repository must be requeried for the actual objects. ie: executeQuery(new ClassQuery(UserImpl.class),tx) would return UserImpl classes, but if we wanted AppXUser's (which descend from user impls, we would have to manually query) after retrieving them all. Such behavior would automatically be done if AppXUser were a TypedPersistentObject. As such, there is overhead associated with the use of TypedPersistentObjects, however, the cost may be justified for the gain in object model flexibility.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.benow.repository.mapping.JSQLObject
JSQLObject.XSQLVersionDesc, JSQLObject.XSQLVersioned
 
Field Summary
 
Fields inherited from class org.benow.repository.util.PersistentObjectImpl
conn, recycled
 
Fields inherited from class org.benow.security.SecureObject
admin
 
Fields inherited from interface org.benow.repository.util.TypedPersistentObject
FIELD_CLASS_KEY
 
Fields inherited from interface org.benow.repository.util.PersistentObject
FIELD_NAME_KEY
 
Constructor Summary
TypedPersistentObjectImpl()
           
 
Method Summary
 java.lang.Class getActualClass()
           
 boolean isActualClass()
           
 
Methods inherited from class org.benow.repository.mapping.JSQLObject
fetchExpectedField, fetchField, fetchFieldQuiet, forgetField, isFetched, isLocked, lock, refetchFieldQuiet, setFetched
 
Methods inherited from class org.benow.repository.util.PersistentObjectImpl
compareTo, doIsTransient, equals, getKey, isTransient, recycle, remove, remove, repositoryAfterLoad, repositoryAfterPersist, repositoryAfterTransient, repositoryBeforePersist, repositoryBeforeTransient, setKey, toString, update, update
 
Methods inherited from class org.benow.security.SecureObject
assertOnePermission, assertPermission, assertPermission, declarePermission, declareViewPermission, declareViewPermission
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.benow.repository.util.PersistentObject
getKey, isTransient, remove, remove, setKey, update, update
 

Constructor Detail

TypedPersistentObjectImpl

public TypedPersistentObjectImpl()
Method Detail

getActualClass

public java.lang.Class getActualClass()

isActualClass

public boolean isActualClass()