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

java.lang.Object
  extended by fr.paris.lutece.plugins.crm.business.demand.DemandTypeDAO
All Implemented Interfaces:
IDemandTypeDAO

public class DemandTypeDAO
extends Object
implements IDemandTypeDAO

DemandTypeDAO


Constructor Summary
DemandTypeDAO()
           
 
Method Summary
 void delete(int nIdDemandType, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete a record from the table
 int insert(DemandType demandType, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Insert a new record in the table.
 DemandType load(int nIdDemandType, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the data from the table
 int newPrimaryKey(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Generates a new primary key
 List<DemandType> selectAll(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Find all demand types
 List<DemandType> selectByIdCategoryAndDate(int nIdCategory, Date dateToday, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Find all demand types for the LuteceUser
 DemandType selectByOrder(int nOrder, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Find by order
 List<DemandType> selectDemandTypesByFilter(DemandTypeFilter dtFilter, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Find by filter
 int selectMaxOrder(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Find the max order
 List<DemandType> selectNoDateEndDemandTypes(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Find the demand types that have not a date end
 void store(DemandType demandType, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Update the record in the table
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DemandTypeDAO

public DemandTypeDAO()
Method Detail

newPrimaryKey

public int newPrimaryKey(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Generates a new primary key

Specified by:
newPrimaryKey in interface IDemandTypeDAO
Parameters:
plugin - The Plugin
Returns:
The new primary key

insert

public int insert(DemandType demandType,
                  fr.paris.lutece.portal.service.plugin.Plugin plugin)
Insert a new record in the table.

Specified by:
insert in interface IDemandTypeDAO
Parameters:
demandType - instance
plugin - the Plugin
Returns:
the key of the newly created object

load

public DemandType load(int nIdDemandType,
                       fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data from the table

Specified by:
load in interface IDemandTypeDAO
Parameters:
nIdDemandType - The identifier of the DemandType
plugin - the Plugin
Returns:
The instance of the object

store

public void store(DemandType demandType,
                  fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update the record in the table

Specified by:
store in interface IDemandTypeDAO
Parameters:
demandType - the reference of the object
plugin - the Plugin

delete

public void delete(int nIdDemandType,
                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
Delete a record from the table

Specified by:
delete in interface IDemandTypeDAO
Parameters:
nIdDemandType - int identifier of the DemandType to delete
plugin - the Plugin

selectAll

public List<DemandType> selectAll(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Find all demand types

Specified by:
selectAll in interface IDemandTypeDAO
Parameters:
plugin - Plugin
Returns:
a list of DemandType

selectByIdCategoryAndDate

public List<DemandType> selectByIdCategoryAndDate(int nIdCategory,
                                                  Date dateToday,
                                                  fr.paris.lutece.portal.service.plugin.Plugin plugin)
Find all demand types for the LuteceUser

Specified by:
selectByIdCategoryAndDate in interface IDemandTypeDAO
Parameters:
nIdCategory - the ID category
dateToday - today
plugin - Plugin
Returns:
a list of DemandType

selectByOrder

public DemandType selectByOrder(int nOrder,
                                fr.paris.lutece.portal.service.plugin.Plugin plugin)
Find by order

Specified by:
selectByOrder in interface IDemandTypeDAO
Parameters:
nOrder - the order
plugin - the Plugin
Returns:
a DemandType

selectMaxOrder

public int selectMaxOrder(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Find the max order

Specified by:
selectMaxOrder in interface IDemandTypeDAO
Parameters:
plugin - Plugin
Returns:
the max order

selectDemandTypesByFilter

public List<DemandType> selectDemandTypesByFilter(DemandTypeFilter dtFilter,
                                                  fr.paris.lutece.portal.service.plugin.Plugin plugin)
Find by filter

Specified by:
selectDemandTypesByFilter in interface IDemandTypeDAO
Parameters:
dtFilter - the filter
plugin - Plugin
Returns:
a list of DemandType

selectNoDateEndDemandTypes

public List<DemandType> selectNoDateEndDemandTypes(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Find the demand types that have not a date end

Specified by:
selectNoDateEndDemandTypes in interface IDemandTypeDAO
Parameters:
plugin - the plugin
Returns:
a list of demand types


Copyright © 2013 Mairie de Paris. All Rights Reserved.