|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.benow.security.SecureObject
org.benow.repository.util.PersistentObjectImpl
public abstract class PersistentObjectImpl
FIXME expose remove(tx) method (delete(tx)?) FEATURE use a proxy wrapper in conjuction with the mapping and introspection for auto population of fields during navigation. user.getRole().getPermissions().getRoles().iterator().next().getUsers();
| Field Summary | |
|---|---|
ObjectRepositoryConnection |
conn
|
boolean |
recycled
|
| Fields inherited from class org.benow.security.SecureObject |
|---|
admin |
| Fields inherited from interface org.benow.repository.util.PersistentObject |
|---|
FIELD_NAME_KEY |
| Constructor Summary | |
|---|---|
protected |
PersistentObjectImpl()
|
| Method Summary | |
|---|---|
int |
compareTo(java.lang.Object obj)
|
protected boolean |
doIsTransient()
Overloading isTransient() can cause problems with castor, if so, overload this method instead. |
boolean |
equals(java.lang.Object someObject)
Test for equality, compares primary key. |
java.lang.Object |
getKey()
Get the id for this persistent object |
boolean |
isTransient()
Returns true if this object is transient |
void |
recycle()
FIXME best off proxied |
boolean |
remove()
remove without need for transaction |
boolean |
remove(Transaction tx)
Deletes this object from persistent storage. |
void |
repositoryAfterLoad(Transaction tx)
Called after the object is loaded from the repository. |
void |
repositoryAfterPersist(Transaction tx)
Called after this object is persisted (stored) in the repository; |
void |
repositoryAfterTransient()
Called after this object is removed from the repository. |
void |
repositoryBeforePersist()
Called before this object is persisted (stored) in the repository |
void |
repositoryBeforeTransient()
Called before this object is removed from the repository. |
void |
setKey(java.lang.Object key)
Get the id for this persistent object |
java.lang.String |
toString()
|
void |
update()
update without need for transaction |
void |
update(Transaction tx)
Update this object in persistent storage. |
| 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 |
| Field Detail |
|---|
public transient ObjectRepositoryConnection conn
public transient boolean recycled
| Constructor Detail |
|---|
protected PersistentObjectImpl()
| Method Detail |
|---|
public java.lang.Object getKey()
PersistentObject
getKey in interface PersistentObjectpublic boolean equals(java.lang.Object someObject)
equals in class java.lang.Objectpublic void setKey(java.lang.Object key)
PersistentObject
setKey in interface PersistentObject
public void update(Transaction tx)
throws ObjectRepositoryException
update in interface PersistentObjecttx -
ObjectRepositoryException
public void update()
throws ObjectRepositoryError
PersistentObject
update in interface PersistentObjectObjectRepositoryError - if something goes wrong
public boolean remove(Transaction tx)
throws ObjectRepositoryException
remove in interface PersistentObjecttx -
ObjectRepositoryException
public boolean remove()
throws ObjectRepositoryError
PersistentObject
remove in interface PersistentObjectObjectRepositoryError - if something goes wrongpublic boolean isTransient()
PersistentObject
isTransient in interface PersistentObjectprotected boolean doIsTransient()
public void repositoryAfterLoad(Transaction tx)
throws ObjectRepositoryException
tx -
ObjectRepositoryExceptionpublic void repositoryBeforePersist()
public void repositoryAfterPersist(Transaction tx)
throws ObjectRepositoryException
tx -
ObjectRepositoryExceptionpublic void repositoryBeforeTransient()
public void repositoryAfterTransient()
public java.lang.String toString()
toString in class java.lang.Objectpublic int compareTo(java.lang.Object obj)
compareTo in interface java.lang.Comparablepublic void recycle()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||