fr.paris.lutece.plugins.poll.business
Class PollHome

java.lang.Object
  extended by fr.paris.lutece.plugins.poll.business.PollHome

public final class PollHome
extends java.lang.Object

This class provides instances management methods (create, find, ...) for Poll objects


Method Summary
static Poll create(Poll poll, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Creation of an instance of an article Poll
static java.util.List<Poll> findAll(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Returns Poll list
static Poll findByPrimaryKey(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Returns an instance of the Poll whose identifier is specified in parameter
static java.util.List<Poll> getEnabledPollList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Returns the list of avaiable polls
static fr.paris.lutece.util.ReferenceList getPollsList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
           
static void remove(int nIdPoll, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Deletes the Poll instance whose identifier is specified in parameter
static Poll update(Poll poll, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Updates of the Poll instance specified in parameter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static Poll create(Poll poll,
                          fr.paris.lutece.portal.service.plugin.Plugin plugin)
Creation of an instance of an article Poll

Parameters:
poll - An instance of the Poll which contains the informations to store
plugin - The Plugin object
Returns:
The instance of the Poll which has been created

update

public static Poll update(Poll poll,
                          fr.paris.lutece.portal.service.plugin.Plugin plugin)
Updates of the Poll instance specified in parameter

Parameters:
poll - An instance of the Poll which contains the informations to store
connectionService - The ConnectionService
Returns:
The instance of the Poll which has been updated.

remove

public static void remove(int nIdPoll,
                          fr.paris.lutece.portal.service.plugin.Plugin plugin)
Deletes the Poll instance whose identifier is specified in parameter

Parameters:
nIdPoll - The identifier of the Poll to delete in the database
plugin - The Plugin object

findByPrimaryKey

public static Poll findByPrimaryKey(int nKey,
                                    fr.paris.lutece.portal.service.plugin.Plugin plugin)
Returns an instance of the Poll whose identifier is specified in parameter

Parameters:
nKey - The primary key of the poll to find in the database
plugin - The Plugin object
Returns:
An instance of the Poll which corresponds to the key

findAll

public static java.util.List<Poll> findAll(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Returns Poll list

Parameters:
plugin - The Plugin object
Returns:
the list of the Poll of the database as a List object

getEnabledPollList

public static java.util.List<Poll> getEnabledPollList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Returns the list of avaiable polls

Parameters:
plugin - The Plugin object
Returns:
the list of the avaiable poll as a List

getPollsList

public static fr.paris.lutece.util.ReferenceList getPollsList(fr.paris.lutece.portal.service.plugin.Plugin plugin)


Copyright © 2010 Mairie de Paris. All Rights Reserved.