com.avaje.ebean.validation.factory
Class LengthValidatorFactory.LengthValidator

java.lang.Object
  extended by com.avaje.ebean.validation.factory.LengthValidatorFactory.LengthValidator
All Implemented Interfaces:
Validator
Enclosing class:
LengthValidatorFactory

public static final class LengthValidatorFactory.LengthValidator
extends Object
implements Validator

The actual length validator.


Method Summary
 Object[] getAttributes()
          Returns the min and/or max attributes.
 String getKey()
          Return a String key used to identify the validator.
 boolean isValid(Object value)
          Return true if the value is valid.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getAttributes

public Object[] getAttributes()
Returns the min and/or max attributes.

Specified by:
getAttributes in interface Validator

getKey

public String getKey()
Description copied from interface: Validator
Return a String key used to identify the validator.

This is used to identify the type of validation error and look up a localised error message.

Specified by:
getKey in interface Validator

isValid

public boolean isValid(Object value)
Description copied from interface: Validator
Return true if the value is valid.

Specified by:
isValid in interface Validator
Parameters:
value - the property value being tested.


Copyright © 2010. All Rights Reserved.