Class EntityOfEntityList<T extends PersistenceEntity>

  • 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 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 list
        entityIndex - 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