public class DemandService extends Object
Modifier | Constructor and Description |
---|---|
protected |
DemandService()
Constructor
|
Modifier and Type | Method and Description |
---|---|
int |
countByFilter(DemandFilter dFilter)
Count results by filter
|
int |
create(Demand demand)
Create a new demand
|
List<Demand> |
findAll()
Find all demands
|
List<Demand> |
findByFilter(DemandFilter dFilter)
Find by filter
|
Map<String,List<Demand>> |
findByFilterMap(DemandFilter dFilter,
Locale locale,
PaginationFilterSortManager paginationFilterSortManager)
Find by filter with map
|
List<Demand> |
findByFilterWithPagination(DemandFilter dFilter,
IPaginationProperties paginationProperties)
Find by filter with pagination
|
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
|
Demand |
findByPrimaryKey(int nIdDemand)
Find a demand by its primary key
|
Demand |
findByRemoteKey(String strRemoteId,
int nIdDemandType)
Find a demand by Remote key
|
static DemandService |
getService()
Get an instance of
DemandService |
void |
remove(int nIdDemand)
Remove a demand
|
void |
removeByIdDemandType(int nIdDemandType)
Remove the demands given an id demand type
|
void |
removeWithItsResource(int nIdDemand,
boolean bByDaemon)
Remove a demand and its resource
|
void |
update(Demand demand)
Update a demand
|
public static DemandService getService()
DemandService
DemandService
public Demand findByPrimaryKey(int nIdDemand)
nIdDemand
- the id demandDemand
public Demand findByRemoteKey(String strRemoteId, int nIdDemandType)
strRemoteId
- the remote IdnIdDemandType
- the idDemandTypeDemand
public int create(Demand demand)
demand
- the demandpublic void update(Demand demand)
demand
- the demandpublic void remove(int nIdDemand)
nIdDemand
- the id demandpublic void removeWithItsResource(int nIdDemand, boolean bByDaemon)
nIdDemand
- the id demandpublic void removeByIdDemandType(int nIdDemandType)
nIdDemandType
- the id demand typepublic List<Demand> findByFilter(DemandFilter dFilter)
dFilter
- the filterDemand
public Map<String,List<Demand>> findByIdCRMUser(int nIdCRMUser, Locale locale, int nIdStatusToSort, List<DemandSort> listDemandSort)
nIdCRMUser
- the user crm idlocale
- Locale
nIdStatusToSort
- the id status of demands that will be sortedlistDemandSort
- the sorts to applypublic Map<String,List<Demand>> findByFilterMap(DemandFilter dFilter, Locale locale, PaginationFilterSortManager paginationFilterSortManager)
nIdCRMUser
- the user crm idlocale
- Locale
public List<Demand> findByFilterWithPagination(DemandFilter dFilter, IPaginationProperties paginationProperties)
dFilter
- the filterpaginationProperties
- the pagination propertiesDemand
public int countByFilter(DemandFilter dFilter)
dFilter
- the filterCopyright © 2019 City of Paris. All rights reserved.