Class WeekDefinitionHome

java.lang.Object
fr.paris.lutece.plugins.appointment.business.planning.WeekDefinitionHome

public final class WeekDefinitionHome extends Object
This class provides instances management methods for Week Definition objects
Author:
Laurent Payen
  • Method Details

    • create

      public static WeekDefinition create(WeekDefinition weekDefinition)
      Create an instance of the WeekDefinition class
      Parameters:
      weekDefinition - The instance of the WeekDefinition which contains the informations to store
      Returns:
      The instance of the WeekDefinition which has been created with its primary key.
    • update

      public static WeekDefinition update(WeekDefinition weekDefinition)
      Update of the WeekDefinition which is specified in parameter
      Parameters:
      weekDefinition - The instance of the WeekDefinition which contains the data to store
      Returns:
      The instance of the WeekDefinition which has been updated
    • delete

      public static void delete(int nKey)
      Delete the WeekDefinition whose identifier is specified in parameter
      Parameters:
      nKey - The WeekDefinition Id
    • deleteByIdReservationRule

      public static void deleteByIdReservationRule(int nIdReservationRule)
      Delete the WeekDefinition whose identifier is specified in parameter
      Parameters:
      nIdReservationRule - The reservation rule Id
    • findByPrimaryKey

      public static WeekDefinition findByPrimaryKey(int nKey)
      Returns an instance of the WeekDefinition whose identifier is specified in parameter
      Parameters:
      nKey - The WeekDefinition primary key
      Returns:
      an instance of the WeekDefinition
    • findByIdForm

      public static List<WeekDefinition> findByIdForm(int nIdForm)
      Get all the week definitions of the form given
      Parameters:
      nIdForm - the Form Id
      Returns:
      the list of the week definitions of the form
    • findByReservationRule

      public static List<WeekDefinition> findByReservationRule(int nIdReservationRule)
      Get the week definitions of a form for reservation rule
      Parameters:
      nIdReservationRule -
      plugin - the plugin
      Returns:
      list of week definition
    • findByIdFormAndDateOfApply

      public static WeekDefinition findByIdFormAndDateOfApply(int nIdForm, LocalDate dateOfApply)
      Get week definition for the form id and the date of apply given
      Parameters:
      nIdForm - the Form Id
      dateOfApply - the date of apply
      Returns:
      the week definition
    • findByIdReservationRuleAndDateOfApply

      public static WeekDefinition findByIdReservationRuleAndDateOfApply(int nIdReservationRule, LocalDate dateOfApply)
      Get week definition for the form id and the date of apply given
      Parameters:
      nIdReservationRule - the ReservationRule id
      dateOfApply - the date of apply
      Returns:
      the week definition