Class TeamShiftValidator

java.lang.Object
overit.geocallapp.wfm.teams.rs1.teamshifts.TeamShiftValidator
All Implemented Interfaces:
Validator<BOTeamShift>

public class TeamShiftValidator extends Object implements Validator<BOTeamShift>
Utility class to validate the relation between a BOTeamShift and a BOTeam.
Since:
17.0
  • Constructor Details

    • TeamShiftValidator

      public TeamShiftValidator()
  • Method Details

    • make

      public static TeamShiftValidator make(Long teamId)
      Creates an instance of TeamShiftValidator configured with the provided team's ID (passed as path parameter).
      Parameters:
      teamId - the provided team's ID.
      Returns:
      teamValidator the TeamShiftValidator configured with the provided team's ID
    • getTeamId

      public Long getTeamId()
      Returns the provided team's ID.
      Returns:
      teamId the provided team's ID
    • setTeamId

      public void setTeamId(Long teamId)
      Sets the provided team's ID.
      Parameters:
      teamId - the provided team's ID
    • validate

      public void validate(BOTeamShift teamShift) throws DAValidateException
      Validates a BOTeamShift against the provided team's ID.
      Specified by:
      validate in interface Validator<BOTeamShift>
      Parameters:
      teamShift - the BOTeamShift to validate.
      Throws:
      DAValidateException - if the team's ID of the teamShift does not match the provided team's ID