[hibernate-commits] Hibernate SVN: r19606 - in validator/trunk/hibernate-validator/src: main/java/org/hibernate/validator/cfg/defs and 3 other directories.

hibernate-commits at lists.jboss.org hibernate-commits at lists.jboss.org
Tue May 25 14:21:29 EDT 2010


Author: hardy.ferentschik
Date: 2010-05-25 14:21:27 -0400 (Tue, 25 May 2010)
New Revision: 19606

Added:
   validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/CascadeDef.java
   validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/ConstraintDef.java
   validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/
   validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/AssertFalseDef.java
   validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/AssertTrueDef.java
   validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/CreditCardNumberDef.java
   validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/DecimalMaxDef.java
   validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/DecimalMinDef.java
   validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/DigitsDef.java
   validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/EmailDef.java
   validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/FutureDef.java
   validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/LengthDef.java
   validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/MaxDef.java
   validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/MinDef.java
   validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/NotBlankDef.java
   validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/NotEmptyDef.java
   validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/NotNullDef.java
   validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/NullDef.java
   validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/PastDef.java
   validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/PatternDef.java
   validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/RangeDef.java
   validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/ScriptAssertDef.java
   validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/SizeDef.java
   validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/URLDef.java
   validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/package.html
Removed:
   validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/AssertFalseDefinition.java
   validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/AssertTrueDefinition.java
   validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/CascadeDefinition.java
   validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/ConstraintDefinition.java
   validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/CreditCardNumberDefinition.java
   validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/DecimalMaxDefinition.java
   validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/DecimalMinDefinition.java
   validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/DigitsDefinition.java
   validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/EmailDefinition.java
   validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/FutureDefinition.java
   validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/LengthDefinition.java
   validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/MaxDefinition.java
   validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/MinDefinition.java
   validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/NotBlankDefinition.java
   validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/NotEmptyDefinition.java
   validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/NotNullDefinition.java
   validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/NullDefinition.java
   validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/PastDefinition.java
   validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/PatternDefinition.java
   validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/RangeDefinition.java
   validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/ScriptAssertDefinition.java
   validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/SizeDefinition.java
   validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/URLDefinition.java
Modified:
   validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/ConstraintMapping.java
   validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/ConstraintsForType.java
   validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/package.html
   validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/engine/ValidatorFactoryImpl.java
   validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/util/privilegedactions/LoadClass.java
   validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/test/cfg/ConstraintMappingTest.java
Log:
HV-274 Renamed classes and created additional defs package

Deleted: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/AssertFalseDefinition.java
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/AssertFalseDefinition.java	2010-05-25 16:52:25 UTC (rev 19605)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/AssertFalseDefinition.java	2010-05-25 18:21:27 UTC (rev 19606)
@@ -1,47 +0,0 @@
-// $Id$
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.cfg;
-
-import java.lang.annotation.ElementType;
-import javax.validation.Payload;
-import javax.validation.constraints.AssertFalse;
-import javax.validation.constraints.AssertTrue;
-
-/**
- * @author Hardy Ferentschik
- */
-public class AssertFalseDefinition extends ConstraintDefinition<AssertFalse> {
-	public AssertFalseDefinition(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
-		super( beanType, AssertFalse.class, property, elementType, mapping );
-	}
-
-	public AssertFalseDefinition message(String message) {
-		addParameter( "message", message );
-		return this;
-	}
-
-	public AssertFalseDefinition groups(Class<?>... groups) {
-		addParameter( "groups", groups );
-		return this;
-	}
-
-	public AssertFalseDefinition payload(Class<? extends Payload>... payload) {
-		addParameter( "payload", payload );
-		return this;
-	}
-}
\ No newline at end of file

Deleted: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/AssertTrueDefinition.java
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/AssertTrueDefinition.java	2010-05-25 16:52:25 UTC (rev 19605)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/AssertTrueDefinition.java	2010-05-25 18:21:27 UTC (rev 19606)
@@ -1,47 +0,0 @@
-// $Id$
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.cfg;
-
-import java.lang.annotation.ElementType;
-import javax.validation.Payload;
-import javax.validation.constraints.AssertTrue;
-import javax.validation.constraints.NotNull;
-
-/**
- * @author Hardy Ferentschik
- */
-public class AssertTrueDefinition extends ConstraintDefinition<AssertTrue> {
-	public AssertTrueDefinition(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
-		super( beanType, AssertTrue.class, property, elementType, mapping );
-	}
-
-	public AssertTrueDefinition message(String message) {
-		addParameter( "message", message );
-		return this;
-	}
-
-	public AssertTrueDefinition groups(Class<?>... groups) {
-		addParameter( "groups", groups );
-		return this;
-	}
-
-	public AssertTrueDefinition payload(Class<? extends Payload>... payload) {
-		addParameter( "payload", payload );
-		return this;
-	}
-}
\ No newline at end of file

Copied: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/CascadeDef.java (from rev 19582, validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/CascadeDefinition.java)
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/CascadeDef.java	                        (rev 0)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/CascadeDef.java	2010-05-25 18:21:27 UTC (rev 19606)
@@ -0,0 +1,78 @@
+// $Id$
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.cfg;
+
+import java.lang.annotation.ElementType;
+import javax.validation.ValidationException;
+
+import org.hibernate.validator.util.ReflectionHelper;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class CascadeDef {
+	private final Class<?> beanType;
+	private final ElementType elementType;
+	private final String property;
+
+	public CascadeDef(Class<?> beanType, String property, ElementType elementType) {
+		if ( beanType == null ) {
+			throw new ValidationException( "Null is not a valid bean type" );
+		}
+
+		if ( ElementType.FIELD.equals( elementType ) || ElementType.METHOD.equals( elementType ) ) {
+			if ( property == null || property.length() == 0 ) {
+				throw new ValidationException( "A valid property name has to be specified" );
+			}
+
+			if ( !ReflectionHelper.propertyExists( beanType, property, elementType ) ) {
+				throw new ValidationException(
+						"The class " + beanType + " does not have a property '"
+								+ property + "' with access " + elementType
+				);
+			}
+		}
+
+		this.beanType = beanType;
+		this.property = property;
+		this.elementType = elementType;
+	}
+
+	public ElementType getElementType() {
+		return elementType;
+	}
+
+	public Class<?> getBeanType() {
+		return beanType;
+	}
+
+	public String getProperty() {
+		return property;
+	}
+
+	@Override
+	public String toString() {
+		final StringBuilder sb = new StringBuilder();
+		sb.append( "CascadeDefinition" );
+		sb.append( "{beanType=" ).append( beanType );
+		sb.append( ", elementType=" ).append( elementType );
+		sb.append( ", property='" ).append( property ).append( '\'' );
+		sb.append( '}' );
+		return sb.toString();
+	}
+}
\ No newline at end of file


Property changes on: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/CascadeDef.java
___________________________________________________________________
Name: svn:keywords
   + Id

Deleted: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/CascadeDefinition.java
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/CascadeDefinition.java	2010-05-25 16:52:25 UTC (rev 19605)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/CascadeDefinition.java	2010-05-25 18:21:27 UTC (rev 19606)
@@ -1,78 +0,0 @@
-// $Id$
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.cfg;
-
-import java.lang.annotation.ElementType;
-import javax.validation.ValidationException;
-
-import org.hibernate.validator.util.ReflectionHelper;
-
-/**
- * @author Hardy Ferentschik
- */
-public class CascadeDefinition {
-	private final Class<?> beanType;
-	private final ElementType elementType;
-	private final String property;
-
-	public CascadeDefinition(Class<?> beanType, String property, ElementType elementType) {
-		if ( beanType == null ) {
-			throw new ValidationException( "Null is not a valid bean type" );
-		}
-
-		if ( ElementType.FIELD.equals( elementType ) || ElementType.METHOD.equals( elementType ) ) {
-			if ( property == null || property.length() == 0 ) {
-				throw new ValidationException( "A valid property name has to be specified" );
-			}
-
-			if ( !ReflectionHelper.propertyExists( beanType, property, elementType ) ) {
-				throw new ValidationException(
-						"The class " + beanType + " does not have a property '"
-								+ property + "' with access " + elementType
-				);
-			}
-		}
-
-		this.beanType = beanType;
-		this.property = property;
-		this.elementType = elementType;
-	}
-
-	public ElementType getElementType() {
-		return elementType;
-	}
-
-	public Class<?> getBeanType() {
-		return beanType;
-	}
-
-	public String getProperty() {
-		return property;
-	}
-
-	@Override
-	public String toString() {
-		final StringBuilder sb = new StringBuilder();
-		sb.append( "CascadeDefinition" );
-		sb.append( "{beanType=" ).append( beanType );
-		sb.append( ", elementType=" ).append( elementType );
-		sb.append( ", property='" ).append( property ).append( '\'' );
-		sb.append( '}' );
-		return sb.toString();
-	}
-}
\ No newline at end of file

Copied: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/ConstraintDef.java (from rev 19582, validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/ConstraintDefinition.java)
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/ConstraintDef.java	                        (rev 0)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/ConstraintDef.java	2010-05-25 18:21:27 UTC (rev 19606)
@@ -0,0 +1,138 @@
+// $Id$
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.cfg;
+
+import java.lang.annotation.Annotation;
+import java.lang.annotation.ElementType;
+import java.lang.reflect.Constructor;
+import java.util.HashMap;
+import java.util.Map;
+import javax.validation.ValidationException;
+
+import org.hibernate.validator.util.ReflectionHelper;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class ConstraintDef<A extends Annotation> {
+	private final Class<A> constraintType;
+	private final Map<String, Object> parameters;
+	private final Class<?> beanType;
+	private final ElementType elementType;
+	private final String property;
+	private final ConstraintMapping mapping;
+
+	public ConstraintDef(Class<?> beanType, Class<A> constraintType, String property, ElementType elementType, ConstraintMapping mapping) {
+		if ( beanType == null ) {
+			throw new ValidationException( "Null is not a valid bean type" );
+		}
+
+		if ( constraintType == null ) {
+			throw new ValidationException( "Null is not a valid constraint type" );
+		}
+
+		if ( mapping == null ) {
+			throw new ValidationException( "ConstraintMapping cannot be null" );
+		}
+
+		if ( ElementType.FIELD.equals( elementType ) || ElementType.METHOD.equals( elementType ) ) {
+			if ( property == null || property.length() == 0 ) {
+				throw new ValidationException( "A property level constraint cannot have a null or empty property name" );
+			}
+
+			if ( !ReflectionHelper.propertyExists( beanType, property, elementType ) ) {
+				throw new ValidationException(
+						"The class " + beanType + " does not have a property '"
+								+ property + "' with access " + elementType
+				);
+			}
+		}
+
+		this.beanType = beanType;
+		this.constraintType = constraintType;
+		this.parameters = new HashMap<String, Object>();
+		this.property = property;
+		this.elementType = elementType;
+		this.mapping = mapping;
+	}
+
+	protected ConstraintDef addParameter(String key, Object value) {
+		parameters.put( key, value );
+		return this;
+	}
+
+	public <A extends Annotation, T extends ConstraintDef<A>> T constraint(Class<T> definition) {
+
+		final Constructor<T> constructor = ReflectionHelper.getConstructor(
+				definition, Class.class, String.class, ElementType.class, ConstraintMapping.class
+		);
+
+		final T constraintDefinition = ReflectionHelper.newConstructorInstance(
+				constructor, beanType, property, elementType, mapping
+		);
+
+		mapping.addConstraintConfig( constraintDefinition );
+		return constraintDefinition;
+	}
+
+	public ConstraintsForType property(String property, ElementType type) {
+		return new ConstraintsForType( beanType, property, type, mapping );
+	}
+
+	public ConstraintsForType type(Class<?> type) {
+		return new ConstraintsForType( type, mapping );
+	}
+
+	public ConstraintsForType valid(String property, ElementType type) {
+		mapping.addCascadeConfig( new CascadeDef( beanType, property, type ) );
+		return new ConstraintsForType( beanType, mapping );
+	}
+
+	public Class<A> getConstraintType() {
+		return constraintType;
+	}
+
+	public Map<String, Object> getParameters() {
+		return parameters;
+	}
+
+	public ElementType getElementType() {
+		return elementType;
+	}
+
+	public Class<?> getBeanType() {
+		return beanType;
+	}
+
+	public String getProperty() {
+		return property;
+	}
+
+	@Override
+	public String toString() {
+		final StringBuilder sb = new StringBuilder();
+		sb.append( "ConstraintDefinition" );
+		sb.append( "{beanType=" ).append( beanType );
+		sb.append( ", constraintType=" ).append( constraintType );
+		sb.append( ", parameters=" ).append( parameters );
+		sb.append( ", elementType=" ).append( elementType );
+		sb.append( ", property='" ).append( property ).append( '\'' );
+		sb.append( '}' );
+		return sb.toString();
+	}
+}


Property changes on: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/ConstraintDef.java
___________________________________________________________________
Name: svn:keywords
   + Id

Deleted: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/ConstraintDefinition.java
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/ConstraintDefinition.java	2010-05-25 16:52:25 UTC (rev 19605)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/ConstraintDefinition.java	2010-05-25 18:21:27 UTC (rev 19606)
@@ -1,138 +0,0 @@
-// $Id$
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.cfg;
-
-import java.lang.annotation.Annotation;
-import java.lang.annotation.ElementType;
-import java.lang.reflect.Constructor;
-import java.util.HashMap;
-import java.util.Map;
-import javax.validation.ValidationException;
-
-import org.hibernate.validator.util.ReflectionHelper;
-
-/**
- * @author Hardy Ferentschik
- */
-public class ConstraintDefinition<A extends Annotation> {
-	private final Class<A> constraintType;
-	private final Map<String, Object> parameters;
-	private final Class<?> beanType;
-	private final ElementType elementType;
-	private final String property;
-	private final ConstraintMapping mapping;
-
-	public ConstraintDefinition(Class<?> beanType, Class<A> constraintType, String property, ElementType elementType, ConstraintMapping mapping) {
-		if ( beanType == null ) {
-			throw new ValidationException( "Null is not a valid bean type" );
-		}
-
-		if ( constraintType == null ) {
-			throw new ValidationException( "Null is not a valid constraint type" );
-		}
-
-		if ( mapping == null ) {
-			throw new ValidationException( "ConstraintMapping cannot be null" );
-		}
-
-		if ( ElementType.FIELD.equals( elementType ) || ElementType.METHOD.equals( elementType ) ) {
-			if ( property == null || property.length() == 0 ) {
-				throw new ValidationException( "A property level constraint cannot have a null or empty property name" );
-			}
-
-			if ( !ReflectionHelper.propertyExists( beanType, property, elementType ) ) {
-				throw new ValidationException(
-						"The class " + beanType + " does not have a property '"
-								+ property + "' with access " + elementType
-				);
-			}
-		}
-
-		this.beanType = beanType;
-		this.constraintType = constraintType;
-		this.parameters = new HashMap<String, Object>();
-		this.property = property;
-		this.elementType = elementType;
-		this.mapping = mapping;
-	}
-
-	protected ConstraintDefinition addParameter(String key, Object value) {
-		parameters.put( key, value );
-		return this;
-	}
-
-	public <A extends Annotation, T extends ConstraintDefinition<A>> T constraint(Class<T> definition) {
-
-		final Constructor<T> constructor = ReflectionHelper.getConstructor(
-				definition, Class.class, String.class, ElementType.class, ConstraintMapping.class
-		);
-
-		final T constraintDefinition = ReflectionHelper.newConstructorInstance(
-				constructor, beanType, property, elementType, mapping
-		);
-
-		mapping.addConstraintConfig( constraintDefinition );
-		return constraintDefinition;
-	}
-
-	public ConstraintsForType property(String property, ElementType type) {
-		return new ConstraintsForType( beanType, property, type, mapping );
-	}
-
-	public ConstraintsForType type(Class<?> type) {
-		return new ConstraintsForType( type, mapping );
-	}
-
-	public ConstraintsForType valid(String property, ElementType type) {
-		mapping.addCascadeConfig( new CascadeDefinition( beanType, property, type ) );
-		return new ConstraintsForType( beanType, mapping );
-	}
-
-	public Class<A> getConstraintType() {
-		return constraintType;
-	}
-
-	public Map<String, Object> getParameters() {
-		return parameters;
-	}
-
-	public ElementType getElementType() {
-		return elementType;
-	}
-
-	public Class<?> getBeanType() {
-		return beanType;
-	}
-
-	public String getProperty() {
-		return property;
-	}
-
-	@Override
-	public String toString() {
-		final StringBuilder sb = new StringBuilder();
-		sb.append( "ConstraintDefinition" );
-		sb.append( "{beanType=" ).append( beanType );
-		sb.append( ", constraintType=" ).append( constraintType );
-		sb.append( ", parameters=" ).append( parameters );
-		sb.append( ", elementType=" ).append( elementType );
-		sb.append( ", property='" ).append( property ).append( '\'' );
-		sb.append( '}' );
-		return sb.toString();
-	}
-}

Modified: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/ConstraintMapping.java
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/ConstraintMapping.java	2010-05-25 16:52:25 UTC (rev 19605)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/ConstraintMapping.java	2010-05-25 18:21:27 UTC (rev 19606)
@@ -32,14 +32,14 @@
  * @author Hardy Ferentschik
  */
 public class ConstraintMapping {
-	private final Map<Class<?>, List<ConstraintDefinition<?>>> constraintConfig;
-	private final Map<Class<?>, List<CascadeDefinition>> cascadeConfig;
+	private final Map<Class<?>, List<ConstraintDef<?>>> constraintConfig;
+	private final Map<Class<?>, List<CascadeDef>> cascadeConfig;
 	private final Set<Class<?>> configuredClasses;
 	private final Map<Class<?>, List<Class<?>>> defaultGroupSequences;
 
 	public ConstraintMapping() {
-		this.constraintConfig = new HashMap<Class<?>, List<ConstraintDefinition<?>>>();
-		this.cascadeConfig = new HashMap<Class<?>, List<CascadeDefinition>>();
+		this.constraintConfig = new HashMap<Class<?>, List<ConstraintDef<?>>>();
+		this.cascadeConfig = new HashMap<Class<?>, List<CascadeDef>>();
 		this.configuredClasses = new HashSet<Class<?>>();
 		this.defaultGroupSequences = new HashMap<Class<?>, List<Class<?>>>();
 	}
@@ -48,27 +48,27 @@
 		return new ConstraintsForType( beanClass, this );
 	}
 
-	protected void addConstraintConfig(ConstraintDefinition<?> definition) {
+	protected void addConstraintConfig(ConstraintDef<?> definition) {
 		Class<?> beanClass = definition.getBeanType();
 		configuredClasses.add( beanClass );
 		if ( constraintConfig.containsKey( beanClass ) ) {
 			constraintConfig.get( beanClass ).add( definition );
 		}
 		else {
-			List<ConstraintDefinition<?>> definitionList = new ArrayList<ConstraintDefinition<?>>();
+			List<ConstraintDef<?>> definitionList = new ArrayList<ConstraintDef<?>>();
 			definitionList.add( definition );
 			constraintConfig.put( beanClass, definitionList );
 		}
 	}
 
-	protected void addCascadeConfig(CascadeDefinition cascade) {
+	protected void addCascadeConfig(CascadeDef cascade) {
 		Class<?> beanClass = cascade.getBeanType();
 		configuredClasses.add( beanClass );
 		if ( cascadeConfig.containsKey( beanClass ) ) {
 			cascadeConfig.get( beanClass ).add( cascade );
 		}
 		else {
-			List<CascadeDefinition> cascadeList = new ArrayList<CascadeDefinition>();
+			List<CascadeDef> cascadeList = new ArrayList<CascadeDef>();
 			cascadeList.add( cascade );
 			cascadeConfig.put( beanClass, cascadeList );
 		}
@@ -78,11 +78,11 @@
 		defaultGroupSequences.put( beanClass, defaultGroupSequence );
 	}
 
-	public Map<Class<?>, List<ConstraintDefinition<?>>> getConstraintConfig() {
+	public Map<Class<?>, List<ConstraintDef<?>>> getConstraintConfig() {
 		return constraintConfig;
 	}
 
-	public Map<Class<?>, List<CascadeDefinition>> getCascadeConfig() {
+	public Map<Class<?>, List<CascadeDef>> getCascadeConfig() {
 		return cascadeConfig;
 	}
 

Modified: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/ConstraintsForType.java
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/ConstraintsForType.java	2010-05-25 16:52:25 UTC (rev 19605)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/ConstraintsForType.java	2010-05-25 18:21:27 UTC (rev 19606)
@@ -48,7 +48,7 @@
 		this.elementType = type;
 	}
 
-	public <A extends Annotation, T extends ConstraintDefinition<A>> T constraint(Class<T> definition) {
+	public <A extends Annotation, T extends ConstraintDef<A>> T constraint(Class<T> definition) {
 		final Constructor<T> constructor = ReflectionHelper.getConstructor(
 				definition, Class.class, String.class, ElementType.class, ConstraintMapping.class
 		);
@@ -65,7 +65,7 @@
 	}
 
 	public ConstraintsForType valid(String property, ElementType type) {
-		mapping.addCascadeConfig( new CascadeDefinition( beanClass, property, type ) );
+		mapping.addCascadeConfig( new CascadeDef( beanClass, property, type ) );
 		return this;
 	}
 

Deleted: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/CreditCardNumberDefinition.java
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/CreditCardNumberDefinition.java	2010-05-25 16:52:25 UTC (rev 19605)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/CreditCardNumberDefinition.java	2010-05-25 18:21:27 UTC (rev 19606)
@@ -1,48 +0,0 @@
-// $Id$
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.hibernate.validator.cfg;
-
-import java.lang.annotation.ElementType;
-import javax.validation.Payload;
-
-import org.hibernate.validator.constraints.CreditCardNumber;
-
-/**
- * @author Hardy Ferentschik
- */
-public class CreditCardNumberDefinition extends ConstraintDefinition<CreditCardNumber> {
-	public CreditCardNumberDefinition(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
-		super( beanType, CreditCardNumber.class, property, elementType, mapping );
-	}
-
-	public CreditCardNumberDefinition message(String message) {
-		addParameter( "message", message );
-		return this;
-	}
-
-	public CreditCardNumberDefinition groups(Class<?>... groups) {
-		addParameter( "groups", groups );
-		return this;
-	}
-
-	public CreditCardNumberDefinition payload(Class<? extends Payload>... payload) {
-		addParameter( "payload", payload );
-		return this;
-	}
-}
\ No newline at end of file

Deleted: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/DecimalMaxDefinition.java
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/DecimalMaxDefinition.java	2010-05-25 16:52:25 UTC (rev 19605)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/DecimalMaxDefinition.java	2010-05-25 18:21:27 UTC (rev 19606)
@@ -1,53 +0,0 @@
-// $Id$
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.hibernate.validator.cfg;
-
-import java.lang.annotation.ElementType;
-import javax.validation.Payload;
-import javax.validation.constraints.DecimalMax;
-
-/**
- * @author Hardy Ferentschik
- */
-public class DecimalMaxDefinition extends ConstraintDefinition<DecimalMax> {
-
-	public DecimalMaxDefinition(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
-		super( beanType, DecimalMax.class, property, elementType, mapping );
-	}
-
-	public DecimalMaxDefinition message(String message) {
-		addParameter( "message", message );
-		return this;
-	}
-
-	public DecimalMaxDefinition groups(Class<?>... groups) {
-		addParameter( "groups", groups );
-		return this;
-	}
-
-	public DecimalMaxDefinition payload(Class<? extends Payload>... payload) {
-		addParameter( "payload", payload );
-		return this;
-	}
-
-	public DecimalMaxDefinition value(String max) {
-		addParameter( "value", max );
-		return this;
-	}
-}
\ No newline at end of file

Deleted: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/DecimalMinDefinition.java
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/DecimalMinDefinition.java	2010-05-25 16:52:25 UTC (rev 19605)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/DecimalMinDefinition.java	2010-05-25 18:21:27 UTC (rev 19606)
@@ -1,52 +0,0 @@
-// $Id$
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.cfg;
-
-import java.lang.annotation.ElementType;
-import javax.validation.Payload;
-import javax.validation.constraints.DecimalMin;
-
-/**
- * @author Hardy Ferentschik
- */
-public class DecimalMinDefinition extends ConstraintDefinition<DecimalMin> {
-
-	public DecimalMinDefinition(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
-		super( beanType, DecimalMin.class, property, elementType, mapping );
-	}
-
-	public DecimalMinDefinition message(String message) {
-		addParameter( "message", message );
-		return this;
-	}
-
-	public DecimalMinDefinition groups(Class<?>... groups) {
-		addParameter( "groups", groups );
-		return this;
-	}
-
-	public DecimalMinDefinition payload(Class<? extends Payload>... payload) {
-		addParameter( "payload", payload );
-		return this;
-	}
-
-	public DecimalMinDefinition value(String min) {
-		addParameter( "value", min );
-		return this;
-	}
-}
\ No newline at end of file

Deleted: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/DigitsDefinition.java
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/DigitsDefinition.java	2010-05-25 16:52:25 UTC (rev 19605)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/DigitsDefinition.java	2010-05-25 18:21:27 UTC (rev 19606)
@@ -1,58 +0,0 @@
-// $Id$
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.cfg;
-
-import java.lang.annotation.ElementType;
-import javax.validation.Payload;
-import javax.validation.constraints.Digits;
-
-
-/**
- * @author Hardy Ferentschik
- */
-public class DigitsDefinition extends ConstraintDefinition<Digits> {
-
-	public DigitsDefinition(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
-		super( beanType, Digits.class, property, elementType, mapping );
-	}
-
-	public DigitsDefinition message(String message) {
-		addParameter( "message", message );
-		return this;
-	}
-
-	public DigitsDefinition groups(Class<?>... groups) {
-		addParameter( "groups", groups );
-		return this;
-	}
-
-	public DigitsDefinition payload(Class<? extends Payload>... payload) {
-		addParameter( "payload", payload );
-		return this;
-	}
-
-	public DigitsDefinition integer(int integer) {
-		addParameter( "integer", integer );
-		return this;
-	}
-
-	public DigitsDefinition fraction(int fraction) {
-		addParameter( "fraction", fraction );
-		return this;
-	}
-}
\ No newline at end of file

Deleted: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/EmailDefinition.java
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/EmailDefinition.java	2010-05-25 16:52:25 UTC (rev 19605)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/EmailDefinition.java	2010-05-25 18:21:27 UTC (rev 19606)
@@ -1,48 +0,0 @@
-// $Id$
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.hibernate.validator.cfg;
-
-import java.lang.annotation.ElementType;
-import javax.validation.Payload;
-
-import org.hibernate.validator.constraints.Email;
-
-/**
- * @author Hardy Ferentschik
- */
-public class EmailDefinition extends ConstraintDefinition<Email> {
-	public EmailDefinition(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
-		super( beanType, Email.class, property, elementType, mapping );
-	}
-
-	public EmailDefinition message(String message) {
-		addParameter( "message", message );
-		return this;
-	}
-
-	public EmailDefinition groups(Class<?>... groups) {
-		addParameter( "groups", groups );
-		return this;
-	}
-
-	public EmailDefinition payload(Class<? extends Payload>... payload) {
-		addParameter( "payload", payload );
-		return this;
-	}
-}
\ No newline at end of file

Deleted: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/FutureDefinition.java
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/FutureDefinition.java	2010-05-25 16:52:25 UTC (rev 19605)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/FutureDefinition.java	2010-05-25 18:21:27 UTC (rev 19606)
@@ -1,46 +0,0 @@
-// $Id$
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.cfg;
-
-import java.lang.annotation.ElementType;
-import javax.validation.Payload;
-import javax.validation.constraints.Future;
-
-/**
- * @author Hardy Ferentschik
- */
-public class FutureDefinition extends ConstraintDefinition<Future> {
-	public FutureDefinition(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
-		super( beanType, Future.class, property, elementType, mapping );
-	}
-
-	public FutureDefinition message(String message) {
-		addParameter( "message", message );
-		return this;
-	}
-
-	public FutureDefinition groups(Class<?>... groups) {
-		addParameter( "groups", groups );
-		return this;
-	}
-
-	public FutureDefinition payload(Class<? extends Payload>... payload) {
-		addParameter( "payload", payload );
-		return this;
-	}
-}
\ No newline at end of file

Deleted: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/LengthDefinition.java
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/LengthDefinition.java	2010-05-25 16:52:25 UTC (rev 19605)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/LengthDefinition.java	2010-05-25 18:21:27 UTC (rev 19606)
@@ -1,60 +0,0 @@
-// $Id$
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.hibernate.validator.cfg;
-
-import java.lang.annotation.ElementType;
-import javax.validation.Payload;
-
-import org.hibernate.validator.constraints.Length;
-
-
-/**
- * @author Hardy Ferentschik
- */
-public class LengthDefinition extends ConstraintDefinition<Length> {
-
-	public LengthDefinition(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
-		super( beanType, Length.class, property, elementType, mapping );
-	}
-
-	public LengthDefinition message(String message) {
-		addParameter( "message", message );
-		return this;
-	}
-
-	public LengthDefinition groups(Class<?>... groups) {
-		addParameter( "groups", groups );
-		return this;
-	}
-
-	public LengthDefinition payload(Class<? extends Payload>... payload) {
-		addParameter( "payload", payload );
-		return this;
-	}
-
-	public LengthDefinition min(int min) {
-		addParameter( "min", min );
-		return this;
-	}
-
-	public LengthDefinition max(int max) {
-		addParameter( "max", max );
-		return this;
-	}
-}
\ No newline at end of file

Deleted: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/MaxDefinition.java
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/MaxDefinition.java	2010-05-25 16:52:25 UTC (rev 19605)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/MaxDefinition.java	2010-05-25 18:21:27 UTC (rev 19606)
@@ -1,52 +0,0 @@
-// $Id$
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.cfg;
-
-import java.lang.annotation.ElementType;
-import javax.validation.Payload;
-import javax.validation.constraints.Max;
-
-/**
- * @author Hardy Ferentschik
- */
-public class MaxDefinition extends ConstraintDefinition<Max> {
-
-	public MaxDefinition(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
-		super( beanType, Max.class, property, elementType, mapping );
-	}
-
-	public MaxDefinition message(String message) {
-		addParameter( "message", message );
-		return this;
-	}
-
-	public MaxDefinition groups(Class<?>... groups) {
-		addParameter( "groups", groups );
-		return this;
-	}
-
-	public MaxDefinition payload(Class<? extends Payload>... payload) {
-		addParameter( "payload", payload );
-		return this;
-	}
-
-	public MaxDefinition value(long max) {
-		addParameter( "value", max );
-		return this;
-	}
-}
\ No newline at end of file

Deleted: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/MinDefinition.java
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/MinDefinition.java	2010-05-25 16:52:25 UTC (rev 19605)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/MinDefinition.java	2010-05-25 18:21:27 UTC (rev 19606)
@@ -1,52 +0,0 @@
-// $Id:$
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.cfg;
-
-import java.lang.annotation.ElementType;
-import javax.validation.Payload;
-import javax.validation.constraints.Min;
-
-/**
- * @author Hardy Ferentschik
- */
-public class MinDefinition extends ConstraintDefinition<Min> {
-
-	public MinDefinition(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
-		super( beanType, Min.class, property, elementType, mapping );
-	}
-
-	public MinDefinition message(String message) {
-		addParameter( "message", message );
-		return this;
-	}
-
-	public MinDefinition groups(Class<?>... groups) {
-		addParameter( "groups", groups );
-		return this;
-	}
-
-	public MinDefinition payload(Class<? extends Payload>... payload) {
-		addParameter( "payload", payload );
-		return this;
-	}
-
-	public MinDefinition value(long min) {
-		addParameter( "value", min );
-		return this;
-	}
-}
\ No newline at end of file

Deleted: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/NotBlankDefinition.java
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/NotBlankDefinition.java	2010-05-25 16:52:25 UTC (rev 19605)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/NotBlankDefinition.java	2010-05-25 18:21:27 UTC (rev 19606)
@@ -1,47 +0,0 @@
-// $Id$
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.cfg;
-
-import java.lang.annotation.ElementType;
-import javax.validation.Payload;
-
-import org.hibernate.validator.constraints.NotBlank;
-
-/**
- * @author Hardy Ferentschik
- */
-public class NotBlankDefinition extends ConstraintDefinition<NotBlank> {
-	public NotBlankDefinition(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
-		super( beanType, NotBlank.class, property, elementType, mapping );
-	}
-
-	public NotBlankDefinition message(String message) {
-		addParameter( "message", message );
-		return this;
-	}
-
-	public NotBlankDefinition groups(Class<?>... groups) {
-		addParameter( "groups", groups );
-		return this;
-	}
-
-	public NotBlankDefinition payload(Class<? extends Payload>... payload) {
-		addParameter( "payload", payload );
-		return this;
-	}
-}
\ No newline at end of file

Deleted: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/NotEmptyDefinition.java
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/NotEmptyDefinition.java	2010-05-25 16:52:25 UTC (rev 19605)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/NotEmptyDefinition.java	2010-05-25 18:21:27 UTC (rev 19606)
@@ -1,47 +0,0 @@
-// $Id$
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.cfg;
-
-import java.lang.annotation.ElementType;
-import javax.validation.Payload;
-
-import org.hibernate.validator.constraints.NotEmpty;
-
-/**
- * @author Hardy Ferentschik
- */
-public class NotEmptyDefinition extends ConstraintDefinition<NotEmpty> {
-	public NotEmptyDefinition(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
-		super( beanType, NotEmpty.class, property, elementType, mapping );
-	}
-
-	public NotEmptyDefinition message(String message) {
-		addParameter( "message", message );
-		return this;
-	}
-
-	public NotEmptyDefinition groups(Class<?>... groups) {
-		addParameter( "groups", groups );
-		return this;
-	}
-
-	public NotEmptyDefinition payload(Class<? extends Payload>... payload) {
-		addParameter( "payload", payload );
-		return this;
-	}
-}
\ No newline at end of file

Deleted: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/NotNullDefinition.java
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/NotNullDefinition.java	2010-05-25 16:52:25 UTC (rev 19605)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/NotNullDefinition.java	2010-05-25 18:21:27 UTC (rev 19606)
@@ -1,46 +0,0 @@
-// $Id:$
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.cfg;
-
-import java.lang.annotation.ElementType;
-import javax.validation.Payload;
-import javax.validation.constraints.NotNull;
-
-/**
- * @author Hardy Ferentschik
- */
-public class NotNullDefinition extends ConstraintDefinition<NotNull> {
-	public NotNullDefinition(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
-		super( beanType, NotNull.class, property, elementType, mapping );
-	}
-
-	public NotNullDefinition message(String message) {
-		addParameter( "message", message );
-		return this;
-	}
-
-	public NotNullDefinition groups(Class<?>... groups) {
-		addParameter( "groups", groups );
-		return this;
-	}
-
-	public NotNullDefinition payload(Class<? extends Payload>... payload) {
-		addParameter( "payload", payload );
-		return this;
-	}
-}
\ No newline at end of file

Deleted: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/NullDefinition.java
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/NullDefinition.java	2010-05-25 16:52:25 UTC (rev 19605)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/NullDefinition.java	2010-05-25 18:21:27 UTC (rev 19606)
@@ -1,46 +0,0 @@
-// $Id$
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.cfg;
-
-import java.lang.annotation.ElementType;
-import javax.validation.Payload;
-import javax.validation.constraints.Null;
-
-/**
- * @author Hardy Ferentschik
- */
-public class NullDefinition extends ConstraintDefinition<Null> {
-	public NullDefinition(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
-		super( beanType, Null.class, property, elementType, mapping );
-	}
-
-	public NullDefinition message(String message) {
-		addParameter( "message", message );
-		return this;
-	}
-
-	public NullDefinition groups(Class<?>... groups) {
-		addParameter( "groups", groups );
-		return this;
-	}
-
-	public NullDefinition payload(Class<? extends Payload>... payload) {
-		addParameter( "payload", payload );
-		return this;
-	}
-}
\ No newline at end of file

Deleted: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/PastDefinition.java
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/PastDefinition.java	2010-05-25 16:52:25 UTC (rev 19605)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/PastDefinition.java	2010-05-25 18:21:27 UTC (rev 19606)
@@ -1,47 +0,0 @@
-// $Id$
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.cfg;
-
-import java.lang.annotation.ElementType;
-import javax.validation.Payload;
-import javax.validation.constraints.Future;
-import javax.validation.constraints.Past;
-
-/**
- * @author Hardy Ferentschik
- */
-public class PastDefinition extends ConstraintDefinition<Past> {
-	public PastDefinition(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
-		super( beanType, Past.class, property, elementType, mapping );
-	}
-
-	public PastDefinition message(String message) {
-		addParameter( "message", message );
-		return this;
-	}
-
-	public PastDefinition groups(Class<?>... groups) {
-		addParameter( "groups", groups );
-		return this;
-	}
-
-	public PastDefinition payload(Class<? extends Payload>... payload) {
-		addParameter( "payload", payload );
-		return this;
-	}
-}
\ No newline at end of file

Deleted: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/PatternDefinition.java
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/PatternDefinition.java	2010-05-25 16:52:25 UTC (rev 19605)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/PatternDefinition.java	2010-05-25 18:21:27 UTC (rev 19606)
@@ -1,58 +0,0 @@
-// $Id:$
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.cfg;
-
-import java.lang.annotation.ElementType;
-import javax.validation.Payload;
-import javax.validation.constraints.Pattern;
-
-
-/**
- * @author Hardy Ferentschik
- */
-public class PatternDefinition extends ConstraintDefinition<Pattern> {
-
-	public PatternDefinition(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
-		super( beanType, Pattern.class, property, elementType, mapping );
-	}
-
-	public PatternDefinition message(String message) {
-		addParameter( "message", message );
-		return this;
-	}
-
-	public PatternDefinition groups(Class<?>... groups) {
-		addParameter( "groups", groups );
-		return this;
-	}
-
-	public PatternDefinition payload(Class<? extends Payload>... payload) {
-		addParameter( "payload", payload );
-		return this;
-	}
-
-	public PatternDefinition flags(Pattern.Flag[] flags) {
-		addParameter( "flags", flags );
-		return this;
-	}
-
-	public PatternDefinition regexp(String regexp) {
-		addParameter( "regexp", regexp );
-		return this;
-	}
-}
\ No newline at end of file

Deleted: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/RangeDefinition.java
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/RangeDefinition.java	2010-05-25 16:52:25 UTC (rev 19605)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/RangeDefinition.java	2010-05-25 18:21:27 UTC (rev 19606)
@@ -1,58 +0,0 @@
-// $Id$
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.cfg;
-
-import java.lang.annotation.ElementType;
-import javax.validation.Payload;
-
-import org.hibernate.validator.constraints.Range;
-
-/**
- * @author Hardy Ferentschik
- */
-public class RangeDefinition extends ConstraintDefinition<Range> {
-
-	public RangeDefinition(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
-		super( beanType, Range.class, property, elementType, mapping );
-	}
-
-	public RangeDefinition message(String message) {
-		addParameter( "message", message );
-		return this;
-	}
-
-	public RangeDefinition groups(Class<?>... groups) {
-		addParameter( "groups", groups );
-		return this;
-	}
-
-	public RangeDefinition payload(Class<? extends Payload>... payload) {
-		addParameter( "payload", payload );
-		return this;
-	}
-
-	public RangeDefinition min(long min) {
-		addParameter( "value", min );
-		return this;
-	}
-
-	public RangeDefinition max(long max) {
-		addParameter( "value", max );
-		return this;
-	}
-}
\ No newline at end of file

Deleted: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/ScriptAssertDefinition.java
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/ScriptAssertDefinition.java	2010-05-25 16:52:25 UTC (rev 19605)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/ScriptAssertDefinition.java	2010-05-25 18:21:27 UTC (rev 19606)
@@ -1,63 +0,0 @@
-// $Id$
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.cfg;
-
-import java.lang.annotation.ElementType;
-import javax.validation.Payload;
-
-import org.hibernate.validator.constraints.ScriptAssert;
-
-/**
- * @author Hardy Ferentschik
- */
-public class ScriptAssertDefinition extends ConstraintDefinition<ScriptAssert> {
-
-	public ScriptAssertDefinition(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
-		super( beanType, ScriptAssert.class, property, elementType, mapping );
-	}
-
-	public ScriptAssertDefinition message(String message) {
-		addParameter( "message", message );
-		return this;
-	}
-
-	public ScriptAssertDefinition groups(Class<?>... groups) {
-		addParameter( "groups", groups );
-		return this;
-	}
-
-	public ScriptAssertDefinition payload(Class<? extends Payload>... payload) {
-		addParameter( "payload", payload );
-		return this;
-	}
-
-	public ScriptAssertDefinition lang(String lang) {
-		addParameter( "lang", lang );
-		return this;
-	}
-
-	public ScriptAssertDefinition script(String script) {
-		addParameter( "script", script );
-		return this;
-	}
-
-	public ScriptAssertDefinition alias(String alias) {
-		addParameter( "alias", alias );
-		return this;
-	}
-}
\ No newline at end of file

Deleted: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/SizeDefinition.java
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/SizeDefinition.java	2010-05-25 16:52:25 UTC (rev 19605)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/SizeDefinition.java	2010-05-25 18:21:27 UTC (rev 19606)
@@ -1,60 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// $Id:$
-package org.hibernate.validator.cfg;
-
-import java.lang.annotation.ElementType;
-import javax.validation.Payload;
-import javax.validation.constraints.Size;
-
-/**
- * @author Hardy Ferentschik
- */
-public class SizeDefinition extends ConstraintDefinition<Size> {
-
-	public SizeDefinition(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
-		super( beanType, Size.class, property, elementType, mapping );
-	}
-
-	public SizeDefinition message(String message) {
-		addParameter( "message", message );
-		return this;
-	}
-
-	public SizeDefinition groups(Class<?>... groups) {
-		addParameter( "groups", groups );
-		return this;
-	}
-
-	public SizeDefinition payload(Class<? extends Payload>... payload) {
-		addParameter( "payload", payload );
-		return this;
-	}
-
-	public SizeDefinition min(int min) {
-		addParameter( "min", min );
-		return this;
-	}
-
-	public SizeDefinition max(int max) {
-		addParameter( "max", max );
-		return this;
-	}
-}
-
-

Deleted: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/URLDefinition.java
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/URLDefinition.java	2010-05-25 16:52:25 UTC (rev 19605)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/URLDefinition.java	2010-05-25 18:21:27 UTC (rev 19606)
@@ -1,62 +0,0 @@
-// $Id$
-/* JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.hibernate.validator.cfg;
-
-import java.lang.annotation.ElementType;
-import javax.validation.Payload;
-
-import org.hibernate.validator.constraints.URL;
-
-/**
- * @author Hardy Ferentschik
- */
-public class URLDefinition extends ConstraintDefinition<URL> {
-
-	public URLDefinition(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
-		super( beanType, URL.class, property, elementType, mapping );
-	}
-
-	public URLDefinition message(String message) {
-		addParameter( "message", message );
-		return this;
-	}
-
-	public URLDefinition groups(Class<?>... groups) {
-		addParameter( "groups", groups );
-		return this;
-	}
-
-	public URLDefinition payload(Class<? extends Payload>... payload) {
-		addParameter( "payload", payload );
-		return this;
-	}
-
-	public URLDefinition protocol(String protocol) {
-		addParameter( "protocol", protocol );
-		return this;
-	}
-
-	public URLDefinition host(String host) {
-		addParameter( "host", host );
-		return this;
-	}
-
-	public URLDefinition port(int port) {
-		addParameter( "port", port );
-		return this;
-	}
-}
\ No newline at end of file

Copied: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/AssertFalseDef.java (from rev 19596, validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/AssertFalseDefinition.java)
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/AssertFalseDef.java	                        (rev 0)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/AssertFalseDef.java	2010-05-25 18:21:27 UTC (rev 19606)
@@ -0,0 +1,49 @@
+// $Id$
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.cfg.defs;
+
+import java.lang.annotation.ElementType;
+import javax.validation.Payload;
+import javax.validation.constraints.AssertFalse;
+
+import org.hibernate.validator.cfg.ConstraintDef;
+import org.hibernate.validator.cfg.ConstraintMapping;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class AssertFalseDef extends ConstraintDef<AssertFalse> {
+	public AssertFalseDef(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
+		super( beanType, AssertFalse.class, property, elementType, mapping );
+	}
+
+	public AssertFalseDef message(String message) {
+		addParameter( "message", message );
+		return this;
+	}
+
+	public AssertFalseDef groups(Class<?>... groups) {
+		addParameter( "groups", groups );
+		return this;
+	}
+
+	public AssertFalseDef payload(Class<? extends Payload>... payload) {
+		addParameter( "payload", payload );
+		return this;
+	}
+}
\ No newline at end of file


Property changes on: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/AssertFalseDef.java
___________________________________________________________________
Name: svn:keywords
   + Id

Copied: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/AssertTrueDef.java (from rev 19582, validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/AssertTrueDefinition.java)
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/AssertTrueDef.java	                        (rev 0)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/AssertTrueDef.java	2010-05-25 18:21:27 UTC (rev 19606)
@@ -0,0 +1,49 @@
+// $Id$
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.cfg.defs;
+
+import java.lang.annotation.ElementType;
+import javax.validation.Payload;
+import javax.validation.constraints.AssertTrue;
+
+import org.hibernate.validator.cfg.ConstraintDef;
+import org.hibernate.validator.cfg.ConstraintMapping;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class AssertTrueDef extends ConstraintDef<AssertTrue> {
+	public AssertTrueDef(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
+		super( beanType, AssertTrue.class, property, elementType, mapping );
+	}
+
+	public AssertTrueDef message(String message) {
+		addParameter( "message", message );
+		return this;
+	}
+
+	public AssertTrueDef groups(Class<?>... groups) {
+		addParameter( "groups", groups );
+		return this;
+	}
+
+	public AssertTrueDef payload(Class<? extends Payload>... payload) {
+		addParameter( "payload", payload );
+		return this;
+	}
+}
\ No newline at end of file


Property changes on: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/AssertTrueDef.java
___________________________________________________________________
Name: svn:keywords
   + Id

Copied: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/CreditCardNumberDef.java (from rev 19596, validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/CreditCardNumberDefinition.java)
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/CreditCardNumberDef.java	                        (rev 0)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/CreditCardNumberDef.java	2010-05-25 18:21:27 UTC (rev 19606)
@@ -0,0 +1,50 @@
+// $Id$
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.hibernate.validator.cfg.defs;
+
+import java.lang.annotation.ElementType;
+import javax.validation.Payload;
+
+import org.hibernate.validator.cfg.ConstraintDef;
+import org.hibernate.validator.cfg.ConstraintMapping;
+import org.hibernate.validator.constraints.CreditCardNumber;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class CreditCardNumberDef extends ConstraintDef<CreditCardNumber> {
+	public CreditCardNumberDef(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
+		super( beanType, CreditCardNumber.class, property, elementType, mapping );
+	}
+
+	public CreditCardNumberDef message(String message) {
+		addParameter( "message", message );
+		return this;
+	}
+
+	public CreditCardNumberDef groups(Class<?>... groups) {
+		addParameter( "groups", groups );
+		return this;
+	}
+
+	public CreditCardNumberDef payload(Class<? extends Payload>... payload) {
+		addParameter( "payload", payload );
+		return this;
+	}
+}
\ No newline at end of file


Property changes on: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/CreditCardNumberDef.java
___________________________________________________________________
Name: svn:keywords
   + Id

Copied: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/DecimalMaxDef.java (from rev 19596, validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/DecimalMaxDefinition.java)
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/DecimalMaxDef.java	                        (rev 0)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/DecimalMaxDef.java	2010-05-25 18:21:27 UTC (rev 19606)
@@ -0,0 +1,56 @@
+// $Id$
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.hibernate.validator.cfg.defs;
+
+import java.lang.annotation.ElementType;
+import javax.validation.Payload;
+import javax.validation.constraints.DecimalMax;
+
+import org.hibernate.validator.cfg.ConstraintDef;
+import org.hibernate.validator.cfg.ConstraintMapping;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class DecimalMaxDef extends ConstraintDef<DecimalMax> {
+
+	public DecimalMaxDef(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
+		super( beanType, DecimalMax.class, property, elementType, mapping );
+	}
+
+	public DecimalMaxDef message(String message) {
+		addParameter( "message", message );
+		return this;
+	}
+
+	public DecimalMaxDef groups(Class<?>... groups) {
+		addParameter( "groups", groups );
+		return this;
+	}
+
+	public DecimalMaxDef payload(Class<? extends Payload>... payload) {
+		addParameter( "payload", payload );
+		return this;
+	}
+
+	public DecimalMaxDef value(String max) {
+		addParameter( "value", max );
+		return this;
+	}
+}
\ No newline at end of file


Property changes on: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/DecimalMaxDef.java
___________________________________________________________________
Name: svn:keywords
   + Id

Copied: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/DecimalMinDef.java (from rev 19596, validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/DecimalMinDefinition.java)
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/DecimalMinDef.java	                        (rev 0)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/DecimalMinDef.java	2010-05-25 18:21:27 UTC (rev 19606)
@@ -0,0 +1,55 @@
+// $Id$
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.cfg.defs;
+
+import java.lang.annotation.ElementType;
+import javax.validation.Payload;
+import javax.validation.constraints.DecimalMin;
+
+import org.hibernate.validator.cfg.ConstraintDef;
+import org.hibernate.validator.cfg.ConstraintMapping;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class DecimalMinDef extends ConstraintDef<DecimalMin> {
+
+	public DecimalMinDef(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
+		super( beanType, DecimalMin.class, property, elementType, mapping );
+	}
+
+	public DecimalMinDef message(String message) {
+		addParameter( "message", message );
+		return this;
+	}
+
+	public DecimalMinDef groups(Class<?>... groups) {
+		addParameter( "groups", groups );
+		return this;
+	}
+
+	public DecimalMinDef payload(Class<? extends Payload>... payload) {
+		addParameter( "payload", payload );
+		return this;
+	}
+
+	public DecimalMinDef value(String min) {
+		addParameter( "value", min );
+		return this;
+	}
+}
\ No newline at end of file


Property changes on: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/DecimalMinDef.java
___________________________________________________________________
Name: svn:keywords
   + Id

Copied: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/DigitsDef.java (from rev 19596, validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/DigitsDefinition.java)
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/DigitsDef.java	                        (rev 0)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/DigitsDef.java	2010-05-25 18:21:27 UTC (rev 19606)
@@ -0,0 +1,61 @@
+// $Id$
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.cfg.defs;
+
+import java.lang.annotation.ElementType;
+import javax.validation.Payload;
+import javax.validation.constraints.Digits;
+
+import org.hibernate.validator.cfg.ConstraintDef;
+import org.hibernate.validator.cfg.ConstraintMapping;
+
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class DigitsDef extends ConstraintDef<Digits> {
+
+	public DigitsDef(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
+		super( beanType, Digits.class, property, elementType, mapping );
+	}
+
+	public DigitsDef message(String message) {
+		addParameter( "message", message );
+		return this;
+	}
+
+	public DigitsDef groups(Class<?>... groups) {
+		addParameter( "groups", groups );
+		return this;
+	}
+
+	public DigitsDef payload(Class<? extends Payload>... payload) {
+		addParameter( "payload", payload );
+		return this;
+	}
+
+	public DigitsDef integer(int integer) {
+		addParameter( "integer", integer );
+		return this;
+	}
+
+	public DigitsDef fraction(int fraction) {
+		addParameter( "fraction", fraction );
+		return this;
+	}
+}
\ No newline at end of file


Property changes on: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/DigitsDef.java
___________________________________________________________________
Name: svn:keywords
   + Id

Copied: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/EmailDef.java (from rev 19596, validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/EmailDefinition.java)
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/EmailDef.java	                        (rev 0)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/EmailDef.java	2010-05-25 18:21:27 UTC (rev 19606)
@@ -0,0 +1,50 @@
+// $Id$
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.hibernate.validator.cfg.defs;
+
+import java.lang.annotation.ElementType;
+import javax.validation.Payload;
+
+import org.hibernate.validator.cfg.ConstraintDef;
+import org.hibernate.validator.cfg.ConstraintMapping;
+import org.hibernate.validator.constraints.Email;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class EmailDef extends ConstraintDef<Email> {
+	public EmailDef(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
+		super( beanType, Email.class, property, elementType, mapping );
+	}
+
+	public EmailDef message(String message) {
+		addParameter( "message", message );
+		return this;
+	}
+
+	public EmailDef groups(Class<?>... groups) {
+		addParameter( "groups", groups );
+		return this;
+	}
+
+	public EmailDef payload(Class<? extends Payload>... payload) {
+		addParameter( "payload", payload );
+		return this;
+	}
+}
\ No newline at end of file


Property changes on: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/EmailDef.java
___________________________________________________________________
Name: svn:keywords
   + Id

Copied: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/FutureDef.java (from rev 19566, validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/FutureDefinition.java)
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/FutureDef.java	                        (rev 0)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/FutureDef.java	2010-05-25 18:21:27 UTC (rev 19606)
@@ -0,0 +1,49 @@
+// $Id$
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.cfg.defs;
+
+import java.lang.annotation.ElementType;
+import javax.validation.Payload;
+import javax.validation.constraints.Future;
+
+import org.hibernate.validator.cfg.ConstraintDef;
+import org.hibernate.validator.cfg.ConstraintMapping;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class FutureDef extends ConstraintDef<Future> {
+	public FutureDef(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
+		super( beanType, Future.class, property, elementType, mapping );
+	}
+
+	public FutureDef message(String message) {
+		addParameter( "message", message );
+		return this;
+	}
+
+	public FutureDef groups(Class<?>... groups) {
+		addParameter( "groups", groups );
+		return this;
+	}
+
+	public FutureDef payload(Class<? extends Payload>... payload) {
+		addParameter( "payload", payload );
+		return this;
+	}
+}
\ No newline at end of file


Property changes on: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/FutureDef.java
___________________________________________________________________
Name: svn:keywords
   + Id

Copied: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/LengthDef.java (from rev 19596, validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/LengthDefinition.java)
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/LengthDef.java	                        (rev 0)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/LengthDef.java	2010-05-25 18:21:27 UTC (rev 19606)
@@ -0,0 +1,62 @@
+// $Id$
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.hibernate.validator.cfg.defs;
+
+import java.lang.annotation.ElementType;
+import javax.validation.Payload;
+
+import org.hibernate.validator.cfg.ConstraintDef;
+import org.hibernate.validator.cfg.ConstraintMapping;
+import org.hibernate.validator.constraints.Length;
+
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class LengthDef extends ConstraintDef<Length> {
+
+	public LengthDef(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
+		super( beanType, Length.class, property, elementType, mapping );
+	}
+
+	public LengthDef message(String message) {
+		addParameter( "message", message );
+		return this;
+	}
+
+	public LengthDef groups(Class<?>... groups) {
+		addParameter( "groups", groups );
+		return this;
+	}
+
+	public LengthDef payload(Class<? extends Payload>... payload) {
+		addParameter( "payload", payload );
+		return this;
+	}
+
+	public LengthDef min(int min) {
+		addParameter( "min", min );
+		return this;
+	}
+
+	public LengthDef max(int max) {
+		addParameter( "max", max );
+		return this;
+	}
+}
\ No newline at end of file


Property changes on: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/LengthDef.java
___________________________________________________________________
Name: svn:keywords
   + Id

Copied: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/MaxDef.java (from rev 19596, validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/MaxDefinition.java)
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/MaxDef.java	                        (rev 0)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/MaxDef.java	2010-05-25 18:21:27 UTC (rev 19606)
@@ -0,0 +1,55 @@
+// $Id$
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.cfg.defs;
+
+import java.lang.annotation.ElementType;
+import javax.validation.Payload;
+import javax.validation.constraints.Max;
+
+import org.hibernate.validator.cfg.ConstraintDef;
+import org.hibernate.validator.cfg.ConstraintMapping;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class MaxDef extends ConstraintDef<Max> {
+
+	public MaxDef(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
+		super( beanType, Max.class, property, elementType, mapping );
+	}
+
+	public MaxDef message(String message) {
+		addParameter( "message", message );
+		return this;
+	}
+
+	public MaxDef groups(Class<?>... groups) {
+		addParameter( "groups", groups );
+		return this;
+	}
+
+	public MaxDef payload(Class<? extends Payload>... payload) {
+		addParameter( "payload", payload );
+		return this;
+	}
+
+	public MaxDef value(long max) {
+		addParameter( "value", max );
+		return this;
+	}
+}
\ No newline at end of file


Property changes on: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/MaxDef.java
___________________________________________________________________
Name: svn:keywords
   + Id

Copied: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/MinDef.java (from rev 19559, validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/MinDefinition.java)
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/MinDef.java	                        (rev 0)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/MinDef.java	2010-05-25 18:21:27 UTC (rev 19606)
@@ -0,0 +1,55 @@
+// $Id$
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.cfg.defs;
+
+import java.lang.annotation.ElementType;
+import javax.validation.Payload;
+import javax.validation.constraints.Min;
+
+import org.hibernate.validator.cfg.ConstraintDef;
+import org.hibernate.validator.cfg.ConstraintMapping;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class MinDef extends ConstraintDef<Min> {
+
+	public MinDef(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
+		super( beanType, Min.class, property, elementType, mapping );
+	}
+
+	public MinDef message(String message) {
+		addParameter( "message", message );
+		return this;
+	}
+
+	public MinDef groups(Class<?>... groups) {
+		addParameter( "groups", groups );
+		return this;
+	}
+
+	public MinDef payload(Class<? extends Payload>... payload) {
+		addParameter( "payload", payload );
+		return this;
+	}
+
+	public MinDef value(long min) {
+		addParameter( "value", min );
+		return this;
+	}
+}
\ No newline at end of file


Property changes on: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/MinDef.java
___________________________________________________________________
Name: svn:keywords
   + Id

Copied: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/NotBlankDef.java (from rev 19596, validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/NotBlankDefinition.java)
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/NotBlankDef.java	                        (rev 0)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/NotBlankDef.java	2010-05-25 18:21:27 UTC (rev 19606)
@@ -0,0 +1,49 @@
+// $Id$
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.cfg.defs;
+
+import java.lang.annotation.ElementType;
+import javax.validation.Payload;
+
+import org.hibernate.validator.cfg.ConstraintDef;
+import org.hibernate.validator.cfg.ConstraintMapping;
+import org.hibernate.validator.constraints.NotBlank;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class NotBlankDef extends ConstraintDef<NotBlank> {
+	public NotBlankDef(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
+		super( beanType, NotBlank.class, property, elementType, mapping );
+	}
+
+	public NotBlankDef message(String message) {
+		addParameter( "message", message );
+		return this;
+	}
+
+	public NotBlankDef groups(Class<?>... groups) {
+		addParameter( "groups", groups );
+		return this;
+	}
+
+	public NotBlankDef payload(Class<? extends Payload>... payload) {
+		addParameter( "payload", payload );
+		return this;
+	}
+}
\ No newline at end of file


Property changes on: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/NotBlankDef.java
___________________________________________________________________
Name: svn:keywords
   + Id

Copied: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/NotEmptyDef.java (from rev 19596, validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/NotEmptyDefinition.java)
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/NotEmptyDef.java	                        (rev 0)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/NotEmptyDef.java	2010-05-25 18:21:27 UTC (rev 19606)
@@ -0,0 +1,49 @@
+// $Id$
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.cfg.defs;
+
+import java.lang.annotation.ElementType;
+import javax.validation.Payload;
+
+import org.hibernate.validator.cfg.ConstraintDef;
+import org.hibernate.validator.cfg.ConstraintMapping;
+import org.hibernate.validator.constraints.NotEmpty;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class NotEmptyDef extends ConstraintDef<NotEmpty> {
+	public NotEmptyDef(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
+		super( beanType, NotEmpty.class, property, elementType, mapping );
+	}
+
+	public NotEmptyDef message(String message) {
+		addParameter( "message", message );
+		return this;
+	}
+
+	public NotEmptyDef groups(Class<?>... groups) {
+		addParameter( "groups", groups );
+		return this;
+	}
+
+	public NotEmptyDef payload(Class<? extends Payload>... payload) {
+		addParameter( "payload", payload );
+		return this;
+	}
+}
\ No newline at end of file


Property changes on: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/NotEmptyDef.java
___________________________________________________________________
Name: svn:keywords
   + Id

Copied: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/NotNullDef.java (from rev 19559, validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/NotNullDefinition.java)
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/NotNullDef.java	                        (rev 0)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/NotNullDef.java	2010-05-25 18:21:27 UTC (rev 19606)
@@ -0,0 +1,49 @@
+// $Id$
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.cfg.defs;
+
+import java.lang.annotation.ElementType;
+import javax.validation.Payload;
+import javax.validation.constraints.NotNull;
+
+import org.hibernate.validator.cfg.ConstraintDef;
+import org.hibernate.validator.cfg.ConstraintMapping;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class NotNullDef extends ConstraintDef<NotNull> {
+	public NotNullDef(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
+		super( beanType, NotNull.class, property, elementType, mapping );
+	}
+
+	public NotNullDef message(String message) {
+		addParameter( "message", message );
+		return this;
+	}
+
+	public NotNullDef groups(Class<?>... groups) {
+		addParameter( "groups", groups );
+		return this;
+	}
+
+	public NotNullDef payload(Class<? extends Payload>... payload) {
+		addParameter( "payload", payload );
+		return this;
+	}
+}
\ No newline at end of file


Property changes on: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/NotNullDef.java
___________________________________________________________________
Name: svn:keywords
   + Id

Copied: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/NullDef.java (from rev 19596, validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/NullDefinition.java)
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/NullDef.java	                        (rev 0)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/NullDef.java	2010-05-25 18:21:27 UTC (rev 19606)
@@ -0,0 +1,49 @@
+// $Id$
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.cfg.defs;
+
+import java.lang.annotation.ElementType;
+import javax.validation.Payload;
+import javax.validation.constraints.Null;
+
+import org.hibernate.validator.cfg.ConstraintDef;
+import org.hibernate.validator.cfg.ConstraintMapping;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class NullDef extends ConstraintDef<Null> {
+	public NullDef(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
+		super( beanType, Null.class, property, elementType, mapping );
+	}
+
+	public NullDef message(String message) {
+		addParameter( "message", message );
+		return this;
+	}
+
+	public NullDef groups(Class<?>... groups) {
+		addParameter( "groups", groups );
+		return this;
+	}
+
+	public NullDef payload(Class<? extends Payload>... payload) {
+		addParameter( "payload", payload );
+		return this;
+	}
+}
\ No newline at end of file


Property changes on: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/NullDef.java
___________________________________________________________________
Name: svn:keywords
   + Id

Copied: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/PastDef.java (from rev 19596, validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/PastDefinition.java)
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/PastDef.java	                        (rev 0)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/PastDef.java	2010-05-25 18:21:27 UTC (rev 19606)
@@ -0,0 +1,49 @@
+// $Id$
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.cfg.defs;
+
+import java.lang.annotation.ElementType;
+import javax.validation.Payload;
+import javax.validation.constraints.Past;
+
+import org.hibernate.validator.cfg.ConstraintDef;
+import org.hibernate.validator.cfg.ConstraintMapping;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class PastDef extends ConstraintDef<Past> {
+	public PastDef(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
+		super( beanType, Past.class, property, elementType, mapping );
+	}
+
+	public PastDef message(String message) {
+		addParameter( "message", message );
+		return this;
+	}
+
+	public PastDef groups(Class<?>... groups) {
+		addParameter( "groups", groups );
+		return this;
+	}
+
+	public PastDef payload(Class<? extends Payload>... payload) {
+		addParameter( "payload", payload );
+		return this;
+	}
+}
\ No newline at end of file


Property changes on: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/PastDef.java
___________________________________________________________________
Name: svn:keywords
   + Id

Copied: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/PatternDef.java (from rev 19559, validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/PatternDefinition.java)
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/PatternDef.java	                        (rev 0)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/PatternDef.java	2010-05-25 18:21:27 UTC (rev 19606)
@@ -0,0 +1,61 @@
+// $Id$
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.cfg.defs;
+
+import java.lang.annotation.ElementType;
+import javax.validation.Payload;
+import javax.validation.constraints.Pattern;
+
+import org.hibernate.validator.cfg.ConstraintDef;
+import org.hibernate.validator.cfg.ConstraintMapping;
+
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class PatternDef extends ConstraintDef<Pattern> {
+
+	public PatternDef(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
+		super( beanType, Pattern.class, property, elementType, mapping );
+	}
+
+	public PatternDef message(String message) {
+		addParameter( "message", message );
+		return this;
+	}
+
+	public PatternDef groups(Class<?>... groups) {
+		addParameter( "groups", groups );
+		return this;
+	}
+
+	public PatternDef payload(Class<? extends Payload>... payload) {
+		addParameter( "payload", payload );
+		return this;
+	}
+
+	public PatternDef flags(Pattern.Flag[] flags) {
+		addParameter( "flags", flags );
+		return this;
+	}
+
+	public PatternDef regexp(String regexp) {
+		addParameter( "regexp", regexp );
+		return this;
+	}
+}
\ No newline at end of file


Property changes on: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/PatternDef.java
___________________________________________________________________
Name: svn:keywords
   + Id

Copied: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/RangeDef.java (from rev 19596, validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/RangeDefinition.java)
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/RangeDef.java	                        (rev 0)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/RangeDef.java	2010-05-25 18:21:27 UTC (rev 19606)
@@ -0,0 +1,60 @@
+// $Id$
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.cfg.defs;
+
+import java.lang.annotation.ElementType;
+import javax.validation.Payload;
+
+import org.hibernate.validator.cfg.ConstraintDef;
+import org.hibernate.validator.cfg.ConstraintMapping;
+import org.hibernate.validator.constraints.Range;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class RangeDef extends ConstraintDef<Range> {
+
+	public RangeDef(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
+		super( beanType, Range.class, property, elementType, mapping );
+	}
+
+	public RangeDef message(String message) {
+		addParameter( "message", message );
+		return this;
+	}
+
+	public RangeDef groups(Class<?>... groups) {
+		addParameter( "groups", groups );
+		return this;
+	}
+
+	public RangeDef payload(Class<? extends Payload>... payload) {
+		addParameter( "payload", payload );
+		return this;
+	}
+
+	public RangeDef min(long min) {
+		addParameter( "value", min );
+		return this;
+	}
+
+	public RangeDef max(long max) {
+		addParameter( "value", max );
+		return this;
+	}
+}
\ No newline at end of file


Property changes on: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/RangeDef.java
___________________________________________________________________
Name: svn:keywords
   + Id

Copied: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/ScriptAssertDef.java (from rev 19596, validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/ScriptAssertDefinition.java)
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/ScriptAssertDef.java	                        (rev 0)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/ScriptAssertDef.java	2010-05-25 18:21:27 UTC (rev 19606)
@@ -0,0 +1,65 @@
+// $Id$
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.cfg.defs;
+
+import java.lang.annotation.ElementType;
+import javax.validation.Payload;
+
+import org.hibernate.validator.cfg.ConstraintDef;
+import org.hibernate.validator.cfg.ConstraintMapping;
+import org.hibernate.validator.constraints.ScriptAssert;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class ScriptAssertDef extends ConstraintDef<ScriptAssert> {
+
+	public ScriptAssertDef(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
+		super( beanType, ScriptAssert.class, property, elementType, mapping );
+	}
+
+	public ScriptAssertDef message(String message) {
+		addParameter( "message", message );
+		return this;
+	}
+
+	public ScriptAssertDef groups(Class<?>... groups) {
+		addParameter( "groups", groups );
+		return this;
+	}
+
+	public ScriptAssertDef payload(Class<? extends Payload>... payload) {
+		addParameter( "payload", payload );
+		return this;
+	}
+
+	public ScriptAssertDef lang(String lang) {
+		addParameter( "lang", lang );
+		return this;
+	}
+
+	public ScriptAssertDef script(String script) {
+		addParameter( "script", script );
+		return this;
+	}
+
+	public ScriptAssertDef alias(String alias) {
+		addParameter( "alias", alias );
+		return this;
+	}
+}
\ No newline at end of file


Property changes on: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/ScriptAssertDef.java
___________________________________________________________________
Name: svn:keywords
   + Id

Copied: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/SizeDef.java (from rev 19559, validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/SizeDefinition.java)
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/SizeDef.java	                        (rev 0)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/SizeDef.java	2010-05-25 18:21:27 UTC (rev 19606)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// $Id$
+package org.hibernate.validator.cfg.defs;
+
+import java.lang.annotation.ElementType;
+import javax.validation.Payload;
+import javax.validation.constraints.Size;
+
+import org.hibernate.validator.cfg.ConstraintDef;
+import org.hibernate.validator.cfg.ConstraintMapping;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class SizeDef extends ConstraintDef<Size> {
+
+	public SizeDef(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
+		super( beanType, Size.class, property, elementType, mapping );
+	}
+
+	public SizeDef message(String message) {
+		addParameter( "message", message );
+		return this;
+	}
+
+	public SizeDef groups(Class<?>... groups) {
+		addParameter( "groups", groups );
+		return this;
+	}
+
+	public SizeDef payload(Class<? extends Payload>... payload) {
+		addParameter( "payload", payload );
+		return this;
+	}
+
+	public SizeDef min(int min) {
+		addParameter( "min", min );
+		return this;
+	}
+
+	public SizeDef max(int max) {
+		addParameter( "max", max );
+		return this;
+	}
+}
+
+


Property changes on: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/SizeDef.java
___________________________________________________________________
Name: svn:keywords
   + Id

Copied: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/URLDef.java (from rev 19596, validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/URLDefinition.java)
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/URLDef.java	                        (rev 0)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/URLDef.java	2010-05-25 18:21:27 UTC (rev 19606)
@@ -0,0 +1,64 @@
+// $Id$
+/* JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.hibernate.validator.cfg.defs;
+
+import java.lang.annotation.ElementType;
+import javax.validation.Payload;
+
+import org.hibernate.validator.cfg.ConstraintDef;
+import org.hibernate.validator.cfg.ConstraintMapping;
+import org.hibernate.validator.constraints.URL;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class URLDef extends ConstraintDef<URL> {
+
+	public URLDef(Class<?> beanType, String property, ElementType elementType, ConstraintMapping mapping) {
+		super( beanType, URL.class, property, elementType, mapping );
+	}
+
+	public URLDef message(String message) {
+		addParameter( "message", message );
+		return this;
+	}
+
+	public URLDef groups(Class<?>... groups) {
+		addParameter( "groups", groups );
+		return this;
+	}
+
+	public URLDef payload(Class<? extends Payload>... payload) {
+		addParameter( "payload", payload );
+		return this;
+	}
+
+	public URLDef protocol(String protocol) {
+		addParameter( "protocol", protocol );
+		return this;
+	}
+
+	public URLDef host(String host) {
+		addParameter( "host", host );
+		return this;
+	}
+
+	public URLDef port(int port) {
+		addParameter( "port", port );
+		return this;
+	}
+}
\ No newline at end of file


Property changes on: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/URLDef.java
___________________________________________________________________
Name: svn:keywords
   + Id

Copied: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/package.html (from rev 19596, validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/package.html)
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/package.html	                        (rev 0)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/defs/package.html	2010-05-25 18:21:27 UTC (rev 19606)
@@ -0,0 +1,24 @@
+<!--
+  ~ JBoss, Home of Professional Open Source
+  ~ Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
+  ~ by the @authors tag. See the copyright.txt in the distribution for a
+  ~ full listing of individual contributors.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<head>
+</head>
+<body>
+Helper classes for programmatic constraint definition API.
+</body>
+</html>

Modified: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/package.html
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/package.html	2010-05-25 16:52:25 UTC (rev 19605)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/cfg/package.html	2010-05-25 18:21:27 UTC (rev 19606)
@@ -1,5 +1,5 @@
 <!--
-  ~ $Id:$
+  ~ $Id$
   ~
   ~ JBoss, Home of Professional Open Source
   ~ Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual contributors
@@ -21,6 +21,6 @@
 <head>
 </head>
 <body>
-Programmatic constraint definition API with required helper classes.
+Programmatic constraint definition API.
 </body>
 </html>

Modified: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/engine/ValidatorFactoryImpl.java
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/engine/ValidatorFactoryImpl.java	2010-05-25 16:52:25 UTC (rev 19605)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/engine/ValidatorFactoryImpl.java	2010-05-25 18:21:27 UTC (rev 19606)
@@ -34,8 +34,8 @@
 import javax.validation.ValidatorFactory;
 import javax.validation.spi.ConfigurationState;
 
-import org.hibernate.validator.cfg.CascadeDefinition;
-import org.hibernate.validator.cfg.ConstraintDefinition;
+import org.hibernate.validator.cfg.CascadeDef;
+import org.hibernate.validator.cfg.ConstraintDef;
 import org.hibernate.validator.cfg.ConstraintMapping;
 import org.hibernate.validator.metadata.AnnotationIgnores;
 import org.hibernate.validator.metadata.BeanMetaDataCache;
@@ -228,10 +228,10 @@
 	}
 
 	@SuppressWarnings("unchecked")
-	private <T, A extends Annotation> void addProgrammaticConfiguredConstraints(List<ConstraintDefinition<?>> definitions,
+	private <T, A extends Annotation> void addProgrammaticConfiguredConstraints(List<ConstraintDef<?>> definitions,
 																				Class<T> rootClass, Class<?> hierarchyClass,
 																				Map<Class<?>, List<MetaConstraint<T, ?>>> constraints) {
-		for ( ConstraintDefinition<?> config : definitions ) {
+		for ( ConstraintDef<?> config : definitions ) {
 			A annotation = ( A ) createAnnotationProxy( config );
 			ConstraintOrigin definedIn = definedIn( rootClass, hierarchyClass );
 			ConstraintDescriptorImpl<A> constraintDescriptor = new ConstraintDescriptorImpl<A>(
@@ -269,12 +269,12 @@
 		}
 	}
 
-	private void addProgrammaticConfiguredCascade(List<CascadeDefinition> cascades,
+	private void addProgrammaticConfiguredCascade(List<CascadeDef> cascades,
 												  List<Member> cascadedMembers) {
 		if ( cascades == null ) {
 			return;
 		}
-		for ( CascadeDefinition cascade : cascades ) {
+		for ( CascadeDef cascade : cascades ) {
 			Member m = ReflectionHelper.getMember(
 					cascade.getBeanType(), cascade.getProperty(), cascade.getElementType()
 			);
@@ -299,7 +299,7 @@
 	}
 
 	@SuppressWarnings("unchecked")
-	private <A extends Annotation> Annotation createAnnotationProxy(ConstraintDefinition<?> config) {
+	private <A extends Annotation> Annotation createAnnotationProxy(ConstraintDef<?> config) {
 		Class<A> constraintType = ( Class<A> ) config.getConstraintType();
 		AnnotationDescriptor<A> annotationDescriptor = new AnnotationDescriptor<A>( constraintType );
 		for ( Map.Entry<String, Object> parameter : config.getParameters().entrySet() ) {

Modified: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/util/privilegedactions/LoadClass.java
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/util/privilegedactions/LoadClass.java	2010-05-25 16:52:25 UTC (rev 19605)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/util/privilegedactions/LoadClass.java	2010-05-25 18:21:27 UTC (rev 19606)
@@ -43,14 +43,17 @@
 				return contextClassLoader.loadClass( className );
 			}
 		}
-		catch ( Throwable e ) {
+		catch ( ClassNotFoundException e ) {
+			// ignore - try using the classloader of the caller first
+		}
+		catch ( RuntimeException e ) {
 			// ignore
 		}
 		try {
 			return Class.forName( className, true, caller.getClassLoader() );
 		}
 		catch ( ClassNotFoundException e ) {
-			throw new ValidationException("Unable to load class: " + className, e);
+			throw new ValidationException( "Unable to load class: " + className, e );
 		}
 	}
 }

Modified: validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/test/cfg/ConstraintMappingTest.java
===================================================================
--- validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/test/cfg/ConstraintMappingTest.java	2010-05-25 16:52:25 UTC (rev 19605)
+++ validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/test/cfg/ConstraintMappingTest.java	2010-05-25 18:21:27 UTC (rev 19606)
@@ -30,12 +30,13 @@
 
 import org.hibernate.validator.HibernateValidator;
 import org.hibernate.validator.HibernateValidatorConfiguration;
-import org.hibernate.validator.cfg.AssertTrueDefinition;
+import org.hibernate.validator.cfg.defs.AssertTrueDef;
 import org.hibernate.validator.cfg.ConstraintMapping;
-import org.hibernate.validator.cfg.FutureDefinition;
-import org.hibernate.validator.cfg.MinDefinition;
-import org.hibernate.validator.cfg.NotEmptyDefinition;
-import org.hibernate.validator.cfg.NotNullDefinition;
+import org.hibernate.validator.cfg.defs.FutureDef;
+import org.hibernate.validator.cfg.defs.MinDef;
+import org.hibernate.validator.cfg.defs.NotEmptyDef;
+import org.hibernate.validator.cfg.defs.NotNullDef;
+import org.hibernate.validator.cfg.defs.SizeDef;
 import org.hibernate.validator.test.util.TestUtil;
 import org.hibernate.validator.util.LoggerFactory;
 
@@ -57,9 +58,9 @@
 		ConstraintMapping mapping = new ConstraintMapping();
 		mapping.type( Marathon.class )
 				.property( "name", METHOD )
-					.constraint( NotNullDefinition.class )
+					.constraint( NotNullDef.class )
 				.property( "numberOfRunners", FIELD )
-					.constraint( MinDefinition.class ).value( 1 );
+					.constraint( MinDef.class ).value( 1 );
 
 		assertTrue( mapping.getConstraintConfig().containsKey( Marathon.class ) );
 		assertTrue( mapping.getConstraintConfig().get( Marathon.class ).size() == 2 );
@@ -82,7 +83,7 @@
 		ConstraintMapping mapping = new ConstraintMapping();
 		mapping.type( Marathon.class )
 				.property( "name", METHOD )
-					.constraint( NotNullDefinition.class );
+					.constraint( NotNullDef.class );
 
 		config.addMapping( mapping );
 
@@ -102,10 +103,10 @@
 		mapping
 			.type( Marathon.class )
 				.property( "name", METHOD )
-					.constraint( NotNullDefinition.class )
+					.constraint( NotNullDef.class )
 			.type( Tournament.class )
 				.property( "tournamentDate", METHOD )
-					.constraint( FutureDefinition.class );
+					.constraint( FutureDef.class );
 
 		config.addMapping( mapping );
 
@@ -132,7 +133,7 @@
 					.valid( "runners", METHOD )
 				.type( Runner.class )
 					.property( "paidEntryFee", FIELD )
-						.constraint( AssertTrueDefinition.class );
+						.constraint( AssertTrueDef.class );
 
 		config.addMapping( mapping );
 
@@ -158,7 +159,7 @@
 			mapping
 				.type( Marathon.class )
 					.property( "numberOfRunners", METHOD )
-						.constraint( NotNullDefinition.class );
+						.constraint( NotNullDef.class );
 			fail();
 		}
 		catch ( ValidationException e ) {
@@ -175,9 +176,9 @@
 			.type( Marathon.class )
 				.defaultGroupSequence( Foo.class, Marathon.class )
 				.property( "name", METHOD )
-					.constraint( NotNullDefinition.class ).groups( Foo.class )
+					.constraint( NotNullDef.class ).groups( Foo.class )
 				.property( "runners", METHOD )
-					.constraint( NotEmptyDefinition.class );
+					.constraint( NotEmptyDef.class );
 
 		config.addMapping( mapping );
 
@@ -196,6 +197,36 @@
 		assertConstraintViolation( violations.iterator().next(), "may not be empty" );
 	}
 
+		@Test
+	public void testMultipleConstraintOfTheSameType() {
+		HibernateValidatorConfiguration config = TestUtil.getConfiguration( HibernateValidator.class );
+
+		ConstraintMapping mapping = new ConstraintMapping();
+		mapping.type( Marathon.class )
+				.property( "name", METHOD )
+					.constraint( SizeDef.class ).min( 5 )
+					.constraint( SizeDef.class ).min( 10 );
+
+		config.addMapping( mapping );
+
+		ValidatorFactory factory = config.buildValidatorFactory();
+		Validator validator = factory.getValidator();
+
+		Marathon marathon = new Marathon();
+		marathon.setName( "Foo" );
+
+		Set<ConstraintViolation<Marathon>> violations = validator.validate( marathon );
+		assertNumberOfViolations( violations, 2 );
+
+		marathon.setName( "Foobar" );
+		violations = validator.validate( marathon );
+		assertNumberOfViolations( violations, 1 );
+
+		marathon.setName( "Stockholm Marathon" );
+		violations = validator.validate( marathon );
+		assertNumberOfViolations( violations, 0 );
+	}
+
 	public interface Foo {
 	}
 }



More information about the hibernate-commits mailing list