Class ConstraintMaxOrePeriodo


@Entity public class ConstraintMaxOrePeriodo extends ConstraintAssegnazioneTurnoTurno
This class implements the maximum number of minutes that a doctor can work into a specified period.
  • Constructor Details

    • ConstraintMaxOrePeriodo

      public ConstraintMaxOrePeriodo()
      Default constructor needed by Lombok
    • ConstraintMaxOrePeriodo

      public ConstraintMaxOrePeriodo(int periodDuration, long periodMaxTime)
  • Method Details

    • verifyConstraint

      public void verifyConstraint(ContextConstraint context) throws ViolatedConstraintException
      This method checks if maxOrePeriodo constraint is respected while inserting a new concrete shift into a schedule.
      Specified by:
      verifyConstraint in class Constraint
      Parameters:
      context - Object comprehending the new concrete shift to be assigned and the information about doctor's state in the corresponding schedule
      Throws:
      ViolatedConstraintException - Exception thrown if the constraint is violated