@Entity public class Entity extends Object implements Serializable
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 FormConstructor and Description |
---|
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
|
Modifier and Type | Method and Description |
---|---|
List<CalendarItem> |
getCalendarItems()
returns a list of all calendarItems joined to this Entity
|
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
|
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,List<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) |
public Entity()
public Entity(String aID)
aID
- public String getId()
protected void setId(String aID)
public Integer getVersion()
public void setVersion(Integer version)
public String getType()
EntityService
public void setType(String type)
public Calendar getCreated()
public void setCreated(Calendar created)
public Calendar getModified()
public void setModified(Calendar modified)
public Map<String,List<Object>> getData()
public void setData(Map<String,List<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 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)
Copyright © 2006–2019 Imixs Software Solutions GmbH. All rights reserved.