@Entity public class Document extends Object implements Serializable
A Document contains a universal unique ID to identify the Entity. Also the Document contains the following additional properties
The creation time represents the point of time where the Document object was created. The modify property represents the point of time when the Document was last modified by the DocumentService. The type property is used to categorize documents in a database. If an ItemCollection contains the attribute 'type' the value will be automatically mapped to the type property.
The data attribute is used to hold the ItemCollection data. It is mapped by a OR-Mapper to a large object (Lob).
A Client should not work directly with an instance of the Document entity. It's recommended to use the DocumentService which acts as a session facade to manage instances of ItemCollection persisted in a database system.
DocumentService,
Serialized Form| Constructor and Description |
|---|
Document()
A Document will be automatically initialized with a unique id and a creation
date.
|
Document(String aID)
This constructor allows the creation of an Document Instance with a default
uniqueID
|
| Modifier and Type | Method and Description |
|---|---|
Calendar |
getCreated()
returns the creation point of time.
|
Map<String,List<Object>> |
getData()
returns the data object part of the Entity represented by a java.util.Map
Data is loaded eager because it is read in any case by the DocumentService.
|
String |
getId()
returns the unique identifier for the Entity.
|
Calendar |
getModified()
Returns the time of last modification.
|
String |
getType()
returns the type property of the entity instance.
|
Integer |
getVersion() |
boolean |
isPending()
This transient flag indicates if the document was just saved and is still
managed by the entityManager.
|
void |
setCreated(Calendar created) |
void |
setData(Map<String,List<Object>> itemCol)
sets a data object for this Entity.
|
protected void |
setId(String aID) |
void |
setModified(Calendar modified)
Set the time of last modification.
|
void |
setPending(boolean pandingState) |
void |
setType(String type) |
void |
setVersion(Integer version) |
public Document()
public Document(String aID)
aID - public boolean isPending()
public void setPending(boolean pandingState)
public String getId()
protected void setId(String aID)
public Integer getVersion()
public void setVersion(Integer version)
public String getType()
jee.ejb.EntityServicepublic void setType(String type)
public Calendar getCreated()
public void setCreated(Calendar created)
public Calendar getModified()
setData()public void setModified(Calendar modified)
public Map<String,List<Object>> getData()
Data is loaded eager because it is read in any case by the DocumentService.
public void setData(Map<String,List<Object>> itemCol)
Note: the modified timestamp will be updated automatically to the current point of time (see setModified) independent from the value of the item $modified. The item $modified will be updated by the DocumentService on read.
data - InvalidAccessException - if $modified is missingCopyright © 2006–2020 Imixs Software Solutions GmbH. All rights reserved.