hu.netmind.beankeeper
Interface PersistenceMetaData

All Superinterfaces:
java.io.Serializable

public interface PersistenceMetaData
extends java.io.Serializable

An object of this class represents all persistence related information about an object, which BeanKeeper is aware of.


Method Summary
 java.util.Date getCreationDate()
          Get the creation date of this version of the object.
 java.lang.Long getLastCurrentSerial()
          Get the last serial this object was known to be current.
 java.lang.Class getObjectClass()
          Get the object class.
 java.lang.Long getPersistenceEnd()
          Get the end serial.
 java.lang.Long getPersistenceId()
          Get the persistence id of the object.
 java.lang.Long getPersistenceStart()
          Get the creation serial number of this version.
 java.lang.Long getRegistrationSerial()
          Get the serial number on which this object was registered into the tracker.
 java.util.Date getRemoveDate()
          Get the deletion date of this version of the object.
 

Method Detail

getCreationDate

java.util.Date getCreationDate()
Get the creation date of this version of the object. If the object is not yet saved, this value is null. Only committed creation dates are given. If the object is saved in a transaction, but the transaction did not yet commit, then this date will reflect the last committed creation date of the object (before the transaction).
Selecting the object later with this date will give the same version only if this version of the object lived at least 1 millisecond (it was not deleted or superseded in that time). If it didn't, then the next version of the object is selected which lived at least 1 millisecond.


getRemoveDate

java.util.Date getRemoveDate()
Get the deletion date of this version of the object. If the object was not yet saved, then this value is null. If the object was not yet deleted, but it exists in the database, then this date is an extremal big date. Selecting the object on this date will select the next version of the object which lived at least 1 millisecond.


getPersistenceId

java.lang.Long getPersistenceId()
Get the persistence id of the object. This id is available to non-existent objects too, and it does not ever change. Not if the object does not exist yet, and not if a new version is saved or the object is deleted.


getPersistenceStart

java.lang.Long getPersistenceStart()
Get the creation serial number of this version. This is a unique number based on dates. All versions will have different serial numbers.


getPersistenceEnd

java.lang.Long getPersistenceEnd()
Get the end serial. If the object is not deleted, then this is Long.MAX_VALUE.


getRegistrationSerial

java.lang.Long getRegistrationSerial()
Get the serial number on which this object was registered into the tracker.


getObjectClass

java.lang.Class getObjectClass()
Get the object class.


getLastCurrentSerial

java.lang.Long getLastCurrentSerial()
Get the last serial this object was known to be current. An object is known to be current (current on a given serial), when it is selected, or modified.