Class IdValidator

java.lang.Object
models.validators.IdValidator
All Implemented Interfaces:
Validator<Long>

public class IdValidator extends Object implements Validator<Long>
Implementation of validator for ID field. (Route)
Since:
1.0
  • Constructor Details

    • IdValidator

      public IdValidator()
      Setup validator default constructor
  • Method Details

    • validate

      public boolean validate(Long value)
      Checks if value unique in collection, greater than 0 and notnull.
      Specified by:
      validate in interface Validator<Long>
      Parameters:
      value - ID to validate
      Returns:
      true/false -- matches the restrictions
      See Also: