Class ValidIdentity.ValidIdentityValidator

java.lang.Object
dev.orne.beans.ValidIdentity.ValidIdentityValidator
All Implemented Interfaces:
javax.validation.ConstraintValidator<ValidIdentity,Identity>
Enclosing class:
ValidIdentity

@API(status=INTERNAL, since="0.4") public static class ValidIdentity.ValidIdentityValidator extends Object implements javax.validation.ConstraintValidator<ValidIdentity,Identity>
Constraint validator for ValidBeanIdentity on Identity instances.
See Also:
  • Constructor Details

    • ValidIdentityValidator

      public ValidIdentityValidator()
      Creates a new instance.
  • Method Details

    • initialize

      public void initialize(@NotNull @NotNull ValidIdentity annotation)
      Specified by:
      initialize in interface javax.validation.ConstraintValidator<ValidIdentity,Identity>
    • isValid

      public boolean isValid(Identity value, javax.validation.ConstraintValidatorContext context)
      Specified by:
      isValid in interface javax.validation.ConstraintValidator<ValidIdentity,Identity>
    • isValid

      public static boolean isValid(@NotNull @NotNull Identity value)
      Returns true if specified bean is valid reference to it's bean type.
      Parameters:
      value - The bean to validate
      Returns:
      If the bean is a valid bean reference
    • isValid

      public static boolean isValid(@NotNull @NotNull Identity value, @NotNull @NotNull Class<? extends Identity> expectedType)
      Returns true if specified bean is valid reference to it's bean type.
      Parameters:
      value - The bean to validate
      expectedType - The expected type of identity
      Returns:
      If the bean is a valid bean reference