fr.paris.lutece.plugins.crm.service.demand
Class DemandService

java.lang.Object
  extended by fr.paris.lutece.plugins.crm.service.demand.DemandService

public class DemandService
extends java.lang.Object

DemandService


Constructor Summary
protected DemandService()
          Constructor
 
Method Summary
 int create(Demand demand)
          Create a new demand
 java.util.List<Demand> findAll()
          Find all demands
 java.util.List<Demand> findByFilter(DemandFilter dFilter)
          Find by filter
 java.util.Map<java.lang.String,java.util.List<Demand>> findByIdCRMUser(int nIdCRMUser, java.util.Locale locale)
          Find the demands given an user crm id
 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)
          Remove a demand and its resource
 void update(Demand demand)
          Update a demand
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DemandService

protected DemandService()
Constructor

Method Detail

getService

public static DemandService getService()
Get an instance of DemandService

Returns:
an instance of DemandService

findByPrimaryKey

public Demand findByPrimaryKey(int nIdDemand)
Find a demand by its primary key

Parameters:
nIdDemand - the id demand
Returns:
a Demand

create

public int create(Demand demand)
Create a new demand

Parameters:
demand - the demand
Returns:
the newly created demand id

update

public void update(Demand demand)
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)
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

public java.util.List<Demand> findAll()
Find all demands

Returns:
a list of Demand

findByFilter

public java.util.List<Demand> findByFilter(DemandFilter dFilter)
Find by filter

Parameters:
dFilter - the filter
Returns:
a list of Demand

findByIdCRMUser

public java.util.Map<java.lang.String,java.util.List<Demand>> findByIdCRMUser(int nIdCRMUser,
                                                                              java.util.Locale locale)
Find the demands given an user crm id

Parameters:
nIdCRMUser - the user crm id
locale - Locale
Returns:
a map of (id_status_crm, List<Demand>)


Copyright © 2011 Mairie de Paris. All Rights Reserved.