public class EntityIdImpl extends AbstractEntityId
| Modifier and Type | Field and Description |
|---|---|
private long |
objectId |
private Number |
revision |
private static long |
serialVersionUID
UID for serialization.
|
private long |
typeId |
OBJECT_ID_ILLEGAL, OBJECT_ID_MINIMUM_CUSTOM, RADIX, SEPARATOR, SEPARATOR_CHAR| Modifier | Constructor and Description |
|---|---|
protected |
EntityIdImpl()
The constructor for de-serialization in GWT.
|
|
EntityIdImpl(EntityId entityId)
The constructor.
|
|
EntityIdImpl(long objectId,
long typeId,
Number revision)
The constructor.
|
|
EntityIdImpl(String idAsString)
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getObjectId()
This method gets the
unique identifier
of an entity (or any other object). |
Number |
getRevision()
This method gets the number of the specific revision of the object referenced by this
EntityId. |
long |
getTypeId()
This method gets the identifier representing the type of the referenced
entity or object. |
equals, getValue, hashCode, toStringprivate static final long serialVersionUID
private long objectId
getObjectId()private long typeId
getTypeId()private Number revision
getRevision()protected EntityIdImpl()
public EntityIdImpl(long objectId,
long typeId,
Number revision)
objectId - - see getObjectId().typeId - - see getTypeId().revision - - see getRevision().public EntityIdImpl(EntityId entityId)
entityId - is the EntityId instance to "clone".public EntityIdImpl(String idAsString)
idAsString - is the string representation of the EntityId to create.public Number getRevision()
EntityId.
If the associated object is NOT version controlled (e.g. a class or field), then the revision will always
be null. null always points to the latest revision
of an object.null for the latest revision.RevisionedEntity.getRevision(),
RevisionedEntity.LATEST_REVISIONpublic long getTypeId()
entity or object. The type is typically directly related to the Class reflecting the object.
However, in dynamically or mixed typed object-worlds (often used in content-management-systems) two
instances of the same java Class may be considered to have different types that can only be
determined at runtime. To resolve an EntityId a central component is required that can map the
EntityId.getTypeId() to the actual type (e.g. Class object) and vice versa.public long getObjectId()
unique identifier
of an entity (or any other object).GenericEntity.getId()Copyright © 2001–2015 mmm-Team. All rights reserved.