Package com.cmobilecom.af.model.nav
Class EntityOfEntityList<T extends PersistenceEntity>
- java.lang.Object
-
- com.cmobilecom.af.model.nav.EntityOfEntityList<T>
-
- Type Parameters:
T
- PersistenceEntity
- All Implemented Interfaces:
java.io.Serializable
public class EntityOfEntityList<T extends PersistenceEntity> extends java.lang.Object implements java.io.Serializable
EntityOfEntityList is an EntityDataSource that is used to create one EntityBackingBean for each entity of the EntityListBackingBean that is in a mode of one EntityBackingBean per entity (rowEntityView), instead of one entity per row in a table. All the EntityBackingBeans can be shown at the same time, for example, in a TabView.- Since:
- 4.0
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description EntityOfEntityList(PageableEntityList<T> pageableEntityList, int entityIndex)
Constructor with an entity in the current page of a PageableEntityList.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
getEntity()
Get the entity at the entity index of current page.int
getEntityIndex()
Get the entity index of current page.EntityListBackingBean<T>
getEntityListBackingBean()
Get the EntityListBackingBean where each entity is backed by EntityBackingBean.PageableEntityList<T>
getPageableEntityList()
Get the pageable entity list with which this EntityOfEntityList is associated.boolean
isEntityListRowEntityView()
Is entityListBackingBean rowEntityView? i.e.T
removeEntity()
Remove the entity from memory, assuming it has been deleted from persistence.void
setEntity(T entity)
Set the entity at the entity index of current page.void
setEntityIndex(int entityIndex)
Set the entity index within the current pagevoid
setPageableEntityList(PageableEntityList<T> pageableEntityList)
Set the pageable entity list with which this EntityOfEntityList is associated.
-
-
-
Constructor Detail
-
EntityOfEntityList
public EntityOfEntityList(PageableEntityList<T> pageableEntityList, int entityIndex)
Constructor with an entity in the current page of a PageableEntityList.- Parameters:
pageableEntityList
- the PageableEntityList for a whole entity listentityIndex
- the entity index of current page
-
-
Method Detail
-
getPageableEntityList
public PageableEntityList<T> getPageableEntityList()
Get the pageable entity list with which this EntityOfEntityList is associated.- Returns:
- PageableEntityList instance
- Since:
- 5.8
-
setPageableEntityList
public void setPageableEntityList(PageableEntityList<T> pageableEntityList)
Set the pageable entity list with which this EntityOfEntityList is associated.- Parameters:
pageableEntityList
- PageableEntityList instance- Since:
- 5.8
-
getEntityIndex
public int getEntityIndex()
Get the entity index of current page.- Returns:
- entity index
- Since:
- 5.8
-
setEntityIndex
public void setEntityIndex(int entityIndex)
Set the entity index within the current page- Parameters:
entityIndex
- entity index- Since:
- 5.8
-
getEntity
public T getEntity() throws SystemException
Get the entity at the entity index of current page.- Returns:
- entity at the index
- Throws:
SystemException
- throw if an error occurs
-
setEntity
public void setEntity(T entity) throws SystemException
Set the entity at the entity index of current page.- Parameters:
entity
- the entity to set at the index- Throws:
SystemException
- throw if an error occurs in re-calculating statistics
-
removeEntity
public T removeEntity() throws SystemException
Remove the entity from memory, assuming it has been deleted from persistence.- Returns:
- the removed entity
- Throws:
SystemException
- throw if an error occurs in re-calculating page count and statistics
-
isEntityListRowEntityView
public boolean isEntityListRowEntityView()
Is entityListBackingBean rowEntityView? i.e. each entity is backed by EntityBackingBean.- Returns:
- true for rowEntityView.
-
getEntityListBackingBean
public EntityListBackingBean<T> getEntityListBackingBean()
Get the EntityListBackingBean where each entity is backed by EntityBackingBean.- Returns:
- EntityListBackingBean instance
-
-