|
||||||||||
| 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,
EntityService,
Serialized Form| Constructor Summary | |
|---|---|
Entity()
A Entity will be automatically initialized with a unique id and a creation date. |
|
Entity(String aID)
This constructor allows the creation of an Entity Instance with a default uniqueID |
|
| Method Summary | |
|---|---|
List<CalendarItem> |
getCalendarItems()
returns a list of all calendarItems joined to this Entity |
Calendar |
getCreated()
returns the creation point of time. |
Map<String,Object> |
getData()
returns the data object part of the Entity represented by a java.util.Map |
List<DoubleItem> |
getDoubleItems()
returns a list of all doubleItems joined to this Entity |
String |
getId()
returns the unique identifier for the Entity. |
List<IntegerItem> |
getIntegerItems()
returns a list of all integerItems joined to this Entity |
Calendar |
getModified()
returns the last modification point of time |
List<ReadAccess> |
getReadAccessList()
ReadAccess list is loaded eager as this need to be check on every access |
List<TextItem> |
getTextItems()
returns a list of all textItems joined to this Entity. |
String |
getType()
returns the type property of the entity instance. |
Integer |
getVersion()
|
List<WriteAccess> |
getWriteAccessList()
WrateAccess list is loaded lazy as this a check is only on update method needed |
void |
setCalendarItems(List<CalendarItem> calendarItems)
|
void |
setCreated(Calendar created)
|
void |
setData(Map<String,Object> itemCol)
sets a data object for this Entity. |
void |
setDoubleItems(List<DoubleItem> doubleItems)
|
protected void |
setId(String aID)
|
void |
setIntegerItems(List<IntegerItem> integerItems)
|
void |
setModified(Calendar modified)
|
void |
setReadAccessList(List<ReadAccess> readAccessList)
|
void |
setTextItems(List<TextItem> textItems)
|
void |
setType(String type)
|
void |
setVersion(Integer version)
|
void |
setWriteAccessList(List<WriteAccess> writeAccessList)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Entity()
public Entity(String aID)
aID - | Method Detail |
|---|
public String getId()
protected void setId(String aID)
public Integer getVersion()
public void setVersion(Integer version)
public String getType()
EntityServicepublic void setType(String type)
public Calendar getCreated()
public void setCreated(Calendar created)
public Calendar getModified()
public void setModified(Calendar modified)
public Map<String,Object> getData()
public void setData(Map<String,Object> itemCol)
data - public List<ReadAccess> getReadAccessList()
public void setReadAccessList(List<ReadAccess> readAccessList)
public List<WriteAccess> getWriteAccessList()
public void setWriteAccessList(List<WriteAccess> writeAccessList)
public List<TextItem> getTextItems()
public void setTextItems(List<TextItem> textItems)
public List<IntegerItem> getIntegerItems()
public void setIntegerItems(List<IntegerItem> integerItems)
public List<DoubleItem> getDoubleItems()
public void setDoubleItems(List<DoubleItem> doubleItems)
public List<CalendarItem> getCalendarItems()
public void setCalendarItems(List<CalendarItem> calendarItems)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||