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 createAgenda(AgendaResource agenda, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Insert a new agenda in the table calendar_agendas.
static void createEvent(int nAgendaId, SimpleEvent event, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Insert a new event in the table calendar_events.
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 nEventId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the data of SimpleEvent from the table
static java.util.List<SimpleEvent> findEventsList(int nAgendaId, int nSortEvents, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the list of Events
static void removeAgenda(int nAgendaId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete an agenda from the table calendar_agendas
static void removeEvent(int nAgendaId, int nEventId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete an Event from the table calendar_events
static void updateAgenda(AgendaResource agenda, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Update the agenda in the table calendar_agendas
static void updateEvent(int nAgendaId, SimpleEvent event, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Update the event in the table calendar_event
 
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

createAgenda

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

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

updateAgenda

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

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

removeAgenda

public static void removeAgenda(int nAgendaId,
                                fr.paris.lutece.portal.service.plugin.Plugin plugin)
Delete an agenda from the table calendar_agendas

Parameters:
nAgendaId - The agenda 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 nAgendaId,
                               SimpleEvent event,
                               fr.paris.lutece.portal.service.plugin.Plugin plugin)
                        throws fr.paris.lutece.portal.service.util.AppException
Insert a new event in the table calendar_events.

Parameters:
nAgendaId - The agenda id
event - the event
plugin - The Plugin using this data access service
Throws:
fr.paris.lutece.portal.service.util.AppException - AppException

updateEvent

public static void updateEvent(int nAgendaId,
                               SimpleEvent event,
                               fr.paris.lutece.portal.service.plugin.Plugin plugin)
                        throws fr.paris.lutece.portal.service.util.AppException
Update the event in the table calendar_event

Parameters:
nAgendaId - The agenda id
strTitle - The title of the event
event - The reference of SimpleEvent
strDate - the old event date
plugin - The Plugin using this data access service
Throws:
fr.paris.lutece.portal.service.util.AppException - Exception thrown if an error is detected

removeEvent

public static void removeEvent(int nAgendaId,
                               int nEventId,
                               fr.paris.lutece.portal.service.plugin.Plugin plugin)
Delete an Event from the table calendar_events

Parameters:
strDate - The date
strTitle - The title
nAgendaId - The agenda Id
plugin - The Plugin using this data access service

findEvent

public static SimpleEvent findEvent(int nEventId,
                                    fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of SimpleEvent from the table

Parameters:
nAgendaId - The agenda id
strEventDate - The event date
strTitle - The title of the event
plugin - The plugin
Returns:
the instance of the SimpleEvent

findEventsList

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

Parameters:
nSortEvents - An integer used for sorting issues
plugin - The plugin
nAgendaId - The identifier of the agenda
Returns:
The Collection of the Events


Copyright © 2007 Mairie de Paris. All Rights Reserved.