package Ġcom . merc ad ol iv ro . validation Ċ Ċ import Ġcom . merc ad ol iv ro . enums . Book Status Ċ import Ġcom . merc ad ol iv ro . model . Book Model Ċ import Ġcom . merc ad ol iv ro . service . Book Service Ċ import Ġjavax . validation . Constraint Validator Ċ import Ġjavax . validation . Constraint Validator Context Ċ Ċ abstract Ġclass ĠBook Available Validator ( var Ġbook Service : ĠBook Service ): ĠConstraint Validator < Book Available , ĠString > Ġ{ ĊĠĠĠ Ġfun Ġis Book Available ( id : ĠInt ?): ĠBoolean Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġbook Service . book Available ( id ) ĊĠĠĠ Ġ} Ċ }