org.hibernate.validator.constraints
Enum CompositionType

java.lang.Object
  extended by java.lang.Enum<CompositionType>
      extended by org.hibernate.validator.constraints.CompositionType
All Implemented Interfaces:
Serializable, Comparable<CompositionType>

public enum CompositionType
extends Enum<CompositionType>

The Enum CompositionType which is used as argument to the annotation ConstraintComposition.


Enum Constant Summary
ALL_FALSE
          ALL_FALSE is a generalisation of the usual NOT operator, which is applied to a list of conditions rather than just one element.
AND
          Used to indicate the conjunction of all the constraints it is applied to.
OR
          Used to indicate the disjunction of all constraints it is applied to.
 
Method Summary
static CompositionType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static CompositionType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

OR

public static final CompositionType OR
Used to indicate the disjunction of all constraints it is applied to.


AND

public static final CompositionType AND
Used to indicate the conjunction of all the constraints it is applied to.


ALL_FALSE

public static final CompositionType ALL_FALSE
ALL_FALSE is a generalisation of the usual NOT operator, which is applied to a list of conditions rather than just one element. When the annotation it is used on is composed of a single constraint annotation, then it is equivalent to NOT.

Method Detail

values

public static CompositionType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (CompositionType c : CompositionType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static CompositionType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null


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