Class ConstraintMaxOrePeriodo
java.lang.Object
org.cswteams.ms3.entity.constraint.Constraint
org.cswteams.ms3.entity.constraint.ConstraintAssegnazioneTurnoTurno
org.cswteams.ms3.entity.constraint.ConstraintMaxOrePeriodo
This class implements the maximum number of minutes that a doctor can work into a specified period.
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor needed by LombokConstraintMaxOrePeriodo(int periodDuration, long periodMaxTime) -
Method Summary
Modifier and TypeMethodDescriptionvoidverifyConstraint(ContextConstraint context) This method checks if maxOrePeriodo constraint is respected while inserting a new concrete shift into a schedule.Methods inherited from class org.cswteams.ms3.entity.constraint.ConstraintAssegnazioneTurnoTurno
getAssegnazioneTurnoPrecedenteIdx, verificaContiguità AssegnazioneTurni, verificaContiguità AssegnazioneTurni
-
Constructor Details
-
ConstraintMaxOrePeriodo
public ConstraintMaxOrePeriodo()Default constructor needed by Lombok -
ConstraintMaxOrePeriodo
public ConstraintMaxOrePeriodo(int periodDuration, long periodMaxTime)
-
-
Method Details
-
verifyConstraint
This method checks if maxOrePeriodo constraint is respected while inserting a new concrete shift into a schedule.- Specified by:
verifyConstraintin classConstraint- 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
-