java.lang.Object
fr.paris.lutece.plugins.identityimport.business.BatchHome

public final class BatchHome extends Object
This class provides instances management methods (create, find, ...) for Batch objects
  • Method Details

    • create

      public static Batch create(Batch batch)
      Create an instance of the batch class
      Parameters:
      batch - The instance of the Batch which contains the information to store
      Returns:
      The instance of batch which has been created with its primary key.
    • update

      public static Batch update(Batch batch)
      Update of the batch which is specified in parameter
      Parameters:
      batch - The instance of the Batch which contains the data to store
      Returns:
      The instance of the batch which has been updated
    • remove

      public static void remove(int nKey)
      Remove the batch whose identifier is specified in parameter
      Parameters:
      nKey - The batch Id
    • findByPrimaryKey

      public static Optional<Batch> findByPrimaryKey(int nKey)
      Returns an instance of a batch whose identifier is specified in parameter
      Parameters:
      nKey - The batch primary key
      Returns:
      an instance of Batch
    • getBatchsList

      public static List<Batch> getBatchsList()
      Load the data of all the batch objects and returns them as a list
      Returns:
      the list which contains the data of all the batch objects
    • getIdBatchsList

      public static List<Integer> getIdBatchsList(ResourceState resourceState, String filterAppCode, String filterClientCode, String filterReference)
      Load the id of all the batch objects and returns them as a list
      Returns:
      the list which contains the id of all the batch objects
    • getBatchsReferenceList

      public static fr.paris.lutece.util.ReferenceList getBatchsReferenceList()
      Load the data of all the batch objects and returns them as a referenceList
      Returns:
      the referenceList which contains the data of all the batch objects
    • getBatchsListByIds

      public static List<Batch> getBatchsListByIds(List<Integer> listIds)
      Load the data of all the avant objects and returns them as a list
      Parameters:
      listIds - liste of ids
      Returns:
      the list which contains the data of all the avant objects
    • getBatch

      public static Batch getBatch(String reference)
    • getBatch

      public static Optional<Batch> getBatch(int id)
    • findExpiredBatches

      public static List<Batch> findExpiredBatches(int batchLimit)
      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.
      Returns:
      The list which contains the data of all the expired batch objects
    • findInitialStateBatches

      public static List<Batch> findInitialStateBatches(int batchLimit)
      Load the data of all the batches in the initial workflow state and returns them as a list
      Parameters:
      batchLimit - the limit
      Returns:
      batches in the initial workflow state
    • findClosableBatches

      public static List<Batch> findClosableBatches(int batchLimit)
      Load the data of all the batches in the initial workflow state and returns them as a list
      Parameters:
      batchLimit - the limit
      Returns:
      batches in the initial workflow state
    • getBatchStates

      public static List<ResourceState> getBatchStates(String filterAppCode, String filterClientCode)
    • getBatchState

      public static ResourceState getBatchState(int batchId)
    • getIdentitiesCount

      public static int getIdentitiesCount(int resourceId)
    • getBatchHistory

      public static List<fr.paris.lutece.plugins.workflowcore.business.resource.ResourceHistory> getBatchHistory(int batchId)
    • getBatchInitialActionId

      public static int getBatchInitialActionId() throws fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
      Get the id of the action for batches in initial state
      Returns:
      the action id
      Throws:
      fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
    • getBatchInTreatmentActionId

      public static int getBatchInTreatmentActionId() throws fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
      Get the id of the action for batches in initial state
      Returns:
      the action id
      Throws:
      fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException