org.hibernate.validator.cfg.defs
Class GenericConstraintDef

java.lang.Object
  extended by org.hibernate.validator.cfg.ConstraintDef
      extended by org.hibernate.validator.cfg.defs.GenericConstraintDef

public class GenericConstraintDef
extends ConstraintDef

A ConstraintDef class which can be used to configure any constraint type. For this purpose the class defines a constraintType method to specify the constraint type and a generic param(String key,Object value) to add arbitrary constraint parameters.

Author:
Hardy Ferentschik

Field Summary
 
Fields inherited from class org.hibernate.validator.cfg.ConstraintDef
beanType, constraintType, elementType, mapping, parameters, property
 
Constructor Summary
GenericConstraintDef(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping)
           
 
Method Summary
 GenericConstraintDef constraintType(Class<?> constraintType)
           
 GenericConstraintDef groups(Class<?>... groups)
           
 GenericConstraintDef message(String message)
           
 GenericConstraintDef param(String key, Object value)
           
 GenericConstraintDef payload(Class<? extends Payload>... payload)
           
 
Methods inherited from class org.hibernate.validator.cfg.ConstraintDef
addParameter, constraint, groups, payload, property, toString, type, valid
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GenericConstraintDef

public GenericConstraintDef(Class<?> beanType,
                            String property,
                            ElementType elementType,
                            ConstraintMapping mapping)
Method Detail

message

public GenericConstraintDef message(String message)
Overrides:
message in class ConstraintDef

groups

public GenericConstraintDef groups(Class<?>... groups)

payload

public GenericConstraintDef payload(Class<? extends Payload>... payload)

param

public GenericConstraintDef param(String key,
                                  Object value)

constraintType

public GenericConstraintDef constraintType(Class<?> constraintType)


Copyright © 2007-2010 Red Hat Middleware, LLC. All Rights Reserved