net.sourceforge.domian.entity
Class AbstractRandomIntegerEntity

java.lang.Object
  extended by net.sourceforge.domian.entity.AbstractEntity
      extended by net.sourceforge.domian.entity.AbstractRandomIntegerEntity
All Implemented Interfaces:
Entity

public abstract class AbstractRandomIntegerEntity
extends AbstractEntity

Abstract class for entity objects, ensuring a final, unique, non-null entity ID from the moment they are created.

The entity ID provided by this class is just a random Integer. This class is suitable for test entities with the need for simple, read-friendly entity IDs. Do not use this class in production environments!

Since:
0.4.1
Author:
Eirik Torske

Field Summary
protected  java.lang.Integer entityId
           
 
Fields inherited from class net.sourceforge.domian.entity.AbstractEntity
timeOfCreation, version
 
Constructor Summary
AbstractRandomIntegerEntity()
           
 
Method Summary
 java.lang.Integer getEntityId()
          An entity object should at all time have a final, unique, non-null entity ID.
 
Methods inherited from class net.sourceforge.domian.entity.AbstractEntity
doWarnLog, equals, getTimeOfCreation, getVersion, hashCode, isEntity, isValueObject, setVersion, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

entityId

protected final java.lang.Integer entityId
Constructor Detail

AbstractRandomIntegerEntity

public AbstractRandomIntegerEntity()
Method Detail

getEntityId

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

Returns:
the entity ID


Copyright © 2006-2010. All Rights Reserved.