|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.qi4j.spi.entitystore.helpers.JSONEntityState
public final class JSONEntityState
Standard implementation of EntityState.
Field Summary | |
---|---|
static String |
JSON_KEY_APPLICATION_VERSION
|
static String |
JSON_KEY_ASSOCIATIONS
|
static String |
JSON_KEY_IDENTITY
|
static String |
JSON_KEY_MANYASSOCIATIONS
|
static String |
JSON_KEY_MODIFIED
|
static String |
JSON_KEY_PROPERTIES
|
static String |
JSON_KEY_TYPE
|
static String |
JSON_KEY_VERSION
|
protected long |
lastModified
|
protected JSONObject |
state
|
protected EntityStatus |
status
|
protected DefaultEntityStoreUnitOfWork |
unitOfWork
|
protected String |
version
|
Constructor Summary | |
---|---|
JSONEntityState(DefaultEntityStoreUnitOfWork unitOfWork,
EntityReference identity,
EntityDescriptor entityDescriptor,
JSONObject initialState)
|
|
JSONEntityState(DefaultEntityStoreUnitOfWork unitOfWork,
String version,
long lastModified,
EntityReference identity,
EntityStatus status,
EntityDescriptor entityDescriptor,
JSONObject state)
|
Method Summary | |
---|---|
EntityDescriptor |
entityDescriptor()
|
EntityReference |
getAssociation(QualifiedName stateName)
|
ManyAssociationState |
getManyAssociation(QualifiedName stateName)
|
Object |
getProperty(QualifiedName stateName)
|
EntityReference |
identity()
Returns the identity of the entity that this EntityState represents. |
boolean |
isOfType(TypeName type)
|
long |
lastModified()
Last modified timestamp of the entity. |
void |
markUpdated()
|
void |
remove()
Remove the entity represented by this EntityState when the unit of work is completed. |
void |
setAssociation(QualifiedName stateName,
EntityReference newEntity)
|
void |
setProperty(QualifiedName stateName,
Object newValue)
|
JSONObject |
state()
|
EntityStatus |
status()
The status of this EntityState |
String |
toString()
|
String |
version()
Version of the entity. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String JSON_KEY_PROPERTIES
public static final String JSON_KEY_ASSOCIATIONS
public static final String JSON_KEY_MANYASSOCIATIONS
public static final String JSON_KEY_IDENTITY
public static final String JSON_KEY_APPLICATION_VERSION
public static final String JSON_KEY_TYPE
public static final String JSON_KEY_VERSION
public static final String JSON_KEY_MODIFIED
protected DefaultEntityStoreUnitOfWork unitOfWork
protected EntityStatus status
protected String version
protected long lastModified
protected JSONObject state
Constructor Detail |
---|
public JSONEntityState(DefaultEntityStoreUnitOfWork unitOfWork, EntityReference identity, EntityDescriptor entityDescriptor, JSONObject initialState)
public JSONEntityState(DefaultEntityStoreUnitOfWork unitOfWork, String version, long lastModified, EntityReference identity, EntityStatus status, EntityDescriptor entityDescriptor, JSONObject state)
Method Detail |
---|
public final String version()
EntityState
version
in interface EntityState
public long lastModified()
EntityState
lastModified
in interface EntityState
public EntityReference identity()
EntityState
identity
in interface EntityState
public Object getProperty(QualifiedName stateName)
getProperty
in interface EntityState
public void setProperty(QualifiedName stateName, Object newValue)
setProperty
in interface EntityState
public EntityReference getAssociation(QualifiedName stateName)
getAssociation
in interface EntityState
public void setAssociation(QualifiedName stateName, EntityReference newEntity)
setAssociation
in interface EntityState
public ManyAssociationState getManyAssociation(QualifiedName stateName)
getManyAssociation
in interface EntityState
public void remove()
EntityState
remove
in interface EntityState
public EntityStatus status()
EntityState
status
in interface EntityState
public boolean isOfType(TypeName type)
isOfType
in interface EntityState
public EntityDescriptor entityDescriptor()
entityDescriptor
in interface EntityState
public JSONObject state()
public String toString()
toString
in class Object
public void markUpdated()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |