Interface IAppointmentTemplateDao

    • Method Detail

      • getByUUID

        AppointmentTemplate getByUUID​(IEntityContext ec,
                                      Mandant client,
                                      String uuid)
        Returns the template with the given UUID
        Parameters:
        ec - IEntityContext to use
        client - The client for which to find the template. Please note that different clients may have templates with the same UUID.
        uuid - String UUID of the template
        Returns:
        The appointment template for the given UUID
      • getByUUID

        AppointmentTemplate getByUUID​(IEntityContext ec,
                                      Mandant client,
                                      UUID uuid)
        Returns the template with the given UUID
        Parameters:
        ec - IEntityContext to use
        client - The client for which to find the template. Please note that different clients may have templates with the same UUID.
        uuid - UUID UUID of the template
        Returns:
        The appointment template for the given UUID
      • getAllSlotsOfTemplates

        List<AppointmentSlot> getAllSlotsOfTemplates​(IEntityContext ec,
                                                     List<AppointmentTemplate> templates,
                                                     boolean merge)
        Finds all available appointment slots of the given templates.
        Parameters:
        ec - IEntityContext to use
        templates - Templates to use.
        merge - Whether to merge overlapping slots.
        Returns:
        All appointment slots of the given templates.
      • findUniqueName

        String findUniqueName​(IEntityContext ec,
                              Mandant client,
                              String candidate)
        Returns a name that is not taken by another AppointmentTemplate in the given client. An index will be added to the candidate if necessary.
        Parameters:
        ec - IEntityContext to be used
        client - Mandant for which a unique template name should be generated
        candidate - String appointment template name candidate to be made unique
        Returns:
        unique appointment template name in the context of the given client
      • findUniqueName

        String findUniqueName​(IEntityContext ec,
                              Mandant client,
                              String candidate,
                              AppointmentTemplate exclude)
        Returns a name that is not taken by another AppointmentTemplate in the given client. An index will be added to the candidate if necessary.
        Parameters:
        ec - IEntityContext to be used
        client - Mandant for which a unique template name should be generated
        candidate - String appointment template name candidate to be made unique
        exclude - AppointmentTemplate entity to exclude from search for unique name
        Returns:
        unique appointment template name in the context of the given client
      • isNameExisiting

        boolean isNameExisiting​(IEntityContext ec,
                                Mandant client,
                                String name)
        Returns whether or not the given entity name exists within the given client
        Parameters:
        ec - IEntityContext to be used
        client - Mandant for which to check uniqueness
        name - String name to check
        Returns:
        whether or not the given name is unique
        Throws:
        IllegalArgumentException - if the entity class of this DAO does not provide a name