org.azzyzt.jee.runtime.entity
Class EntityBase<ID>
java.lang.Object
org.azzyzt.jee.runtime.entity.EntityBase<ID>
- Type Parameters:
ID
- the type of the entity class' ID
public abstract class EntityBase<ID>
- extends java.lang.Object
Abstract base class for all entity classes. Inheriting from this class guarantees availability
of an ID value. Additionally static and non-static tests for ID values are included.
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EntityBase
public EntityBase()
couldBeIdValue
public static boolean couldBeIdValue(java.lang.Object id)
- Parameters:
id
- a value to be tested
- Returns:
- true if the value of the parameter could possibly an ID value.
likelyHasId
public boolean likelyHasId()
- Returns:
- true if an entity is likely to have a valid ID value
getId
public abstract ID getId()
- Returns:
- the ID of an entity
setId
public abstract void setId(ID id)
- Sets the ID of an entity to a certain value.
- Parameters:
id
- a value