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

java.lang.Object
  extended by fr.paris.lutece.plugins.calendar.business.CalendarDAO
All Implemented Interfaces:
ICalendarDAO

public class CalendarDAO
extends java.lang.Object
implements ICalendarDAO

This DAO class used to fetch the calendars in the database


Constructor Summary
CalendarDAO()
           
 
Method Summary
 void deleteAgenda(int nAgendaId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete an agenda from the table calendar_agendas
 void deleteEvent(int nAgendaId, int nEventId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete an Event from the table calendar_events
 void insertAgenda(AgendaResource agenda, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Insert a new agenda in the table calendar_agendas.
 void insertEvent(int nAgendaId, SimpleEvent event, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Insert a new event in the table calendar_events.
 AgendaResource loadAgenda(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the data of AgendaResource from the table
 SimpleEvent loadEvent(int nEventId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the data of SimpleEvent from the table
 java.util.List<AgendaResource> selectAgendaResourceList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the list of AgendaResources
 java.util.List<SimpleEvent> selectEventsList(int nAgendaId, int nSortEvents, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the list of Events
 void storeAgenda(AgendaResource agenda, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Update the agenda in the table calendar_agendas
 void storeEvent(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

CalendarDAO

public CalendarDAO()
Method Detail

insertAgenda

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

Specified by:
insertAgenda in interface ICalendarDAO
Parameters:
agenda - The AgendaResource object
plugin - The Plugin using this data access service

storeAgenda

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

Specified by:
storeAgenda in interface ICalendarDAO
Parameters:
agenda - The reference of AgendaResource
plugin - The Plugin using this data access service

deleteAgenda

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

Specified by:
deleteAgenda in interface ICalendarDAO
Parameters:
nAgendaId - The Agenda Id
plugin - The Plugin using this data access service

insertEvent

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

Specified by:
insertEvent in interface ICalendarDAO
Parameters:
nAgendaId - The agenda id
event - The event to be inserted
plugin - The Plugin using this data access service

storeEvent

public void storeEvent(int nAgendaId,
                       SimpleEvent event,
                       fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update the event in the table calendar_event

Specified by:
storeEvent in interface ICalendarDAO
Parameters:
event - The reference of SimpleEvent
nAgendaId - The identifier of the agenda
plugin - The Plugin using this data access service

deleteEvent

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

Specified by:
deleteEvent in interface ICalendarDAO
Parameters:
nEventId - The id of the event
nAgendaId - The agenda Id
plugin - The Plugin using this data access service

loadAgenda

public AgendaResource loadAgenda(int nId,
                                 fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of AgendaResource from the table

Specified by:
loadAgenda in interface ICalendarDAO
Parameters:
nId - The identifier of AgendaResource
plugin - The plugin
Returns:
the instance of the AgendaResource

selectAgendaResourceList

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

Specified by:
selectAgendaResourceList in interface ICalendarDAO
Parameters:
plugin - The plugin
Returns:
The Collection of the AgendaResources

loadEvent

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

Specified by:
loadEvent in interface ICalendarDAO
Parameters:
nEventId - The id of the event
plugin - The plugin
Returns:
the instance of the SimpleEvent

selectEventsList

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

Specified by:
selectEventsList in interface ICalendarDAO
Parameters:
nSortEvents - An integer used for sorting
plugin - The plugin
nAgendaId - The identifier of the agenda
Returns:
The Collection of the Events


Copyright © 2007 Mairie de Paris. All Rights Reserved.