Class DemandService
java.lang.Object
fr.paris.lutece.plugins.crm.service.demand.DemandService
DemandService
-
Method Summary
Modifier and TypeMethodDescriptionintcountByFilter(DemandFilter dFilter) Count results by filterintCreate a new demandfindAll()Find all demandsfindByFilter(DemandFilter dFilter) Find by filterfindByFilterMap(DemandFilter dFilter, Locale locale, PaginationFilterSortManager paginationFilterSortManager) Find by filter with mapfindByFilterWithPagination(DemandFilter dFilter, IPaginationProperties paginationProperties) Find by filter with paginationfindByIdCRMUser(int nIdCRMUser, Locale locale, int nIdStatusToSort, List<DemandSort> listDemandSort) Find the demands given an user crm id, results can be sortedfindByPrimaryKey(int nIdDemand) Find a demand by its primary keyfindByRemoteKey(String strRemoteId, int nIdDemandType) Find a demand by Remote keystatic DemandServiceGet an instance ofDemandServicevoidremove(int nIdDemand) Remove a demandvoidremoveByIdDemandType(int nIdDemandType) Remove the demands given an id demand typevoidremoveWithItsResource(int nIdDemand, boolean bByDaemon) Remove a demand and its resourcevoidUpdate a demand
-
Method Details
-
getService
Get an instance ofDemandService- Returns:
- an instance of
DemandService
-
findByPrimaryKey
Find a demand by its primary key- Parameters:
nIdDemand- the id demand- Returns:
- a
Demand
-
findByRemoteKey
Find a demand by Remote key- Parameters:
strRemoteId- the remote IdnIdDemandType- the idDemandType- Returns:
- a
Demand
-
create
Create a new demand- Parameters:
demand- the demand- Returns:
- the newly created demand id
-
update
Update a demand- Parameters:
demand- the demand
-
remove
public void remove(int nIdDemand) Remove a demand- Parameters:
nIdDemand- the id demand
-
removeWithItsResource
public void removeWithItsResource(int nIdDemand, boolean bByDaemon) Remove a demand and its resource- Parameters:
nIdDemand- the id demand
-
removeByIdDemandType
public void removeByIdDemandType(int nIdDemandType) Remove the demands given an id demand type- Parameters:
nIdDemandType- the id demand type
-
findAll
Find all demands- Returns:
- a list of
Demand
-
findByFilter
Find by filter- Parameters:
dFilter- the filter- Returns:
- a list of
Demand
-
findByIdCRMUser
public Map<String,List<Demand>> findByIdCRMUser(int nIdCRMUser, Locale locale, int nIdStatusToSort, List<DemandSort> listDemandSort) Find the demands given an user crm id, results can be sorted- Parameters:
nIdCRMUser- the user crm idlocale-LocalenIdStatusToSort- the id status of demands that will be sortedlistDemandSort- the sorts to apply- Returns:
- a map of (id_status_crm, List<Demand>)
-
findByFilterMap
public Map<String,List<Demand>> findByFilterMap(DemandFilter dFilter, Locale locale, PaginationFilterSortManager paginationFilterSortManager) Find by filter with map- Parameters:
nIdCRMUser- the user crm idlocale-Locale- Returns:
- a map of (id_status_crm, List<Demand>)
-
findByFilterWithPagination
public List<Demand> findByFilterWithPagination(DemandFilter dFilter, IPaginationProperties paginationProperties) Find by filter with pagination- Parameters:
dFilter- the filterpaginationProperties- the pagination properties- Returns:
- a list of
Demand
-
countByFilter
Count results by filter- Parameters:
dFilter- the filter- Returns:
- the number of results
-