fr.paris.lutece.plugins.calendar.business.portlet
Class CalendarPortletDAO

java.lang.Object
  extended by fr.paris.lutece.plugins.calendar.business.portlet.CalendarPortletDAO
All Implemented Interfaces:
ICalendarPortletDAO, fr.paris.lutece.portal.business.portlet.IPortletInterfaceDAO

public final class CalendarPortletDAO
extends java.lang.Object
implements ICalendarPortletDAO

This class provides Data Access methods for CalendarPortlet objects


Constructor Summary
CalendarPortletDAO()
           
 
Method Summary
 void delete(int nPortletId)
          Deletes a record from the table.
 java.util.List<AgendaResource> findAgendaBetween(int nPortletId, java.util.Date dateBegin, java.util.Date dateEnd)
          Find the list of agenda having events between two dates
 java.util.List<AgendaResource> findAgendasInPortlet(int nPortletId)
          Returns all the sendings associated with a given portlet.
 java.lang.String getBeginDate(int nPortletId)
          Returns the beginning date when the events will be displayed
 java.lang.String getEndDate(int nPortletId)
          Returns the end date of the events display
 int getRepetitionDays(int nPortletId)
          Fetches the number of future days during which the events of the agenda will be displayed
 void insert(fr.paris.lutece.portal.business.portlet.Portlet portlet)
          Inserts a new record in the table.
 void insertAgendaInterval(int nPortletId, java.lang.String strAgendaId, java.lang.String dDateBegin, java.lang.String dDateEnd)
          Associates a new agenda to a given portlet.
 void insertCalendar(int nPortletId, java.lang.String strAgendaId, int nDays)
          Inserts a calendar which will be displayed into the portlet for the following n days
 fr.paris.lutece.portal.business.portlet.Portlet load(int nPortletId)
          Loads the data of the portlet from the table.
 void removeAgenda(int nPortletId, java.lang.String strAgendaId)
          De-associate a agenda from a given portlet.
 void store(fr.paris.lutece.portal.business.portlet.Portlet portlet)
          Updates the record in the table.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CalendarPortletDAO

public CalendarPortletDAO()
Method Detail

insert

public void insert(fr.paris.lutece.portal.business.portlet.Portlet portlet)
Inserts a new record in the table. Not implemented.

Specified by:
insert in interface fr.paris.lutece.portal.business.portlet.IPortletInterfaceDAO
Parameters:
portlet - the object to be inserted

delete

public void delete(int nPortletId)
Deletes a record from the table.

Specified by:
delete in interface fr.paris.lutece.portal.business.portlet.IPortletInterfaceDAO
Parameters:
nPortletId - the portlet id

load

public fr.paris.lutece.portal.business.portlet.Portlet load(int nPortletId)
Loads the data of the portlet from the table.

Specified by:
load in interface fr.paris.lutece.portal.business.portlet.IPortletInterfaceDAO
Parameters:
nPortletId - the portlet id
Returns:
the Portlet object

store

public void store(fr.paris.lutece.portal.business.portlet.Portlet portlet)
Updates the record in the table. Not implemented.

Specified by:
store in interface fr.paris.lutece.portal.business.portlet.IPortletInterfaceDAO
Parameters:
portlet - the instance of Portlet class to be updated

insertAgendaInterval

public void insertAgendaInterval(int nPortletId,
                                 java.lang.String strAgendaId,
                                 java.lang.String dDateBegin,
                                 java.lang.String dDateEnd)
Associates a new agenda to a given portlet.

Specified by:
insertAgendaInterval in interface ICalendarPortletDAO
Parameters:
strAgendaId - The identifier of an agenda
dDateBegin - The beginning date
dDateEnd - The end date
nPortletId - The identifier of the portlet.

removeAgenda

public void removeAgenda(int nPortletId,
                         java.lang.String strAgendaId)
De-associate a agenda from a given portlet.

Specified by:
removeAgenda in interface ICalendarPortletDAO
Parameters:
strAgendaId - The identifier of an agenda
nPortletId - The identifier of the portlet.

findAgendasInPortlet

public java.util.List<AgendaResource> findAgendasInPortlet(int nPortletId)
Returns all the sendings associated with a given portlet.

Specified by:
findAgendasInPortlet in interface ICalendarPortletDAO
Parameters:
nPortletId - the identifier of the portlet.
Returns:
a list of unfiltered agenda resources

findAgendaBetween

public java.util.List<AgendaResource> findAgendaBetween(int nPortletId,
                                                        java.util.Date dateBegin,
                                                        java.util.Date dateEnd)
Find the list of agenda having events between two dates

Specified by:
findAgendaBetween in interface ICalendarPortletDAO
Parameters:
nPortletId - The id of the portlet
dateBegin - The start date of the events display
dateEnd - The end date of the evenst display
Returns:
The list of agenda

getBeginDate

public java.lang.String getBeginDate(int nPortletId)
Returns the beginning date when the events will be displayed

Specified by:
getBeginDate in interface ICalendarPortletDAO
Parameters:
nPortletId - The id of the portlet
Returns:
The start date

getEndDate

public java.lang.String getEndDate(int nPortletId)
Returns the end date of the events display

Specified by:
getEndDate in interface ICalendarPortletDAO
Parameters:
nPortletId - The id of the portlet
Returns:
The end date of event display

getRepetitionDays

public int getRepetitionDays(int nPortletId)
Fetches the number of future days during which the events of the agenda will be displayed

Specified by:
getRepetitionDays in interface ICalendarPortletDAO
Parameters:
nPortletId - The id of the portlet
Returns:
The number of days

insertCalendar

public void insertCalendar(int nPortletId,
                           java.lang.String strAgendaId,
                           int nDays)
Inserts a calendar which will be displayed into the portlet for the following n days

Specified by:
insertCalendar in interface ICalendarPortletDAO
Parameters:
nPortletId - The id of the portlet
strAgendaId - The id of the agenda
nDays - The number of days the events will be displayed


Copyright © 2007 Mairie de Paris. All Rights Reserved.