public class CalendarDAO extends Object implements ICalendarDAO
Constructor and Description |
---|
CalendarDAO() |
Modifier and Type | Method and Description |
---|---|
void |
deleteAgenda(int nAgendaId,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Delete an agenda from the table calendar_agendas
|
void |
deleteAllOccurrence(int nAgendaId,
int nEventId,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Delete an Event from the table calendar_events_occurrences
|
void |
deleteEvent(int nAgendaId,
int nEventId,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Delete an Event from the table calendar_events
|
void |
deleteEventUser(int nEventId,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Delete the link between event and user
|
void |
deleteOccurrence(int nOccurrenceId,
int nEventId,
int nAgendaId,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Delete an occurrence from the table calendar_events_occurrences
|
SimpleEvent |
getNextOccurrence(SimpleEvent occurrence,
String strDateRef,
int nCptDate)
Return the next occurrence of an event regarding the frequency choisen
|
int |
getOccurrenceNumber(int nEventId,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Return the occurrence number for an event
|
int |
getRepetitionDays(int nEventId,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Return the frequency of an event
|
boolean |
hasOccurenceEvent(Calendar calendar,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Return 1 if the day contains an event 0 otherwise
|
void |
insertAgenda(AgendaResource agenda,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Insert a new agenda in the table calendar_agendas.
|
void |
insertEvent(SimpleEvent event,
fr.paris.lutece.portal.service.plugin.Plugin plugin,
String strUserLogin)
Insert a new event in the table calendar_events.
|
void |
insertOccurrence(SimpleEvent event,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Insert a new set of occurrence in the table calendar_events_occurrences.
|
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
|
fr.paris.lutece.portal.service.image.ImageResource |
loadImageResource(int nCategoryId,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Return the image resource corresponding to the event id
|
OccurrenceEvent |
loadOccurrence(int nOccurenceId,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of SimpleEvent from the table
|
List<AgendaResource> |
selectAgendaResourceList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the list of AgendaResources
|
List<Event> |
selectByFilter(CalendarFilter filter,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the list of Events
|
List<Integer> |
selectCalendarIds(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the list of calendar IDs
|
List<SimpleEvent> |
selectEventsList(int nAgendaId,
int nSortEvents,
int nNextDays,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the list of events
|
List<SimpleEvent> |
selectEventsList(int nAgendaId,
int nSortEvents,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the list of Events
|
List<SimpleEvent> |
selectEventsListByUserLogin(int nAgendaId,
int nSortEvents,
fr.paris.lutece.portal.service.plugin.Plugin plugin,
String strUserLogin)
Load the list of Events
|
Date |
selectOccurrenceDateMin(int nIdEvent,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
SELECT the minimum date from a set of occurrences from table
calendar_events_occurrences
|
List<OccurrenceEvent> |
selectOccurrencesByIdList(int nAgendaId,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the list of all Occurrences of a given calendar
|
List<OccurrenceEvent> |
selectOccurrencesList(int nAgendaId,
int nEventId,
int nSortEvents,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the list of Occurrences related with a given calendar and event
|
List<OccurrenceEvent> |
selectOccurrencesList(int nAgendaId,
int nSortEvents,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the list of all Occurrences
|
List<SimpleEvent> |
selectTopEventsList(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(SimpleEvent event,
fr.paris.lutece.portal.service.plugin.Plugin plugin,
boolean bPeriodiciteUpdated)
Update the event in the table calendar_event
|
void |
storeOccurrence(OccurrenceEvent occurrence,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update the occurrence in the table calendar_events_occurrences
|
void |
updateDateEvent(int nEventId,
int nAgendaId,
fr.paris.lutece.portal.service.plugin.Plugin plugin,
Date newDateEvent)
UPDATE the event date from the table calendar_events
|
void |
updateNumberOccurrence(int nEventId,
int nAgendaId,
fr.paris.lutece.portal.service.plugin.Plugin plugin,
int nNewNumberOccurrence)
UPDATE the occurrence number from the table calendar_events
|
public void insertAgenda(AgendaResource agenda, fr.paris.lutece.portal.service.plugin.Plugin plugin)
insertAgenda
in interface ICalendarDAO
agenda
- The AgendaResource objectplugin
- The Plugin using this data access servicepublic void storeAgenda(AgendaResource agenda, fr.paris.lutece.portal.service.plugin.Plugin plugin)
storeAgenda
in interface ICalendarDAO
agenda
- The reference of AgendaResourceplugin
- The Plugin using this data access servicepublic void deleteAgenda(int nAgendaId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
deleteAgenda
in interface ICalendarDAO
nAgendaId
- The Agenda Idplugin
- The Plugin using this data access servicepublic void insertEvent(SimpleEvent event, fr.paris.lutece.portal.service.plugin.Plugin plugin, String strUserLogin)
insertEvent
in interface ICalendarDAO
event
- The event to be insertedplugin
- The Plugin using this data access servicestrUserLogin
- user loginpublic void storeEvent(SimpleEvent event, fr.paris.lutece.portal.service.plugin.Plugin plugin, boolean bPeriodiciteUpdated)
storeEvent
in interface ICalendarDAO
event
- The reference of SimpleEventplugin
- The Plugin using this data access servicebPeriodiciteUpdated
- true if periodicite, false otherwisepublic void deleteEvent(int nAgendaId, int nEventId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
deleteEvent
in interface ICalendarDAO
nEventId
- The id of the eventnAgendaId
- The agenda Idplugin
- The Plugin using this data access servicepublic AgendaResource loadAgenda(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
loadAgenda
in interface ICalendarDAO
nId
- The identifier of AgendaResourceplugin
- The pluginpublic List<AgendaResource> selectAgendaResourceList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
selectAgendaResourceList
in interface ICalendarDAO
plugin
- The pluginpublic SimpleEvent loadEvent(int nEventId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
loadEvent
in interface ICalendarDAO
nEventId
- The id of the eventplugin
- The pluginpublic List<SimpleEvent> selectEventsList(int nAgendaId, int nSortEvents, fr.paris.lutece.portal.service.plugin.Plugin plugin)
selectEventsList
in interface ICalendarDAO
nSortEvents
- An integer used for sortingplugin
- The pluginnAgendaId
- The identifier of the agendapublic void insertOccurrence(SimpleEvent event, fr.paris.lutece.portal.service.plugin.Plugin plugin)
event
- The event to be insertedplugin
- The Plugin using this data access servicepublic void storeOccurrence(OccurrenceEvent occurrence, fr.paris.lutece.portal.service.plugin.Plugin plugin)
storeOccurrence
in interface ICalendarDAO
occurrence
- The reference of OccurrenceEventplugin
- The Plugin using this data access servicepublic List<OccurrenceEvent> selectOccurrencesList(int nAgendaId, int nEventId, int nSortEvents, fr.paris.lutece.portal.service.plugin.Plugin plugin)
selectOccurrencesList
in interface ICalendarDAO
nSortEvents
- An integer used for sorting issuesplugin
- The pluginnAgendaId
- The identifier of the agendanEventId
- The identifier of an eventpublic List<OccurrenceEvent> selectOccurrencesList(int nAgendaId, int nSortEvents, fr.paris.lutece.portal.service.plugin.Plugin plugin)
selectOccurrencesList
in interface ICalendarDAO
nSortEvents
- An integer used for sorting issuesplugin
- The pluginnAgendaId
- The identifier of the agendapublic List<OccurrenceEvent> selectOccurrencesByIdList(int nAgendaId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
selectOccurrencesByIdList
in interface ICalendarDAO
plugin
- The pluginnAgendaId
- The identifier of the agendapublic OccurrenceEvent loadOccurrence(int nOccurenceId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
loadOccurrence
in interface ICalendarDAO
nOccurenceId
- The id of the occurenceplugin
- The pluginpublic void deleteAllOccurrence(int nAgendaId, int nEventId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
deleteAllOccurrence
in interface ICalendarDAO
nEventId
- The id of the occurrencenAgendaId
- The agenda Idplugin
- The Plugin using this data access servicepublic void deleteOccurrence(int nOccurrenceId, int nEventId, int nAgendaId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
deleteOccurrence
in interface ICalendarDAO
nOccurrenceId
- The id of the occurrencenEventId
- the event idnAgendaId
- The agenda Idplugin
- The Plugin using this data access servicepublic void updateDateEvent(int nEventId, int nAgendaId, fr.paris.lutece.portal.service.plugin.Plugin plugin, Date newDateEvent)
nEventId
- The id of the occurrencenAgendaId
- The agenda Idplugin
- The Plugin using this data access servicenewDateEvent
- the new java.sql.Date objectpublic Date selectOccurrenceDateMin(int nIdEvent, fr.paris.lutece.portal.service.plugin.Plugin plugin)
nIdEvent
- The id of the occurrenceplugin
- The Plugin using this data access servicepublic void updateNumberOccurrence(int nEventId, int nAgendaId, fr.paris.lutece.portal.service.plugin.Plugin plugin, int nNewNumberOccurrence)
updateNumberOccurrence
in interface ICalendarDAO
nEventId
- The id of the occurrencenAgendaId
- The agenda IdnNewNumberOccurrence
- the new number occurencesplugin
- The Plugin using this data access servicepublic int getRepetitionDays(int nEventId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
getRepetitionDays
in interface ICalendarDAO
nEventId
- The id of the eventplugin
- Pluginpublic int getOccurrenceNumber(int nEventId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
getOccurrenceNumber
in interface ICalendarDAO
nEventId
- The id of the eventplugin
- Pluginpublic SimpleEvent getNextOccurrence(SimpleEvent occurrence, String strDateRef, int nCptDate)
occurrence
- an Event instance to be updatedstrDateRef
- The reference datenCptDate
- The number to addpublic fr.paris.lutece.portal.service.image.ImageResource loadImageResource(int nCategoryId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
loadImageResource
in interface ICalendarDAO
nCategoryId
- The identifier of the categoryplugin
- Pluginpublic List<Event> selectByFilter(CalendarFilter filter, fr.paris.lutece.portal.service.plugin.Plugin plugin)
selectByFilter
in interface ICalendarDAO
plugin
- The pluginfilter
- The CalendarFilter Objectpublic List<SimpleEvent> selectTopEventsList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
selectTopEventsList
in interface ICalendarDAO
plugin
- The pluginpublic boolean hasOccurenceEvent(Calendar calendar, fr.paris.lutece.portal.service.plugin.Plugin plugin)
hasOccurenceEvent
in interface ICalendarDAO
calendar
- The dayplugin
- The pluginpublic List<SimpleEvent> selectEventsListByUserLogin(int nAgendaId, int nSortEvents, fr.paris.lutece.portal.service.plugin.Plugin plugin, String strUserLogin)
selectEventsListByUserLogin
in interface ICalendarDAO
nSortEvents
- An integer used for sorting issuesplugin
- The pluginnAgendaId
- The identifier of the agendastrUserLogin
- The user loginpublic void deleteEventUser(int nEventId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
deleteEventUser
in interface ICalendarDAO
nEventId
- ID eventplugin
- pluginpublic List<SimpleEvent> selectEventsList(int nAgendaId, int nSortEvents, int nNextDays, fr.paris.lutece.portal.service.plugin.Plugin plugin)
selectEventsList
in interface ICalendarDAO
nAgendaId
- the agenda IDnSortEvents
- An integer used for sorting issuesnNextDays
- the number of daysplugin
- pluginpublic List<Integer> selectCalendarIds(fr.paris.lutece.portal.service.plugin.Plugin plugin)
selectCalendarIds
in interface ICalendarDAO
plugin
- Plugin
Copyright © 2015 City of Paris. All rights reserved.