org.hibernate.validator
Class NotNullValidator

java.lang.Object
  extended by org.hibernate.validator.NotNullValidator
All Implemented Interfaces:
Serializable, PropertyConstraint, Validator<NotNull>

public class NotNullValidator
extends Object
implements Validator<NotNull>, PropertyConstraint, Serializable

Check a not null restriction on an object and apply the equivalent constraint on hibernate metadata.

Author:
Gavin King
See Also:
Serialized Form

Constructor Summary
NotNullValidator()
           
 
Method Summary
 void apply(org.hibernate.mapping.Property property)
           
 void initialize(NotNull parameters)
          Take the annotations values
 boolean isValid(Object value)
          does the object/element pass the constraints
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NotNullValidator

public NotNullValidator()
Method Detail

isValid

public boolean isValid(Object value)
Description copied from interface: Validator
does the object/element pass the constraints

Specified by:
isValid in interface Validator<NotNull>

initialize

public void initialize(NotNull parameters)
Description copied from interface: Validator
Take the annotations values

Specified by:
initialize in interface Validator<NotNull>

apply

public void apply(org.hibernate.mapping.Property property)
Specified by:
apply in interface PropertyConstraint