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
|
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()
DemandServiceDemandServicepublic Demand findByPrimaryKey(int nIdDemand)
nIdDemand - the id demandDemandpublic 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 filterDemandpublic Map<String,List<Demand>> findByIdCRMUser(int nIdCRMUser, Locale locale, int nIdStatusToSort, List<DemandSort> listDemandSort)
nIdCRMUser - the user crm idlocale - LocalenIdStatusToSort - 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 - Localepublic List<Demand> findByFilterWithPagination(DemandFilter dFilter, IPaginationProperties paginationProperties)
dFilter - the filterpaginationProperties - the pagination propertiesDemandpublic int countByFilter(DemandFilter dFilter)
dFilter - the filterCopyright © 2014 Mairie de Paris. All rights reserved.