fr.paris.lutece.plugins.crm.business.demand
Class DemandTypeHome

java.lang.Object
  extended by fr.paris.lutece.plugins.crm.business.demand.DemandTypeHome

public final class DemandTypeHome
extends java.lang.Object

DemandTypeHome


Method Summary
static int create(DemandType demandType)
          Insert a new record in the table.
static java.util.List<DemandType> findAll()
          Find all demandTypes
static java.util.List<DemandType> findByFilter(DemandTypeFilter dtFilter)
          Find by filter
static java.util.List<DemandType> findByIdCategoryAndDate(int nIdCategory, java.util.Date dateToday)
          Find the list of demandTypes by id category and date
static DemandType findByOrder(int nOrder)
          Find the demandType by its order
static DemandType findByPrimaryKey(int nIdDemandType)
          Load the data from the table
static fr.paris.lutece.util.ReferenceList findDemandTypes()
          Find all demandTypes as a ReferenceList
static int findMaxOrder()
          Find the max order
static int newPrimaryKey()
          Generates a new primary key
static void remove(int nIdDemandType)
          Delete a record from the table
static void update(DemandType demandType)
          Update the record in the table
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

newPrimaryKey

public static int newPrimaryKey()
Generates a new primary key

Returns:
The new primary key

create

public static int create(DemandType demandType)
Insert a new record in the table.

Parameters:
demandType - instance of the DemandType object to insert
Returns:
the key of the newly created demandType

update

public static void update(DemandType demandType)
Update the record in the table

Parameters:
demandType - the reference of the demandType

remove

public static void remove(int nIdDemandType)
Delete a record from the table

Parameters:
nIdDemandType - int identifier of the demandType to delete

findByPrimaryKey

public static DemandType findByPrimaryKey(int nIdDemandType)
Load the data from the table

Parameters:
nIdDemandType - The identifier of the demandType
Returns:
The instance of the demandType

findByOrder

public static DemandType findByOrder(int nOrder)
Find the demandType by its order

Parameters:
nOrder - the order
Returns:
a DemandType

findAll

public static java.util.List<DemandType> findAll()
Find all demandTypes

Returns:
a list of DemandType

findByIdCategoryAndDate

public static java.util.List<DemandType> findByIdCategoryAndDate(int nIdCategory,
                                                                 java.util.Date dateToday)
Find the list of demandTypes by id category and date

Parameters:
nIdCategory - the ID category
dateToday - the date of today
Returns:
a list of DemandType

findDemandTypes

public static fr.paris.lutece.util.ReferenceList findDemandTypes()
Find all demandTypes as a ReferenceList

Returns:
a ReferenceList

findMaxOrder

public static int findMaxOrder()
Find the max order

Returns:
the max order

findByFilter

public static java.util.List<DemandType> findByFilter(DemandTypeFilter dtFilter)
Find by filter

Parameters:
dtFilter - the filter
Returns:
a list of DemandType


Copyright © 2011 Mairie de Paris. All Rights Reserved.