java.lang.Object
fr.paris.lutece.plugins.identityimport.business.BatchDAO
All Implemented Interfaces:
IBatchDAO

public final class BatchDAO extends Object implements IBatchDAO
This class provides Data Access methods for Batch objects
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    countIdentities(int resourceId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
     
    void
    delete(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Delete a record from the table
    List<fr.paris.lutece.plugins.workflowcore.business.resource.ResourceHistory>
    getBatchHistory(int batchId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
     
    int
    getBatchInitialActionId(fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Get the id of the action for batches in initial state
    int
    getBatchInTreatmentActionId(fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Get the id of the action for batches in treatment state
    void
    insert(Batch batch, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Insert a new record in the table.
    load(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Load the data from the table
    selectBatchByReference(fr.paris.lutece.portal.service.plugin.Plugin plugin, String reference)
     
    selectBatchsList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Load the data of all the batch objects and returns them as a list
    selectBatchsListByIds(fr.paris.lutece.portal.service.plugin.Plugin plugin, List<Integer> listIds)
    Load the data of all the avant objects and returns them as a list
    fr.paris.lutece.util.ReferenceList
    selectBatchsReferenceList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Load the data of all the batch objects and returns them as a referenceList
    selectBatchState(int batchId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
     
    selectBatchStates(String filterAppCode, String filterClientCode, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    selectClosableBatches(int batchLimit, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Load the data of all the batches in the in treatment workflow state and returns them as a list
    selectExpiredBatchsList(int batchLimit, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Load the data of all the expired batch objects and returns them as a list.
    selectIdBatchsList(Integer batchStateId, String filterAppCode, String filterClientCode, String filterReference, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Load the id of all the batch objects that are in given state and returns them as a list
    selectInitialStateBatches(int batchLimit, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Load the data of all the batches in the initial workflow state and returns them as a list
    void
    store(Batch batch, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Update the record in the table

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BatchDAO

      public BatchDAO()
  • Method Details

    • insert

      public void insert(Batch batch, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Insert a new record in the table.
      Specified by:
      insert in interface IBatchDAO
      Parameters:
      batch - instance of the Batch object to insert
      plugin - the Plugin
    • load

      public Optional<Batch> load(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the data from the table
      Specified by:
      load in interface IBatchDAO
      Parameters:
      nKey - The identifier of the batch
      plugin - the Plugin
      Returns:
      The instance of the batch
    • delete

      public void delete(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Delete a record from the table
      Specified by:
      delete in interface IBatchDAO
      Parameters:
      nKey - The identifier of the Batch to delete
      plugin - the Plugin
    • store

      public void store(Batch batch, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Update the record in the table
      Specified by:
      store in interface IBatchDAO
      Parameters:
      batch - the reference of the Batch
      plugin - the Plugin
    • selectBatchsList

      public List<Batch> selectBatchsList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the data of all the batch objects and returns them as a list
      Specified by:
      selectBatchsList in interface IBatchDAO
      Parameters:
      plugin - the Plugin
      Returns:
      The list which contains the data of all the batch objects
    • selectBatchStates

      public List<ResourceState> selectBatchStates(String filterAppCode, String filterClientCode, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Specified by:
      selectBatchStates in interface IBatchDAO
    • selectBatchState

      public ResourceState selectBatchState(int batchId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Specified by:
      selectBatchState in interface IBatchDAO
    • countIdentities

      public int countIdentities(int resourceId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Specified by:
      countIdentities in interface IBatchDAO
    • selectExpiredBatchsList

      public List<Batch> selectExpiredBatchsList(int batchLimit, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the data of all the expired batch objects and returns them as a list.
      A batch is considered expired if it is finalized and it's creation date exceeds data retention time of the client.
      Specified by:
      selectExpiredBatchsList in interface IBatchDAO
      plugin - the Plugin
      Returns:
      The list which contains the data of all the expired batch objects
    • selectInitialStateBatches

      public List<Batch> selectInitialStateBatches(int batchLimit, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the data of all the batches in the initial workflow state and returns them as a list
      Specified by:
      selectInitialStateBatches in interface IBatchDAO
      Parameters:
      batchLimit - the limit
      plugin - the plugin
      Returns:
      batches in the initial workflow state
    • selectClosableBatches

      public List<Batch> selectClosableBatches(int batchLimit, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the data of all the batches in the in treatment workflow state and returns them as a list
      Specified by:
      selectClosableBatches in interface IBatchDAO
      Parameters:
      batchLimit - the limit
      plugin - the plugin
      Returns:
      batches in the initial workflow state
    • selectBatchByReference

      public Batch selectBatchByReference(fr.paris.lutece.portal.service.plugin.Plugin plugin, String reference)
      Specified by:
      selectBatchByReference in interface IBatchDAO
    • selectIdBatchsList

      public List<Integer> selectIdBatchsList(Integer batchStateId, String filterAppCode, String filterClientCode, String filterReference, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the id of all the batch objects that are in given state and returns them as a list
      Specified by:
      selectIdBatchsList in interface IBatchDAO
      Parameters:
      batchStateId - the id of the batch state to filter results with
      filterAppCode - the application code to filter the results with
      plugin - the Plugin
      Returns:
      The list which contains the id of all the batch objects
    • selectBatchsReferenceList

      public fr.paris.lutece.util.ReferenceList selectBatchsReferenceList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the data of all the batch objects and returns them as a referenceList
      Specified by:
      selectBatchsReferenceList in interface IBatchDAO
      Parameters:
      plugin - the Plugin
      Returns:
      The referenceList which contains the data of all the batch objects
    • selectBatchsListByIds

      public List<Batch> selectBatchsListByIds(fr.paris.lutece.portal.service.plugin.Plugin plugin, List<Integer> listIds)
      Load the data of all the avant objects and returns them as a list
      Specified by:
      selectBatchsListByIds in interface IBatchDAO
      Parameters:
      plugin - the Plugin
      listIds - liste of ids
      Returns:
      The list which contains the data of all the avant objects
    • getBatchHistory

      public List<fr.paris.lutece.plugins.workflowcore.business.resource.ResourceHistory> getBatchHistory(int batchId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Specified by:
      getBatchHistory in interface IBatchDAO
    • getBatchInitialActionId

      public int getBatchInitialActionId(fr.paris.lutece.portal.service.plugin.Plugin plugin) throws fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
      Get the id of the action for batches in initial state
      Specified by:
      getBatchInitialActionId in interface IBatchDAO
      Parameters:
      plugin - the plugin
      Returns:
      the action id
      Throws:
      fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
    • getBatchInTreatmentActionId

      public int getBatchInTreatmentActionId(fr.paris.lutece.portal.service.plugin.Plugin plugin) throws fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
      Get the id of the action for batches in treatment state
      Specified by:
      getBatchInTreatmentActionId in interface IBatchDAO
      Parameters:
      plugin - the plugin
      Returns:
      the action id
      Throws:
      fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException