org.benow.repository.util
Interface PersistentObject

All Known Subinterfaces:
TypedPersistentObject
All Known Implementing Classes:
AbstractItem, AnotherImplObject, Book, ClassInfo, ClassSchemaInfo, FirstItem, ForeignObject, ImplObject, JSQLAugment, JSQLAugmentable, JSQLNamed, JSQLObject, LanguageImpl, LanguageUserModuleImpl, Movie, NamedPersistentObject, NamedPersistentTreeNode, NamedTypedPersistentObjectImpl, PermissionedClassImpl, PermissionedPackageImpl, PermissionImpl, PersistentNamedCheckable, PersistentNamedImpl, PersistentNotifier, PersistentObjectImpl, PersistentWrapper, Person, RoleImpl, SampleObject, SecondItem, SecurePersistentObject, TestObject, TypedPersistentObjectImpl, UseableUser, UserImpl, UserModuleImpl, VersionedPersistentObject

public interface PersistentObject


Field Summary
static java.lang.String FIELD_NAME_KEY
          the name of the id field for FieldQueries
 
Method Summary
 java.lang.Object getKey()
          Get the id for this persistent object
 boolean isTransient()
          Returns true if this object is transient
 boolean remove()
          remove without need for transaction
 boolean remove(Transaction tx)
           
 void setKey(java.lang.Object key)
          Get the id for this persistent object
 void update()
          update without need for transaction
 void update(Transaction tx)
           
 

Field Detail

FIELD_NAME_KEY

static final java.lang.String FIELD_NAME_KEY
the name of the id field for FieldQueries

See Also:
Constant Field Values
Method Detail

getKey

java.lang.Object getKey()
Get the id for this persistent object

Returns:
key

setKey

void setKey(java.lang.Object key)
Get the id for this persistent object


isTransient

boolean isTransient()
Returns true if this object is transient

Returns:
true if not persisted

update

void update(Transaction tx)
            throws ObjectRepositoryException
Throws:
ObjectRepositoryException

remove

boolean remove(Transaction tx)
               throws ObjectRepositoryException
Throws:
ObjectRepositoryException

remove

boolean remove()
               throws ObjectRepositoryError
remove without need for transaction

Throws:
ObjectRepositoryError - if something goes wrong

update

void update()
            throws ObjectRepositoryError
update without need for transaction

Throws:
ObjectRepositoryError - if something goes wrong