Entity#

public abstract class Entity extends AbstractObservable implements EntityInterface#

Abstract base class for all the important entity classes.

This is the central data class of the server. It represents Records, RecordTypes, Properties, and Files.

This class holds the messages and other transient information as well as the actual data that is being retrieved from or written to the back-end during a transaction.

Author:

Timm Fitschen

Fields#

DATATYPE_CHANGED_EVENT#

public static final String DATATYPE_CHANGED_EVENT#

ENTITY_STATUS_CHANGED_EVENT#

public static final String ENTITY_STATUS_CHANGED_EVENT#

isParsed#

boolean isParsed#

Constructors#

Entity#

public Entity()#

Entity#

public Entity(EntityID id)#

Entity#

public Entity(EntityID id, Role role)#

Entity#

public Entity(String name, Role role)#

Entity#

public Entity(Element e, Role role)#

Entity#

public Entity(String name)#

Entity#

public Entity(Element e)#

Methods#

addError#

public final void addError(Message m)#

addInfo#

public void addInfo(String description)#

addInfo#

public void addInfo(Message m)#

addMessage#

public final void addMessage(ToElementable m)#

addParent#

public void addParent(Parent parent)#

addProperty#

public void addProperty(Property property)#

addProperty#

public void addProperty(List<Property> properties)#

addSelections#

public EntityInterface addSelections(List<Selection> selections)#

addToElement#

public final void addToElement(Element element)#

addToElement#

public void addToElement(Element element, SerializeFieldStrategy strategy)#

addTransactionLog#

public void addTransactionLog(TransactionLogMessage transactionLogMessage)#

addWarning#

public void addWarning(Message m)#

checkPermission#

public void checkPermission(Subject subject, Permission permission)#

checkPermission#

public void checkPermission(Permission permission)#

getCuid#

public final String getCuid()#

cuid getter.

Returns:

cuid.

getDatatype#

public final AbstractDatatype getDatatype()#

getDescription#

public final String getDescription()#

getDomain#

public EntityID getDomain()#

getEntityACL#

public EntityACL getEntityACL()#

getEntityStatus#

public final EntityStatus getEntityStatus()#

getFileProperties#

public final FileProperties getFileProperties()#

getFlag#

public String getFlag(String key)#

getFlags#

public HashMap<String, String> getFlags()#

getId#

public final EntityID getId()#

getIdVersion#

public String getIdVersion()#

Return “id@version” if there is versioning information, else only “id”.

getMessages#

public final Set<ToElementable> getMessages()#

getMessages#

public final List<Message> getMessages(String type)#

getName#

public final String getName()#

getParents#

public final ParentContainer getParents()#

getProperties#

public final PropertyContainer getProperties()#

getQueryTemplateDefinition#

public String getQueryTemplateDefinition()#

getRole#

public final Role getRole()#

getSelections#

public List<Selection> getSelections()#

getSerializeFieldStrategy#

public SerializeFieldStrategy getSerializeFieldStrategy()#

getSparseEntity#

public SparseEntity getSparseEntity()#

getStatementStatus#

public StatementStatusInterface getStatementStatus()#

statementStatus getter.

getToElementStrategy#

public ToElementStrategy getToElementStrategy()#

getTransactionLogMessages#

public List<TransactionLogMessage> getTransactionLogMessages()#

getUnit#

public Unit getUnit()#

getValue#

public final Value getValue()#

getVersion#

public Version getVersion()#

getVerySparseEntity#

public VerySparseEntity getVerySparseEntity()#

hasCuid#

public final boolean hasCuid()#

cuid hasser. Does this wrapped entity have a cuid?

Returns:

true if cuid != null, false otherwise.

hasDatatype#

public boolean hasDatatype()#

hasDescription#

public final boolean hasDescription()#

hasEntityACL#

public boolean hasEntityACL()#

hasEntityStatus#

public final boolean hasEntityStatus()#

hasFileProperties#

public final boolean hasFileProperties()#

hasId#

public final boolean hasId()#

hasMessage#

public final boolean hasMessage(String type)#

hasMessages#

public boolean hasMessages()#

hasName#

public final boolean hasName()#

hasParents#

public final boolean hasParents()#

hasPermission#

public boolean hasPermission(Permission permission)#

hasPermission#

public boolean hasPermission(Subject subject, Permission permission)#

hasProperties#

public final boolean hasProperties()#

hasRole#

public final boolean hasRole()#

hasStatementStatus#

public final boolean hasStatementStatus()#

statementStatus hasser.

Returns:

true id statementStatus!= null, false otherwise.

hasTransactionLogMessages#

public boolean hasTransactionLogMessages()#

hasUnit#

public boolean hasUnit()#

hasValue#

public final boolean hasValue()#

hasVersion#

public boolean hasVersion()#

isDatatypeOverride#

public boolean isDatatypeOverride()#

isReference#

public boolean isReference()#

isReferenceList#

public boolean isReferenceList()#

linkIdToEntity#

public EntityInterface linkIdToEntity(EntityInterface link)#

parseFromElement#

public void parseFromElement(Element element)#

parseSparseEntity#

public final EntityInterface parseSparseEntity(SparseEntity spe)#

parseValue#

public void parseValue()#

removeMessage#

public void removeMessage(Message m)#

setCuid#

public final void setCuid(String cuid)#

cuid setter.

Parameters:
  • cuid

Throws:

setDatatype#

public final void setDatatype(AbstractDatatype datatype)#

setDatatype#

public void setDatatype(String datatype)#

setDatatypeOverride#

public EntityInterface setDatatypeOverride(boolean b)#

setDescription#

public final void setDescription(String description)#

setEntityACL#

public void setEntityACL(EntityACL acl)#

setEntityACL#

public void setEntityACL(String acl)#

setEntityStatus#

public final void setEntityStatus(EntityStatus entityStatus)#

setFileProperties#

public final void setFileProperties(FileProperties fileProperties)#

setFlag#

public void setFlag(String key, String value)#

setId#

public void setId(EntityID id)#

setName#

public final void setName(String name)#

setProperties#

public void setProperties(PropertyContainer properties)#

setQueryTemplateDefinition#

public void setQueryTemplateDefinition(String query)#

setRole#

public final void setRole(Role role)#

setRole#

public final void setRole(String role)#

setSerializeFieldStrategy#

public void setSerializeFieldStrategy(SerializeFieldStrategy s)#

setStatementStatus#

public void setStatementStatus(StatementStatusInterface statementStatus)#

statementStatus setter.

setStatementStatus#

public void setStatementStatus(String statementStatus)#

setToElementStragegy#

public void setToElementStragegy(ToElementStrategy s)#

setUnit#

public void setUnit(Unit unit)#

setValue#

public final void setValue(Value value)#

setVersion#

public void setVersion(Version version)#

skipJob#

public boolean skipJob()#

toElement#

public final Element toElement()#

toString#

public String toString()#