public final class JSONEntityState extends Object implements EntityState
| Modifier and Type | Method and Description |
|---|---|
EntityReference |
associationValueOf(QualifiedName stateName) |
EntityDescriptor |
entityDescriptor() |
EntityReference |
entityReference()
Returns the reference of the entity that this EntityState represents.
|
boolean |
isAssignableTo(Class<?> type) |
Instant |
lastModified()
Last modified timestamp of the entity.
|
ManyAssociationState |
manyAssociationValueOf(QualifiedName stateName) |
NamedAssociationState |
namedAssociationValueOf(QualifiedName stateName) |
Object |
propertyValueOf(QualifiedName stateName) |
void |
remove()
Remove the entity represented by this EntityState when the unit of work is completed.
|
void |
setAssociationValue(QualifiedName stateName,
EntityReference entityReference) |
void |
setPropertyValue(QualifiedName stateName,
Object newValue) |
javax.json.JsonObject |
state() |
EntityStatus |
status()
The status of this EntityState
|
String |
toString() |
String |
version()
Version of the entity.
|
public final String version()
EntityStateIf the underlying EntityStore does not support versioning, then version must always be set to 0.
version in interface EntityStatepublic Instant lastModified()
EntityStateIf the underlying EntityStore does not support timestamping, then last modified must always be set to the current time.
lastModified in interface EntityStateSystemTime.now()public EntityReference entityReference()
EntityStateentityReference in interface EntityStatepublic Object propertyValueOf(QualifiedName stateName)
propertyValueOf in interface EntityStatepublic void setPropertyValue(QualifiedName stateName, Object newValue)
setPropertyValue in interface EntityStatepublic EntityReference associationValueOf(QualifiedName stateName)
associationValueOf in interface EntityStatepublic void setAssociationValue(QualifiedName stateName, EntityReference entityReference)
setAssociationValue in interface EntityStatepublic ManyAssociationState manyAssociationValueOf(QualifiedName stateName)
manyAssociationValueOf in interface EntityStatepublic NamedAssociationState namedAssociationValueOf(QualifiedName stateName)
namedAssociationValueOf in interface EntityStatepublic void remove()
EntityStateremove in interface EntityStatepublic EntityStatus status()
EntityStatestatus in interface EntityStatepublic boolean isAssignableTo(Class<?> type)
isAssignableTo in interface EntityStatepublic EntityDescriptor entityDescriptor()
entityDescriptor in interface EntityStatepublic javax.json.JsonObject state()