Class Document
- All Implemented Interfaces:
Serializable
A Document contains a universal unique ID to identify the Entity. Also the Document contains the following additional properties
- type
- created
- modified
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.
- Version:
- 1.0
- Author:
- rsoika
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionreturns the creation point of time.getData()
returns the data object part of the Entity represented by a java.util.MapgetId()
returns the unique identifier for the Entity.Returns the time of last modification.getType()
returns the type property of the entity instance.boolean
This transient flag indicates if the document was just saved and is still managed by the entityManager.void
setCreated
(Calendar created) void
sets a data object for this Entity.protected void
void
setModified
(Calendar modified) Set the time of last modification.void
setPending
(boolean pandingState) void
void
setVersion
(Integer version)
-
Constructor Details
-
Document
public Document()A Document will be automatically initialized with a unique id and a creation date. -
Document
This constructor allows the creation of an Document Instance with a default uniqueID- Parameters:
aID
-
-
-
Method Details
-
isPending
public boolean isPending()This transient flag indicates if the document was just saved and is still managed by the entityManager. In this case the entity may not be detached by other methods during the same transaction. See issue #230.- Returns:
- save status
-
setPending
public void setPending(boolean pandingState) -
getId
returns the unique identifier for the Entity.- Returns:
- universal id
-
setId
-
getVersion
-
setVersion
-
getType
returns the type property of the entity instance. This property can be provided by an itemColleciton in the attribute 'type'. Values will be case sensitive!- Returns:
- See Also:
-
org.imixs.workflow.jee.ejb.EntityService
-
setType
-
getCreated
returns the creation point of time.- Returns:
- time of creation
-
setCreated
-
getModified
Returns the time of last modification. This attribute is synchronized by the DocumetnService with the item '$modified'.- Returns:
- time of modification
- See Also:
-
setData()
-
setModified
Set the time of last modification. This attribute is automatically synchronized with the item '$modified'. -
getData
returns the data object part of the Entity represented by a java.util.MapData is loaded eager because it is read in any case by the DocumentService.
- Returns:
- Map
-
setData
sets a data object for this Entity.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.
- Parameters:
data
-- Throws:
InvalidAccessException
- if $modified is missing
-