Class BatchDAO
java.lang.Object
fr.paris.lutece.plugins.identityimport.business.BatchDAO
- All Implemented Interfaces:
IBatchDAO
This class provides Data Access methods for Batch objects
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcountIdentities(int resourceId, fr.paris.lutece.portal.service.plugin.Plugin plugin) voiddelete(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin) Delete a record from the tableList<fr.paris.lutece.plugins.workflowcore.business.resource.ResourceHistory>getBatchHistory(int batchId, fr.paris.lutece.portal.service.plugin.Plugin plugin) intgetBatchInitialActionId(fr.paris.lutece.portal.service.plugin.Plugin plugin) Get the id of the action for batches in initial stateintgetBatchInTreatmentActionId(fr.paris.lutece.portal.service.plugin.Plugin plugin) Get the id of the action for batches in treatment statevoidInsert a new record in the table.load(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin) Load the data from the tableselectBatchByReference(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 listselectBatchsListByIds(fr.paris.lutece.portal.service.plugin.Plugin plugin, List<Integer> listIds) Load the data of all the avant objects and returns them as a listfr.paris.lutece.util.ReferenceListselectBatchsReferenceList(fr.paris.lutece.portal.service.plugin.Plugin plugin) Load the data of all the batch objects and returns them as a referenceListselectBatchState(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 listselectExpiredBatchsList(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 listselectInitialStateBatches(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 listvoidUpdate the record in the table
-
Constructor Details
-
BatchDAO
public BatchDAO()
-
-
Method Details
-
insert
Insert a new record in the table. -
load
Load the data from the table -
delete
public void delete(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin) Delete a record from the table -
store
Update the record in the table -
selectBatchsList
Load the data of all the batch objects and returns them as a list- Specified by:
selectBatchsListin interfaceIBatchDAO- 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:
selectBatchStatesin interfaceIBatchDAO
-
selectBatchState
public ResourceState selectBatchState(int batchId, fr.paris.lutece.portal.service.plugin.Plugin plugin) - Specified by:
selectBatchStatein interfaceIBatchDAO
-
countIdentities
public int countIdentities(int resourceId, fr.paris.lutece.portal.service.plugin.Plugin plugin) - Specified by:
countIdentitiesin interfaceIBatchDAO
-
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:
selectExpiredBatchsListin interfaceIBatchDAOplugin- 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:
selectInitialStateBatchesin interfaceIBatchDAO- Parameters:
batchLimit- the limitplugin- 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:
selectClosableBatchesin interfaceIBatchDAO- Parameters:
batchLimit- the limitplugin- 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:
selectBatchByReferencein interfaceIBatchDAO
-
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:
selectIdBatchsListin interfaceIBatchDAO- Parameters:
batchStateId- the id of the batch state to filter results withfilterAppCode- the application code to filter the results withplugin- 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:
selectBatchsReferenceListin interfaceIBatchDAO- 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:
selectBatchsListByIdsin interfaceIBatchDAO- Parameters:
plugin- the PluginlistIds- 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:
getBatchHistoryin interfaceIBatchDAO
-
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:
getBatchInitialActionIdin interfaceIBatchDAO- 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:
getBatchInTreatmentActionIdin interfaceIBatchDAO- Parameters:
plugin- the plugin- Returns:
- the action id
- Throws:
fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
-