org.benow.repository.mapping
Class JSQLObject
java.lang.Object
org.benow.security.SecureObject
org.benow.repository.util.PersistentObjectImpl
org.benow.repository.mapping.JSQLObject
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable, PersistentObject
- Direct Known Subclasses:
- AbstractItem, AnotherImplObject, Book, ClassSchemaInfo, ForeignObject, ImplObject, JSQLAugment, JSQLAugmentable, JSQLNamed, LanguageImpl, Movie, NamedPersistentObject, PersistentNamedImpl, Person, SampleObject, SecurePersistentObject, TestObject, TypedPersistentObjectImpl, UserModuleImpl, VersionedPersistentObject
public abstract class JSQLObject
- extends PersistentObjectImpl
- implements java.io.Serializable
A persistent object some of whose fields are fetched via XSQL. Descend from
this class if you want xsql to manage field fetching via
fetchField(fieldName). Otherwise, extending PersistentObjectImpl is
sufficient.
- Author:
- andy
- See Also:
- Serialized Form
| Fields inherited from class org.benow.security.SecureObject |
admin |
|
Method Summary |
protected void |
fetchExpectedField(java.lang.String field)
Fetches field, throwing error if not there |
protected void |
fetchField(java.lang.String fieldName)
Fetches a field with a given name. |
protected void |
fetchFieldQuiet(java.lang.String fieldName)
|
protected void |
forgetField(java.lang.String fieldName)
Forgets a field so it will be refetched |
protected boolean |
isFetched(java.lang.String fieldName)
Check to see if a field has been populated |
boolean |
isLocked()
|
void |
lock()
Prevents any more fields from being fetched. |
protected void |
refetchFieldQuiet(java.lang.String fieldName)
|
void |
setFetched(java.lang.String fieldName)
|
| 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 |
JSQLObject
protected JSQLObject()
lock
public void lock()
- Prevents any more fields from being fetched. Useful if you don't want gets
to populate, ie for marshalling.
refetchFieldQuiet
protected void refetchFieldQuiet(java.lang.String fieldName)
fetchFieldQuiet
protected void fetchFieldQuiet(java.lang.String fieldName)
fetchField
protected void fetchField(java.lang.String fieldName)
throws NoSuchObjectException
- Fetches a field with a given name. Only lets NoSuchObjectExceptions
through, others (if any) are wrapped in runtime exception.
- Parameters:
fieldName -
- Throws:
ObjectRepositoryException
NoSuchObjectException
fetchExpectedField
protected void fetchExpectedField(java.lang.String field)
- Fetches field, throwing error if not there
- Parameters:
string -
isFetched
protected boolean isFetched(java.lang.String fieldName)
- Check to see if a field has been populated
- Parameters:
fieldName -
- Returns:
- true if field has been fetched
setFetched
public void setFetched(java.lang.String fieldName)
isLocked
public boolean isLocked()
forgetField
protected void forgetField(java.lang.String fieldName)
- Forgets a field so it will be refetched
- Parameters:
fieldName -