fr.paris.lutece.plugins.calendar.business
Class CalendarHome

java.lang.Object
  extended by fr.paris.lutece.plugins.calendar.business.CalendarHome

public class CalendarHome
extends java.lang.Object

This class provides instances management methods (selectEventsList, findByPrimaryKey, findAgendasList ...) for Calendar objects ( AgendaResource, Events, ...)


Constructor Summary
CalendarHome()
           
 
Method Summary
static void createEvent(int nProjectId, SimpleEvent event, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Insert a new event in the table calendar_events.
static void createProject(AgendaResource agenda, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Insert a new project in the table calendar_projects.
static AgendaResource findAgendaResource(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Returns an instance of a AgendaResource whose identifier is specified in parameter
static java.util.List<AgendaResource> findAgendaResourcesList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the list of AgendaResources
static SimpleEvent findEvent(int nProjectId, java.lang.String strEventDate, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the data of SimpleEvent from the table
static java.util.List<SimpleEvent> findEventsList(int nProjectId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the list of Events
static void removeEvent(int nProjectId, java.lang.String strDate, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete an Event from the table calendar_events
static void removeProject(int nProjectId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete a Project from the table calendar_projects
static void updateEvent(int nProjectId, java.lang.String strDate, SimpleEvent event, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Update the event in the table calendar_event
static void updateProject(AgendaResource agenda, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Update the project in the table calendar_project
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CalendarHome

public CalendarHome()
Method Detail

createProject

public static void createProject(AgendaResource agenda,
                                 fr.paris.lutece.portal.service.plugin.Plugin plugin)
Insert a new project in the table calendar_projects.

Parameters:
agenda - The AgendaResource object
plugin - The Plugin using this data access service

updateProject

public static void updateProject(AgendaResource agenda,
                                 fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update the project in the table calendar_project

Parameters:
agenda - The reference of AgendaResource
plugin - The Plugin using this data access service

removeProject

public static void removeProject(int nProjectId,
                                 fr.paris.lutece.portal.service.plugin.Plugin plugin)
Delete a Project from the table calendar_projects

Parameters:
nProjectId - The Project Id
plugin - The Plugin using this data access service

findAgendaResourcesList

public static java.util.List<AgendaResource> findAgendaResourcesList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the list of AgendaResources

Parameters:
plugin - The plugin
Returns:
The Collection of the AgendaResources

findAgendaResource

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

Parameters:
nKey - The Primary key of the contact
plugin - The Plugin object
Returns:
an instance of AgendaResource

createEvent

public static void createEvent(int nProjectId,
                               SimpleEvent event,
                               fr.paris.lutece.portal.service.plugin.Plugin plugin)
Insert a new event in the table calendar_events.

Parameters:
agenda - The SimpleEvent object
plugin - The Plugin using this data access service

updateEvent

public static void updateEvent(int nProjectId,
                               java.lang.String strDate,
                               SimpleEvent event,
                               fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update the event in the table calendar_event

Parameters:
event - The reference of SimpleEvent
nId - The identifier of the project
strDate - the old event date
plugin - The Plugin using this data access service

removeEvent

public static void removeEvent(int nProjectId,
                               java.lang.String strDate,
                               fr.paris.lutece.portal.service.plugin.Plugin plugin)
Delete an Event from the table calendar_events

Parameters:
nProjectId - The Project Id
plugin - The Plugin using this data access service

findEvent

public static SimpleEvent findEvent(int nProjectId,
                                    java.lang.String strEventDate,
                                    fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of SimpleEvent from the table

Parameters:
nId - The identifier of SimpleEvent
plugin - The plugin
Returns:
the instance of the SimpleEvent
Throws:
AppException

findEventsList

public static java.util.List<SimpleEvent> findEventsList(int nProjectId,
                                                         fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the list of Events

Parameters:
plugin - The plugin
nProjectId - The identifier of the project
Returns:
The Collection of the Events


Copyright © 2007 Mairie de Paris. All Rights Reserved.