|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.qi4j.spi.entitystore.helpers.DefaultEntityState
public final class DefaultEntityState
Standard implementation of EntityState.
Field Summary | |
---|---|
protected Map<QualifiedName,EntityReference> |
associations
|
protected long |
lastModified
|
protected Map<QualifiedName,List<EntityReference>> |
manyAssociations
|
protected Map<QualifiedName,Object> |
properties
|
protected EntityStatus |
status
|
protected DefaultEntityStoreUnitOfWork |
unitOfWork
|
protected String |
version
|
Constructor Summary | |
---|---|
DefaultEntityState(DefaultEntityStoreUnitOfWork unitOfWork,
EntityReference identity,
EntityDescriptor entityDescriptor)
|
|
DefaultEntityState(DefaultEntityStoreUnitOfWork unitOfWork,
String version,
long lastModified,
EntityReference identity,
EntityStatus status,
EntityDescriptor entityDescriptor,
Map<QualifiedName,Object> properties,
Map<QualifiedName,EntityReference> associations,
Map<QualifiedName,List<EntityReference>> manyAssociations)
|
Method Summary | |
---|---|
Map<QualifiedName,EntityReference> |
associations()
|
void |
copyTo(DefaultEntityState entityState)
|
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. |
Map<QualifiedName,List<EntityReference>> |
manyAssociations()
|
void |
markUpdated()
|
Map<QualifiedName,Object> |
properties()
|
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)
|
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 |
---|
protected DefaultEntityStoreUnitOfWork unitOfWork
protected EntityStatus status
protected String version
protected long lastModified
protected final Map<QualifiedName,Object> properties
protected final Map<QualifiedName,EntityReference> associations
protected final Map<QualifiedName,List<EntityReference>> manyAssociations
Constructor Detail |
---|
public DefaultEntityState(DefaultEntityStoreUnitOfWork unitOfWork, EntityReference identity, EntityDescriptor entityDescriptor)
public DefaultEntityState(DefaultEntityStoreUnitOfWork unitOfWork, String version, long lastModified, EntityReference identity, EntityStatus status, EntityDescriptor entityDescriptor, Map<QualifiedName,Object> properties, Map<QualifiedName,EntityReference> associations, Map<QualifiedName,List<EntityReference>> manyAssociations)
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 copyTo(DefaultEntityState 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 Map<QualifiedName,Object> properties()
public Map<QualifiedName,EntityReference> associations()
public Map<QualifiedName,List<EntityReference>> manyAssociations()
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 |