|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jgoodies.binding.beans.Model
org.archiviststoolkit.mydomain.DomainObject
public abstract class DomainObject
The DomainObject should be the base class of all data types which we wish to store in our hibernate based database. TODO: Integer should be a Long identifier within hibernate
Field Summary | |
---|---|
static java.lang.String |
CREATED
|
static java.lang.String |
CREATED_BY
|
static java.lang.String |
LAST_UPDATED
|
static java.lang.String |
LAST_UPDATED_BY
|
Fields inherited from interface org.hibernate.classic.Lifecycle |
---|
NO_VETO, VETO |
Constructor Summary | |
---|---|
protected |
DomainObject()
|
Method Summary | |
---|---|
void |
addRelatedObject(DomainObject domainObject)
A dummy place holder to be overridden by classes that have related objects |
int |
compareTo(java.lang.Object object)
Compares this object to another. |
java.util.Date |
creationDate()
|
boolean |
equals(java.lang.Object object)
Tests objects for equality. |
AuditInfo |
getAuditInfo()
Instances must always return a non-null instance of AuditInfo |
java.util.Date |
getCreated()
|
java.lang.String |
getCreatedBy()
|
abstract java.lang.Long |
getIdentifier()
|
java.util.Date |
getLastUpdated()
|
java.lang.String |
getLastUpdatedBy()
|
java.util.Collection |
getRelatedCollection(DomainObject domainObject)
A dummy place holder to be overridden by classes that have related objects |
DomainObject |
getRelatedObject(DomainObject domainObject,
int rowNumber)
A dummy place holder to be overridden by classes that have related objects |
java.lang.String |
getUniqueConstraintKey()
A dummy place holder to be overridden by classes that have unique keys other than the id |
java.lang.Long |
getVersion()
|
int |
hashCode()
Returns the hashcode for this object. |
java.lang.Boolean |
isNewRecord()
|
java.util.Date |
lastUpdated()
|
boolean |
onDelete(org.hibernate.Session session)
Called when an entity is deleted. |
void |
onLoad(org.hibernate.Session session,
java.io.Serializable serialid)
Called after an entity is loaded. |
boolean |
onSave(org.hibernate.Session session)
Called when an entity is saved. |
boolean |
onUpdate(org.hibernate.Session session)
Called when an entity is updated. |
void |
removeIdAndAuditInfo()
|
void |
removeRelatedObject(DomainObject domainObject)
A dummy place holder to be overridden by classes that have related objects |
void |
setAuditInfo(AuditInfo auditInfo)
|
abstract void |
setIdentifier(java.lang.Long identifier)
|
void |
setVersion(java.lang.Long version)
|
void |
testDeleteRules()
|
boolean |
validateAndDisplayDialog(java.util.EventObject ae)
|
Methods inherited from class com.jgoodies.binding.beans.Model |
---|
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, equals, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, fireMultiplePropertiesChanged, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, getVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CREATED_BY
public static final java.lang.String CREATED
public static final java.lang.String LAST_UPDATED
public static final java.lang.String LAST_UPDATED_BY
Constructor Detail |
---|
protected DomainObject()
Method Detail |
---|
public final java.util.Date creationDate()
public abstract java.lang.Long getIdentifier()
public abstract void setIdentifier(java.lang.Long identifier)
identifier
- The identifier to set.public java.util.Date lastUpdated()
public java.lang.Long getVersion()
public void setVersion(java.lang.Long version)
version
- The version to set.public java.lang.Boolean isNewRecord()
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
object
- the object to test against
public int hashCode()
hashCode
in class java.lang.Object
public final boolean onDelete(org.hibernate.Session session)
onDelete
in interface org.hibernate.classic.Lifecycle
session
- the session to delete on
public void onLoad(org.hibernate.Session session, java.io.Serializable serialid)
onLoad
in interface org.hibernate.classic.Lifecycle
session
- the session which loaded the entityserialid
- the identifier of the entitypublic boolean onSave(org.hibernate.Session session)
onSave
in interface org.hibernate.classic.Lifecycle
session
- the session to save on
public boolean onUpdate(org.hibernate.Session session)
onUpdate
in interface org.hibernate.classic.Lifecycle
session
- the session to update on
public int compareTo(java.lang.Object object)
compareTo
in interface java.lang.Comparable
object
- the object to compare this to.
public AuditInfo getAuditInfo()
getAuditInfo
in interface Auditable
public void setAuditInfo(AuditInfo auditInfo)
public java.lang.String getCreatedBy()
public java.lang.String getLastUpdatedBy()
public java.util.Date getCreated()
public java.util.Date getLastUpdated()
public void removeRelatedObject(DomainObject domainObject) throws ObjectNotRemovedException
domainObject
- the domain object to be removed
ObjectNotRemovedException
public void addRelatedObject(DomainObject domainObject) throws AddRelatedObjectException, DuplicateLinkException
domainObject
- the domain object to be removed
AddRelatedObjectException
DuplicateLinkException
public java.util.Collection getRelatedCollection(DomainObject domainObject)
domainObject
- the domain object to be removedpublic DomainObject getRelatedObject(DomainObject domainObject, int rowNumber)
rowNumber
- the row of the object to retrievepublic java.lang.String getUniqueConstraintKey()
public void removeIdAndAuditInfo()
public boolean validateAndDisplayDialog(java.util.EventObject ae)
public void testDeleteRules() throws DeleteException, PersistenceException
DeleteException
PersistenceException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |