Class ServiceContractDAO
java.lang.Object
fr.paris.lutece.plugins.identitystore.business.contract.ServiceContractDAO
- All Implemented Interfaces:
IServiceContractDAO
This class provides Data Access methods for ServiceContract objects
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from interface fr.paris.lutece.plugins.identitystore.business.contract.IServiceContractDAO
BEAN_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose(ServiceContract serviceContract, fr.paris.lutece.portal.service.plugin.Plugin plugin) Close service contractvoiddelete(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin) Delete a record from the tablevoiddeleteFromClientApp(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin) getServiceContractsListWithMinEndDate(fr.paris.lutece.portal.service.plugin.Plugin plugin, Date minEndDate) Load the data of all the service contracts with a min end date as specifiedvoidinsert(ServiceContract serviceContract, int clientApplicationId, 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 tableloadFromClientApplication(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin) selectActiveServiceContract(String clientCode, fr.paris.lutece.portal.service.plugin.Plugin plugin) get active service contratc list (must contains only one)selectActiveServiceContract(String clientCode, Date specificDate, fr.paris.lutece.portal.service.plugin.Plugin plugin) get active service contratc list (must contains only one) for a specific dateselectAllServiceContractsList(fr.paris.lutece.portal.service.plugin.Plugin plugin) Load the data of all the service contracts and returns them as a listselectFilterdIdServiceContractsList(Map<String, String> params, fr.paris.lutece.portal.service.plugin.Plugin plugin) Select service contract Ids by filtreselectIdServiceContractsList(fr.paris.lutece.portal.service.plugin.Plugin plugin) Load the id of all the serviceContract objects and returns them as a listselectServiceContractBetweenDate(fr.paris.lutece.portal.service.plugin.Plugin plugin, Date startingDate, Date endingDate) Load the data of all the service contracts between two date and returns them as a listList<org.apache.commons.lang3.tuple.ImmutablePair<ServiceContract,String>> selectServiceContractsListByIds(fr.paris.lutece.portal.service.plugin.Plugin plugin, List<Integer> listIds) Load the data of all the avant objects and returns them as a listvoidstore(ServiceContract serviceContract, int clientApplicationId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Update the record in the tablevoidupdateLastUpdateAuthor(int idService, String authorName, fr.paris.lutece.portal.service.plugin.Plugin plugin) update author
-
Field Details
-
QUERY_PARAM_ACTIVE
- See Also:
-
QUERY_PARAM_CONTRACT_NAME
- See Also:
-
QUERY_PARAM_CLIENT_CODE
- See Also:
-
QUERY_PARAM_START_DATE
- See Also:
-
QUERY_PARAM_END_DATE
- See Also:
-
-
Constructor Details
-
ServiceContractDAO
public ServiceContractDAO()
-
-
Method Details
-
insert
public void insert(ServiceContract serviceContract, int clientApplicationId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Insert a new record in the table.- Specified by:
insertin interfaceIServiceContractDAO- Parameters:
serviceContract- instance of the ServiceContract object to insertplugin- the Plugin
-
load
public Optional<ServiceContract> load(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin) Load the data from the table- Specified by:
loadin interfaceIServiceContractDAO- Parameters:
nKey- The identifier of the serviceContractplugin- the Plugin- Returns:
- The instance of the serviceContract
-
loadFromClientApplication
public List<ServiceContract> loadFromClientApplication(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin) - Specified by:
loadFromClientApplicationin interfaceIServiceContractDAO
-
selectActiveServiceContract
public List<ServiceContract> selectActiveServiceContract(String clientCode, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:IServiceContractDAOget active service contratc list (must contains only one)- Specified by:
selectActiveServiceContractin interfaceIServiceContractDAO- Returns:
- the list of service contracts
-
selectActiveServiceContract
public List<ServiceContract> selectActiveServiceContract(String clientCode, Date specificDate, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:IServiceContractDAOget active service contratc list (must contains only one) for a specific date- Specified by:
selectActiveServiceContractin interfaceIServiceContractDAO- Returns:
- the list of service contracts
-
close
public void close(ServiceContract serviceContract, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:IServiceContractDAOClose service contract- Specified by:
closein interfaceIServiceContractDAO
-
updateLastUpdateAuthor
public void updateLastUpdateAuthor(int idService, String authorName, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:IServiceContractDAOupdate author- Specified by:
updateLastUpdateAuthorin interfaceIServiceContractDAO
-
selectFilterdIdServiceContractsList
public List<Integer> selectFilterdIdServiceContractsList(Map<String, String> params, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:IServiceContractDAOSelect service contract Ids by filtre- Specified by:
selectFilterdIdServiceContractsListin interfaceIServiceContractDAO- Returns:
- the list of ids
-
delete
public void delete(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin) Delete a record from the table- Specified by:
deletein interfaceIServiceContractDAO- Parameters:
nKey- The identifier of the ServiceContract to deleteplugin- the Plugin
-
deleteFromClientApp
public void deleteFromClientApp(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin) - Specified by:
deleteFromClientAppin interfaceIServiceContractDAO
-
store
public void store(ServiceContract serviceContract, int clientApplicationId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Update the record in the table- Specified by:
storein interfaceIServiceContractDAO- Parameters:
serviceContract- the reference of the ServiceContractplugin- the Plugin
-
selectIdServiceContractsList
public List<Integer> selectIdServiceContractsList(fr.paris.lutece.portal.service.plugin.Plugin plugin) Load the id of all the serviceContract objects and returns them as a list- Specified by:
selectIdServiceContractsListin interfaceIServiceContractDAO- Parameters:
plugin- the Plugin- Returns:
- The list which contains the id of all the serviceContract objects
-
selectServiceContractsListByIds
public List<org.apache.commons.lang3.tuple.ImmutablePair<ServiceContract,String>> selectServiceContractsListByIds(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:
selectServiceContractsListByIdsin interfaceIServiceContractDAO- Parameters:
plugin- the PluginlistIds- liste of ids- Returns:
- The list which contains the data of all the avant objects
-
selectServiceContractBetweenDate
public List<ServiceContract> selectServiceContractBetweenDate(fr.paris.lutece.portal.service.plugin.Plugin plugin, Date startingDate, Date endingDate) Description copied from interface:IServiceContractDAOLoad the data of all the service contracts between two date and returns them as a list- Specified by:
selectServiceContractBetweenDatein interfaceIServiceContractDAO- Parameters:
plugin- the PluginstartingDate- starting date of the contractendingDate- ending date of the contract- Returns:
- The list which contains the data of all the avant objects
-
getServiceContractsListWithMinEndDate
public List<ServiceContract> getServiceContractsListWithMinEndDate(fr.paris.lutece.portal.service.plugin.Plugin plugin, Date minEndDate) Description copied from interface:IServiceContractDAOLoad the data of all the service contracts with a min end date as specified- Specified by:
getServiceContractsListWithMinEndDatein interfaceIServiceContractDAO- Parameters:
plugin- - the pluginminEndDate- - the min end date- Returns:
- List
-
selectAllServiceContractsList
public List<ServiceContract> selectAllServiceContractsList(fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:IServiceContractDAOLoad the data of all the service contracts and returns them as a list- Specified by:
selectAllServiceContractsListin interfaceIServiceContractDAO- Parameters:
plugin- the plugin- Returns:
- The list which contains the data of all ServiceContract objects
-