net.sourceforge.domian.entity
Class AbstractRandomLongEntity
java.lang.Object
net.sourceforge.domian.entity.AbstractEntity
net.sourceforge.domian.entity.AbstractRandomLongEntity
- All Implemented Interfaces:
- Entity
public abstract class AbstractRandomLongEntity
- 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 Long
.
This class is suitable for test entities with the need for simple, readable entity IDs.
If the application is kind of important, and the number of entities in the application is somewhat large,
do not use this class in production environments.
- Since:
- 0.4.1
- Author:
- Eirik Torske
Field Summary |
protected java.lang.Long |
entityId
|
Method Summary |
java.lang.Long |
getEntityId()
An entity object should at all time have a final, unique, non-null entity ID. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
entityId
protected final java.lang.Long entityId
AbstractRandomLongEntity
public AbstractRandomLongEntity()
getEntityId
public final java.lang.Long 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.