Interface IAppointmentResourceDAO

All Known Implementing Classes:
AppointmentResourceDAO

public interface IAppointmentResourceDAO
Interface of appointment resource DAO
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    NAme of the bean of the implementation of the DAO
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    delete(int nIdAppointment, int nIdAppointmentFormResourceType, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Delete an appointment resource
    void
    deleteByIdAppointment(int nIdAppointment, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Delete appointment resource associated with a given appointment
    void
    deleteByIdAppointmentFormResourceType(int nIdAppointmentFormResourceType, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Delete appointment resource associated with a given appointment form resource type
    findByIdAppointment(int nIdAppointment, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Find appointment resource associated with a given appointment
    findByPrimaryKey(int nIdAppointment, int nIdAppointmentFormResourceType, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Find an appointment resource from its primary key
    findIdAppointmentsByResourceAndDate(String strIdResource, String strResourceType, Date dateMin, Date dateMax, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Get the list of id of appointments a resource is associated to between two given dates
    void
    insert(AppointmentResource resource, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Insert a new appointment resource
    boolean
    isResourceAvailable(String strIdResource, String strResourceTypeName, Timestamp nStartingTime, Timestamp nEndingTime, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Check if a resource is available for a given period, or if it has already been associated with an appointment
    void
    update(AppointmentResource resource, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Update an appointment resource
  • Field Details

  • Method Details

    • insert

      void insert(AppointmentResource resource, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Insert a new appointment resource
      Parameters:
      resource - The appointment resource to insert
      plugin - The plugin
    • findByPrimaryKey

      AppointmentResource findByPrimaryKey(int nIdAppointment, int nIdAppointmentFormResourceType, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Find an appointment resource from its primary key
      Parameters:
      nIdAppointment - The id of the appointment
      nIdAppointmentFormResourceType - the id of the appointment form resource type
      plugin - The plugin
      Returns:
      The appointment resource, or null if no appointment resource has the given id
    • findByIdAppointment

      List<AppointmentResource> findByIdAppointment(int nIdAppointment, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Find appointment resource associated with a given appointment
      Parameters:
      nIdAppointment - the id of the appointment
      plugin - The plugin
      Returns:
      The list of appointment resource associated with the given appointment, or an empty list if no appointment resource is associated with the appointment
    • update

      void update(AppointmentResource resource, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Update an appointment resource
      Parameters:
      resource - The appointment resource to update
      plugin - The plugin
    • delete

      void delete(int nIdAppointment, int nIdAppointmentFormResourceType, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Delete an appointment resource
      Parameters:
      nIdAppointment - The id of the appointment of the appointment resource
      nIdAppointmentFormResourceType - The id of the appointment form resource type of the appointment resource
      plugin - The plugin
    • deleteByIdAppointment

      void deleteByIdAppointment(int nIdAppointment, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Delete appointment resource associated with a given appointment
      Parameters:
      nIdAppointment - The id of the appointment
      plugin - The plugin
    • deleteByIdAppointmentFormResourceType

      void deleteByIdAppointmentFormResourceType(int nIdAppointmentFormResourceType, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Delete appointment resource associated with a given appointment form resource type
      Parameters:
      nIdAppointmentFormResourceType - The id of the appointment form resource type
      plugin - The plugin
    • isResourceAvailable

      boolean isResourceAvailable(String strIdResource, String strResourceTypeName, Timestamp nStartingTime, Timestamp nEndingTime, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Check if a resource is available for a given period, or if it has already been associated with an appointment
      Parameters:
      strIdResource - The id of the resource
      strResourceTypeName - The type of the resource
      nStartingTime - The beginning time
      nEndingTime - the ending time
      plugin - the plugin
      Returns:
      True if the resource is available, false otherwise
    • findIdAppointmentsByResourceAndDate

      List<Integer> findIdAppointmentsByResourceAndDate(String strIdResource, String strResourceType, Date dateMin, Date dateMax, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Get the list of id of appointments a resource is associated to between two given dates
      Parameters:
      strIdResource - The id of the resource
      strResourceType - The resource type
      dateMin - The minimum date
      dateMax - the maximum date
      plugin - The plugin
      Returns:
      The list of ids of appointments