fr.paris.lutece.plugins.appointment.business.calendar
Class AppointmentDayDAO

java.lang.Object
  extended by fr.paris.lutece.plugins.appointment.business.calendar.AppointmentDayDAO
All Implemented Interfaces:
IAppointmentDayDAO

public class AppointmentDayDAO
extends Object
implements IAppointmentDayDAO

DAO form appointment days


Constructor Summary
AppointmentDayDAO()
           
 
Method Summary
 void create(AppointmentDay day, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Creates a new day in the database
 AppointmentDay findByPrimaryKey(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Returns an instance of a day whose identifier is specified in parameter
 List<AppointmentDay> getAppointmentDayListByIdForm(int nIdForm, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Get the list of days associated with a form.
 List<AppointmentDay> getDaysBetween(int nIdForm, Date dateMin, Date dateMax, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Get the list of days associated with a form and which date are between 2 given dates.
 void remove(int nIdDay, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Remove a day from the database
 void removeByIdForm(int nIdForm, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Remove days from the database that are associated with a given form
 void removeLonelyDays(Date dateMonday, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete days which date is before a given date and that are not associated with any slot
 void update(AppointmentDay day, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Update a day
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AppointmentDayDAO

public AppointmentDayDAO()
Method Detail

create

public void create(AppointmentDay day,
                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
Creates a new day in the database

Specified by:
create in interface IAppointmentDayDAO
Parameters:
day - The day to create
plugin - The plugin

update

public void update(AppointmentDay day,
                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update a day

Specified by:
update in interface IAppointmentDayDAO
Parameters:
day - The day to create
plugin - The plugin

remove

public void remove(int nIdDay,
                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
Remove a day from the database

Specified by:
remove in interface IAppointmentDayDAO
Parameters:
nIdDay - The id of the day to remove
plugin - The plugin

removeByIdForm

public void removeByIdForm(int nIdForm,
                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
Remove days from the database that are associated with a given form

Specified by:
removeByIdForm in interface IAppointmentDayDAO
Parameters:
nIdForm - The id of the form
plugin - The plugin

removeLonelyDays

public void removeLonelyDays(Date dateMonday,
                             fr.paris.lutece.portal.service.plugin.Plugin plugin)
Delete days which date is before a given date and that are not associated with any slot

Specified by:
removeLonelyDays in interface IAppointmentDayDAO
Parameters:
dateMonday - The date of days
plugin - The plugin

findByPrimaryKey

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

Specified by:
findByPrimaryKey in interface IAppointmentDayDAO
Parameters:
nKey - The appointmentDay primary key
plugin - The plugin
Returns:
an instance of AppointmentDay

getAppointmentDayListByIdForm

public List<AppointmentDay> getAppointmentDayListByIdForm(int nIdForm,
                                                          fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the list of days associated with a form.

Specified by:
getAppointmentDayListByIdForm in interface IAppointmentDayDAO
Parameters:
nIdForm - The id of the form
plugin - The plugin
Returns:
The list of days associated with the given form

getDaysBetween

public List<AppointmentDay> getDaysBetween(int nIdForm,
                                           Date dateMin,
                                           Date dateMax,
                                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the list of days associated with a form and which date are between 2 given dates.

Specified by:
getDaysBetween in interface IAppointmentDayDAO
Parameters:
nIdForm - The id of the form
dateMin - The minimum date
dateMax - The maximum date
plugin - The plugin
Returns:
The list of days


Copyright © 2014 Mairie de Paris. All Rights Reserved.