fr.paris.lutece.plugins.genericattributes.business
Class ResponseDAO

java.lang.Object
  extended by fr.paris.lutece.plugins.genericattributes.business.ResponseDAO
All Implemented Interfaces:
IResponseDAO

public final class ResponseDAO
extends Object
implements IResponseDAO

This class provides Data Access methods for Response objects


Constructor Summary
ResponseDAO()
           
 
Method Summary
 void delete(int nIdResponse, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete a response from its id
 int getMaxNumber(int nIdEntry, int nIdResource, String strResourceType, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Get the max number from a given id resource
 List<StatisticEntrySubmit> getStatisticByIdEntry(int nIdEntry, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          return a list of statistic on the entry
 void insert(Response response, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Insert a new record in the table.
 Response load(int nIdResponse, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the data of the response from the table
 List<Response> selectListByFilter(ResponseFilter filter, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the data of all the response who verify the filter and returns them in a list
 void store(Response response, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Update the the response in the table
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResponseDAO

public ResponseDAO()
Method Detail

insert

public void insert(Response response,
                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
Insert a new record in the table.

Specified by:
insert in interface IResponseDAO
Parameters:
response - instance of the Response object to insert
plugin - the plugin

load

public Response load(int nIdResponse,
                     fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of the response from the table

Specified by:
load in interface IResponseDAO
Parameters:
nIdResponse - The identifier of the entry
plugin - the plugin
Returns:
the instance of the Entry

delete

public void delete(int nIdResponse,
                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
Delete a response from its id

Specified by:
delete in interface IResponseDAO
Parameters:
nIdResponse - The identifier of the response
plugin - the plugin

store

public void store(Response response,
                  fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update the the response in the table

Specified by:
store in interface IResponseDAO
Parameters:
response - instance of the response object to update
plugin - the plugin

selectListByFilter

public List<Response> selectListByFilter(ResponseFilter filter,
                                         fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of all the response who verify the filter and returns them in a list

Specified by:
selectListByFilter in interface IResponseDAO
Parameters:
filter - the filter
plugin - the plugin
Returns:
the list of response

getStatisticByIdEntry

public List<StatisticEntrySubmit> getStatisticByIdEntry(int nIdEntry,
                                                        fr.paris.lutece.portal.service.plugin.Plugin plugin)
return a list of statistic on the entry

Specified by:
getStatisticByIdEntry in interface IResponseDAO
Parameters:
nIdEntry - the id of the entry
plugin - the plugin
Returns:
return a list of statistic on the entry

getMaxNumber

public int getMaxNumber(int nIdEntry,
                        int nIdResource,
                        String strResourceType,
                        fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the max number from a given id resource

Specified by:
getMaxNumber in interface IResponseDAO
Parameters:
nIdEntry - the id of the entry
nIdResource - the id resource
strResourceType - The resource type
plugin - Plugin
Returns:
the max number


Copyright © 2014 Mairie de Paris. All Rights Reserved.