org.olat.core.commons.persistence
Class PersistentObject

java.lang.Object
  extended by org.olat.core.commons.persistence.PersistentObject
All Implemented Interfaces:
java.io.Serializable, CreateInfo, Persistable
Direct Known Subclasses:
AuthenticationImpl, BGAreaImpl, BGContext2Resource, BGContextImpl, BGtoAreaRelationImpl, BookmarkImpl, BusinessGroupImpl, CatalogEntryImpl, Checklist, Checkpoint, CheckpointResult, DailyStat, DayOfWeekStat, ForumImpl, HomeOrgStat, HourOfDayStat, IdentityImpl, LifeCycleEntry, LockImpl, LoggingObject, MessageImpl, MetaDataElement, NamedGroupImpl, NoteImpl, OLATResourceImpl, OrgTypeStat, PLockImpl, PolicyImpl, ProjectBrokerImpl, ProjectImpl, Property, PublisherImpl, QTIResult, QTIResultSet, ReadMessageImpl, ReferenceImpl, RepositoryEntry, SecurityGroupImpl, SecurityGroupMembershipImpl, StudyBranch3Stat, StudyLevelStat, SubscriberImpl, UserCommentImpl, UserImpl, UserRatingImpl, WeeklyStat

public abstract class PersistentObject
extends java.lang.Object
implements CreateInfo, Persistable

Needs the primary key called 'key' in hibernate and 'creationDate'

Author:
Andreas Ch. Kapp
See Also:
Serialized Form

Constructor Summary
PersistentObject()
           
 
Method Summary
 boolean equalsByPersistableKey(Persistable persistable)
           
 java.util.Date getCreationDate()
          Get creation date.
 java.lang.Long getKey()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PersistentObject

public PersistentObject()
Method Detail

getCreationDate

public java.util.Date getCreationDate()
Description copied from interface: CreateInfo
Get creation date.

Specified by:
getCreationDate in interface CreateInfo
Returns:
Date. The creation date
See Also:
org.olat.core.commons.persistence.Auditable#getCreationDate()

getKey

public java.lang.Long getKey()
Specified by:
getKey in interface Persistable
Returns:
Long

equalsByPersistableKey

public boolean equalsByPersistableKey(Persistable persistable)
Specified by:
equalsByPersistableKey in interface Persistable
Parameters:
persistable - The object to compare with
Returns:
true if the given persistable object has the same object identity in terms on a database level.
See Also:
org.olat.core.commons.persistence.Persistable#equalsByPersistableKey(org.olat.core.commons.persistence.Persistable)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()