|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.imixs.workflow.jee.jpa.Entity
@Entity public class Entity
This Entity ejb is a wrapper class for the org.imixs.workflow.ItemCollection which is used in all Imixs Workflow Interfaces. The Entity is used by the EntityServiceBean to store ItemCollections into a database using the JEE Java Persistence API. Each Entity contains a universal unique ID to identify the Entity. Also the Entiy supports the additional properties
The data attribute is used to hold the ItemCollection data. It is mapped by a OR-Mapper to a large object (Lob). There is no way to query single attributes using the EJB Query Language. To support the powerful EJB Query language the Entity contains additional index properties to branch properties of an ItemCollection into onToMany relationships. These are the supported Index properties:
Notice: All relationships are marked as FetchType=EAGER. This is because the load and find Methods of the EntiyServiceBean do a clear() call to the PersitenceContext because the implodeEntity() method of the EntityServiceBean will modifies the values of an entity. So the Entity needs to be detached Immediately.
Why did the Entity Table use Join tables to link to OneToMany relationships ?
The default schema-level mapping for unidirectional one-to-many relationships uses a join table, as described in JSR 220 - Section 2.1.8.5. Unidirectional one-to-many relationships may be implemented using one-to-many foreign key mappings, however, such support is not required in this release. Applications that want to use a foreign key mapping strategy for one-to-many relationships should make these relationships bidirectional to ensure portability.
To store the Text-, Integer-, Double- and Calendar- Lists we can not use HashSet because the order in which elements are returned by a HashSet's iterator is not specified. This is the reason why we use Vectors to store the values and check for duplicates manually. So we make sure that values added to the list are not recorded
EntityService,
org.imixs.workflow.jee.ejb.EntityServiceBean,
Serialized Form| Constructor Summary | |
|---|---|
Entity()
A Entity will be automatically initialized with a unique id and a creation date. |
|
Entity(java.lang.String aID)
This constructor allows the creation of an Entity Instance with a default uniqueID |
|
| Method Summary | |
|---|---|
java.util.List<CalendarItem> |
getCalendarItems()
returns a list of all calendarItems joined to this Entity |
java.util.Calendar |
getCreated()
returns the creation point of time. |
EntityData |
getData()
Deturns the data object part of the Entity. |
java.util.List<DoubleItem> |
getDoubleItems()
returns a list of all doubleItems joined to this Entity |
java.lang.String |
getId()
returns the unique identifier for the Entity. |
java.util.List<IntegerItem> |
getIntegerItems()
returns a list of all integerItems joined to this Entity |
java.util.Calendar |
getModified()
returns the last modification point of time |
java.util.List<ReadAccessEntity> |
getReadAccess()
returns the ReadAccessList (ReadACL) of the Entity instance. |
java.util.List<TextItem> |
getTextItems()
returns a list of all textItems joined to this Entity. |
java.lang.String |
getType()
returns the type property of the entity instance. |
java.util.List<WriteAccessEntity> |
getWriteAccess()
returns the WriteAccessList (WriteACL) of the Entity instance. |
void |
setCalendarItems(java.util.List<CalendarItem> calendarItems)
|
void |
setCreated(java.util.Calendar created)
|
void |
setData(EntityData data)
sets a data object for this Entity. |
void |
setDoubleItems(java.util.List<DoubleItem> doubleItems)
|
protected void |
setId(java.lang.String aID)
|
void |
setIntegerItems(java.util.List<IntegerItem> integerItems)
|
void |
setModified(java.util.Calendar modified)
|
void |
setReadAccess(java.util.List<ReadAccessEntity> acl)
|
void |
setTextItems(java.util.List<TextItem> textItems)
|
void |
setType(java.lang.String type)
|
void |
setWriteAccess(java.util.List<WriteAccessEntity> acl)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Entity()
public Entity(java.lang.String aID)
aID - | Method Detail |
|---|
public java.lang.String getId()
protected void setId(java.lang.String aID)
public java.lang.String getType()
org.imixs.workflow.jee.ejb.EntityServiceBeanpublic void setType(java.lang.String type)
public java.util.Calendar getCreated()
public void setCreated(java.util.Calendar created)
public java.util.Calendar getModified()
public void setModified(java.util.Calendar modified)
public java.util.List<TextItem> getTextItems()
public void setTextItems(java.util.List<TextItem> textItems)
public java.util.List<IntegerItem> getIntegerItems()
public void setIntegerItems(java.util.List<IntegerItem> integerItems)
public java.util.List<DoubleItem> getDoubleItems()
public void setDoubleItems(java.util.List<DoubleItem> doubleItems)
public java.util.List<CalendarItem> getCalendarItems()
public void setCalendarItems(java.util.List<CalendarItem> calendarItems)
public EntityData getData()
public void setData(EntityData data)
data - public java.util.List<ReadAccessEntity> getReadAccess()
public void setReadAccess(java.util.List<ReadAccessEntity> acl)
public java.util.List<WriteAccessEntity> getWriteAccess()
public void setWriteAccess(java.util.List<WriteAccessEntity> acl)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||