net.sourceforge.domian.repository
Class EntityPersistenceMetaData

java.lang.Object
  extended by net.sourceforge.domian.repository.EntityPersistenceMetaData
All Implemented Interfaces:
Entity, EntityMetaData

public class EntityPersistenceMetaData
extends java.lang.Object
implements Entity, EntityMetaData

Meta data for for persisted Entity objects. This class is not an entity class by definition, but EntityPersistenceMetaData objects need to be persisted together with the entities they describe.

Since:
0.4
Author:
Eirik Torske

Field Summary
 java.lang.Long numberOfTimesRead
           
 java.lang.Long numberOfTimesWritten
           
 java.util.Date readFirstTime
           
 java.util.Date readLastTime
           
protected  java.lang.Long timeOfCreation
           
 java.util.Date writtenFirstTime
           
 java.util.Date writtenLastTime
           
 
Constructor Summary
EntityPersistenceMetaData(java.util.Date writtenFirstTime)
           
 
Method Summary
 java.lang.String getEntityId()
          An entity object should at all time have a final, unique, non-null entity ID.
 java.lang.Long getNumberOfTimesRead()
           
 java.lang.Long getNumberOfTimesWritten()
           
 java.util.Date getReadFirstTime()
           
 java.util.Date getReadLastTime()
           
 java.lang.Long getTimeOfCreation()
          An entity object always originates from one specific moment in time.
 java.util.Date getWrittenFirstTime()
           
 java.util.Date getWrittenLastTime()
           
 java.lang.String toString()
           
 EntityPersistenceMetaData touchReadMetaData()
           
 EntityPersistenceMetaData touchWriteMetaData()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

timeOfCreation

protected final java.lang.Long timeOfCreation

numberOfTimesWritten

public java.lang.Long numberOfTimesWritten

writtenFirstTime

public java.util.Date writtenFirstTime

writtenLastTime

public java.util.Date writtenLastTime

numberOfTimesRead

public java.lang.Long numberOfTimesRead

readFirstTime

public java.util.Date readFirstTime

readLastTime

public java.util.Date readLastTime
Constructor Detail

EntityPersistenceMetaData

public EntityPersistenceMetaData(java.util.Date writtenFirstTime)
Method Detail

getTimeOfCreation

public final java.lang.Long getTimeOfCreation()
Description copied from interface: Entity
An entity object always originates from one specific moment in time.

Specified by:
getTimeOfCreation in interface Entity
Returns:
the time of creation of this entity, in milliseconds after 01.01.1970

getEntityId

public java.lang.String getEntityId()
Description copied from interface: Entity
An entity object should at all time have a final, unique, non-null entity ID.

Specified by:
getEntityId in interface Entity
Returns:
the entity ID

getNumberOfTimesWritten

public java.lang.Long getNumberOfTimesWritten()
Specified by:
getNumberOfTimesWritten in interface EntityMetaData

getNumberOfTimesRead

public java.lang.Long getNumberOfTimesRead()
Specified by:
getNumberOfTimesRead in interface EntityMetaData

getWrittenFirstTime

public java.util.Date getWrittenFirstTime()
Specified by:
getWrittenFirstTime in interface EntityMetaData

getWrittenLastTime

public java.util.Date getWrittenLastTime()
Specified by:
getWrittenLastTime in interface EntityMetaData

getReadFirstTime

public java.util.Date getReadFirstTime()
Specified by:
getReadFirstTime in interface EntityMetaData

getReadLastTime

public java.util.Date getReadLastTime()
Specified by:
getReadLastTime in interface EntityMetaData

touchReadMetaData

public EntityPersistenceMetaData touchReadMetaData()

touchWriteMetaData

public EntityPersistenceMetaData touchWriteMetaData()

toString

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


Copyright © 2006-2010. All Rights Reserved.