Class PoolItemProvider


  • public class PoolItemProvider
    extends Object
    Data provider for business objects (pool items) that handles loading and accessing data. Extends the PoolItemProvider class.
    Author:
    Mauricio Ruiz Beltrán <mauricio.ruiz@kuwaiba.org>
    • Constructor Detail

      • PoolItemProvider

        public PoolItemProvider​(BusinessEntityManager bem,
                                TranslationService ts)
        Constructs a new instance of PoolItemProvider.
        Parameters:
        bem - Reference to the Business Entity Manager.
        ts - Reference to the Translation Service.
    • Method Detail

      • buildDataProvider

        public com.vaadin.flow.data.provider.AbstractBackEndDataProvider<BusinessObjectLight,​Void> buildDataProvider​(InventoryObjectPool parentPool,
                                                                                                                           BusinessObjectLight rootObject,
                                                                                                                           boolean includedSelf)
        Builds a data provider for business objects from a given pool.
        Parameters:
        parentPool - The parent pool from which data will be retrieved.
        rootObject - Is there a root object?
        includedSelf - Boolean indicating whether the root object should be included in the retrieved data.
        Returns:
        Built data provider for pool items.
      • getPoolItems

        public List<BusinessObjectLight> getPoolItems​(InventoryObjectPool parentPool)
        Retrieves the items of a given pool.
        Parameters:
        parentPool - The parent pool from which the items will be obtained.
        Returns:
        The business objects that are items of a given pool.