Revert "HHH-13950 Apply the mass replace script to switch to Jakarta Validation API"
This reverts commit 60abc8aa76
.
This commit is contained in:
parent
01d3485970
commit
3bc33221f0
|
@ -385,8 +385,8 @@ Unless specified, the JDBC Driver uses the default JVM time zone. If a different
|
|||
This setting applies to Oracle Dialect only, and it specifies whether `byte[]` or `Byte[]` arrays should be mapped to the deprecated `LONG RAW` (when this configuration property value is `true`) or to a `BLOB` column type (when this configuration property value is `false`).
|
||||
|
||||
==== Bean Validation options
|
||||
`*javax.persistence.validation.factory*` (e.g. `jakarta.validation.ValidationFactory` implementation)::
|
||||
Specify the `jakarta.validation.ValidationFactory` implementation to use for Bean Validation.
|
||||
`*javax.persistence.validation.factory*` (e.g. `javax.validation.ValidationFactory` implementation)::
|
||||
Specify the `javax.validation.ValidationFactory` implementation to use for Bean Validation.
|
||||
|
||||
`*hibernate.check_nullability*` (e.g. `true` or `false`)::
|
||||
Enable nullability checking. Raises an exception if a property marked as not-null is null.
|
||||
|
|
|
@ -143,11 +143,11 @@ jar {
|
|||
'javax.security.auth;resolution:=optional',
|
||||
// Make javax.security.jacc optional and do not reference a version range (because that's what we used to do)
|
||||
'javax.security.jacc;resolution:=optional;version=!',
|
||||
// Make jakarta.validation optional and do not reference a version range (because that's what we used to do)
|
||||
'jakarta.validation;resolution:=optional;version=!',
|
||||
'jakarta.validation.constraints;resolution:=optional;version=!',
|
||||
'jakarta.validation.groups;resolution:=optional;version=!',
|
||||
'jakarta.validation.metadata;resolution:=optional;version=!',
|
||||
// Make javax.validation optional and do not reference a version range (because that's what we used to do)
|
||||
'javax.validation;resolution:=optional;version=!',
|
||||
'javax.validation.constraints;resolution:=optional;version=!',
|
||||
'javax.validation.groups;resolution:=optional;version=!',
|
||||
'javax.validation.metadata;resolution:=optional;version=!',
|
||||
// Make javax.enterprise optional and do not reference a version range (because that's what we used to do)
|
||||
'!javax.enterprise*',
|
||||
'javax.enterprise.context.spi;resolution:=optional;version=!',
|
||||
|
|
|
@ -10,12 +10,12 @@ import java.util.HashSet;
|
|||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import jakarta.validation.ConstraintViolation;
|
||||
import jakarta.validation.ConstraintViolationException;
|
||||
import jakarta.validation.TraversableResolver;
|
||||
import jakarta.validation.Validation;
|
||||
import jakarta.validation.Validator;
|
||||
import jakarta.validation.ValidatorFactory;
|
||||
import javax.validation.ConstraintViolation;
|
||||
import javax.validation.ConstraintViolationException;
|
||||
import javax.validation.TraversableResolver;
|
||||
import javax.validation.Validation;
|
||||
import javax.validation.Validator;
|
||||
import javax.validation.ValidatorFactory;
|
||||
|
||||
import org.hibernate.EntityMode;
|
||||
import org.hibernate.boot.internal.ClassLoaderAccessImpl;
|
||||
|
|
|
@ -32,7 +32,7 @@ public class BeanValidationIntegrator implements Integrator {
|
|||
|
||||
public static final String APPLY_CONSTRAINTS = "hibernate.validator.apply_to_ddl";
|
||||
|
||||
public static final String BV_CHECK_CLASS = "jakarta.validation.Validation";
|
||||
public static final String BV_CHECK_CLASS = "javax.validation.Validation";
|
||||
|
||||
public static final String MODE_PROPERTY = "javax.persistence.validation.mode";
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ import java.util.ArrayList;
|
|||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import jakarta.validation.groups.Default;
|
||||
import javax.validation.groups.Default;
|
||||
|
||||
import org.hibernate.HibernateException;
|
||||
import org.hibernate.boot.registry.classloading.spi.ClassLoadingException;
|
||||
|
|
|
@ -9,8 +9,8 @@ import java.lang.annotation.ElementType;
|
|||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import jakarta.validation.Path;
|
||||
import jakarta.validation.TraversableResolver;
|
||||
import javax.validation.Path;
|
||||
import javax.validation.TraversableResolver;
|
||||
|
||||
import org.hibernate.Hibernate;
|
||||
import org.hibernate.annotations.common.AssertionFailure;
|
||||
|
|
|
@ -15,16 +15,16 @@ import java.util.Locale;
|
|||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.StringTokenizer;
|
||||
import jakarta.validation.Validation;
|
||||
import jakarta.validation.ValidatorFactory;
|
||||
import jakarta.validation.constraints.Digits;
|
||||
import jakarta.validation.constraints.Max;
|
||||
import jakarta.validation.constraints.Min;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import jakarta.validation.metadata.BeanDescriptor;
|
||||
import jakarta.validation.metadata.ConstraintDescriptor;
|
||||
import jakarta.validation.metadata.PropertyDescriptor;
|
||||
import javax.validation.Validation;
|
||||
import javax.validation.ValidatorFactory;
|
||||
import javax.validation.constraints.Digits;
|
||||
import javax.validation.constraints.Max;
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
import javax.validation.metadata.BeanDescriptor;
|
||||
import javax.validation.metadata.ConstraintDescriptor;
|
||||
import javax.validation.metadata.PropertyDescriptor;
|
||||
|
||||
import org.hibernate.AssertionFailure;
|
||||
import org.hibernate.MappingException;
|
||||
|
|
|
@ -10,7 +10,7 @@ import java.math.BigDecimal;
|
|||
import java.util.Map;
|
||||
import javax.persistence.EntityManager;
|
||||
import javax.persistence.RollbackException;
|
||||
import jakarta.validation.ConstraintViolationException;
|
||||
import javax.validation.ConstraintViolationException;
|
||||
|
||||
import org.hibernate.cfg.AvailableSettings;
|
||||
import org.hibernate.cfg.beanvalidation.ValidationMode;
|
||||
|
|
|
@ -10,8 +10,8 @@ import java.math.BigDecimal;
|
|||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.Id;
|
||||
import jakarta.validation.constraints.Max;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Max;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @author Emmanuel Bernard
|
||||
|
|
|
@ -9,9 +9,9 @@ package org.hibernate.jpa.test.beanvalidation;
|
|||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.Target;
|
||||
import jakarta.validation.Constraint;
|
||||
import jakarta.validation.Payload;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import javax.validation.Constraint;
|
||||
import javax.validation.Payload;
|
||||
import javax.validation.constraints.Size;
|
||||
|
||||
import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
|
||||
import static java.lang.annotation.ElementType.FIELD;
|
||||
|
|
|
@ -10,8 +10,8 @@ import java.net.URL;
|
|||
import java.util.Collections;
|
||||
|
||||
import javax.persistence.EntityManagerFactory;
|
||||
import jakarta.validation.Validation;
|
||||
import jakarta.validation.ValidatorFactory;
|
||||
import javax.validation.Validation;
|
||||
import javax.validation.ValidatorFactory;
|
||||
|
||||
import org.hibernate.jpa.AvailableSettings;
|
||||
import org.hibernate.jpa.HibernatePersistenceProvider;
|
||||
|
|
|
@ -14,8 +14,8 @@ import javax.persistence.Id;
|
|||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.Query;
|
||||
import javax.persistence.Table;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
|
||||
import org.hibernate.Session;
|
||||
import org.hibernate.dialect.PostgreSQL82Dialect;
|
||||
|
|
|
@ -9,12 +9,12 @@ package org.hibernate.test.annotations.beanvalidation;
|
|||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Transient;
|
||||
import jakarta.validation.constraints.AssertTrue;
|
||||
import jakarta.validation.constraints.Max;
|
||||
import jakarta.validation.constraints.Min;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Pattern;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import javax.validation.constraints.AssertTrue;
|
||||
import javax.validation.constraints.Max;
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Pattern;
|
||||
import javax.validation.constraints.Size;
|
||||
|
||||
@Entity
|
||||
public class Address {
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
package org.hibernate.test.annotations.beanvalidation;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import jakarta.validation.ConstraintViolationException;
|
||||
import javax.validation.ConstraintViolationException;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ package org.hibernate.test.annotations.beanvalidation;
|
|||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Map;
|
||||
import jakarta.validation.ConstraintViolationException;
|
||||
import javax.validation.ConstraintViolationException;
|
||||
|
||||
import org.hibernate.Session;
|
||||
import org.hibernate.Transaction;
|
||||
|
|
|
@ -8,9 +8,9 @@ package org.hibernate.test.annotations.beanvalidation;
|
|||
|
||||
import java.lang.annotation.Annotation;
|
||||
import java.math.BigDecimal;
|
||||
import jakarta.validation.ConstraintViolationException;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.groups.Default;
|
||||
import javax.validation.ConstraintViolationException;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.groups.Default;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
|
|
|
@ -8,10 +8,10 @@ package org.hibernate.test.annotations.beanvalidation;
|
|||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Locale;
|
||||
import jakarta.validation.ConstraintViolationException;
|
||||
import jakarta.validation.MessageInterpolator;
|
||||
import jakarta.validation.Validation;
|
||||
import jakarta.validation.ValidatorFactory;
|
||||
import javax.validation.ConstraintViolationException;
|
||||
import javax.validation.MessageInterpolator;
|
||||
import javax.validation.Validation;
|
||||
import javax.validation.ValidatorFactory;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
|
@ -66,7 +66,7 @@ public class BeanValidationProvidedFactoryTest extends BaseCoreFunctionalTestCas
|
|||
return interpolate( s, context );
|
||||
}
|
||||
};
|
||||
final jakarta.validation.Configuration<?> configuration = Validation.byDefaultProvider().configure();
|
||||
final javax.validation.Configuration<?> configuration = Validation.byDefaultProvider().configure();
|
||||
configuration.messageInterpolator( messageInterpolator );
|
||||
ValidatorFactory vf = configuration.buildValidatorFactory();
|
||||
cfg.getProperties().put( "javax.persistence.validation.factory", vf );
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
package org.hibernate.test.annotations.beanvalidation;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Embeddable;
|
||||
import jakarta.validation.constraints.Max;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Max;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @author Emmanuel Bernard
|
||||
|
|
|
@ -9,7 +9,7 @@ package org.hibernate.test.annotations.beanvalidation;
|
|||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.Id;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @author Emmanuel Bernard
|
||||
|
|
|
@ -10,8 +10,8 @@ import java.math.BigDecimal;
|
|||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.Id;
|
||||
import jakarta.validation.constraints.Max;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Max;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @author Emmanuel Bernard
|
||||
|
|
|
@ -12,7 +12,7 @@ import javax.persistence.Entity;
|
|||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.PersistenceException;
|
||||
import jakarta.validation.ConstraintViolationException;
|
||||
import javax.validation.ConstraintViolationException;
|
||||
|
||||
import org.hibernate.Session;
|
||||
import org.hibernate.Transaction;
|
||||
|
|
|
@ -9,7 +9,7 @@ package org.hibernate.test.annotations.beanvalidation;
|
|||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.Id;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @author Emmanuel Bernard
|
||||
|
|
|
@ -9,8 +9,8 @@ package org.hibernate.test.annotations.beanvalidation;
|
|||
import javax.persistence.CascadeType;
|
||||
import javax.persistence.Embeddable;
|
||||
import javax.persistence.ManyToOne;
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.Min;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.Min;
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
package org.hibernate.test.annotations.beanvalidation;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import jakarta.validation.ConstraintViolation;
|
||||
import jakarta.validation.ConstraintViolationException;
|
||||
import javax.validation.ConstraintViolation;
|
||||
import javax.validation.ConstraintViolationException;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
|
|
|
@ -14,8 +14,8 @@ import javax.persistence.Id;
|
|||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.OneToMany;
|
||||
import javax.persistence.Table;
|
||||
import jakarta.validation.ConstraintViolationException;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import javax.validation.ConstraintViolationException;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
import org.hibernate.Session;
|
||||
import org.hibernate.Transaction;
|
||||
|
|
|
@ -16,8 +16,8 @@ import javax.persistence.Id;
|
|||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.OneToMany;
|
||||
import javax.persistence.Table;
|
||||
import jakarta.validation.ConstraintViolationException;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import javax.validation.ConstraintViolationException;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
|
|
|
@ -10,8 +10,8 @@ import javax.persistence.Entity;
|
|||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Column;
|
||||
import jakarta.validation.constraints.Max;
|
||||
import jakarta.validation.constraints.Min;
|
||||
import javax.validation.constraints.Max;
|
||||
import javax.validation.constraints.Min;
|
||||
|
||||
/**
|
||||
* @author Hardy Ferentschik
|
||||
|
|
|
@ -11,8 +11,8 @@ import javax.persistence.Column;
|
|||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.Id;
|
||||
import jakarta.validation.constraints.Max;
|
||||
import jakarta.validation.constraints.Min;
|
||||
import javax.validation.constraints.Max;
|
||||
import javax.validation.constraints.Min;
|
||||
|
||||
/**
|
||||
* @author Emmanuel Bernard
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
package org.hibernate.test.annotations.beanvalidation;
|
||||
import javax.persistence.Entity;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @author Emmanuel Bernard
|
||||
|
|
|
@ -15,8 +15,8 @@ import javax.persistence.GeneratedValue;
|
|||
import javax.persistence.Id;
|
||||
import javax.persistence.ManyToMany;
|
||||
import javax.persistence.ManyToOne;
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @author Emmanuel Bernard
|
||||
|
|
|
@ -13,11 +13,11 @@ import javax.persistence.Embeddable;
|
|||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Column;
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.Future;
|
||||
import jakarta.validation.constraints.Min;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.Future;
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ import javax.persistence.Entity;
|
|||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.ManyToOne;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @author Emmanuel Bernard
|
||||
|
|
|
@ -17,9 +17,9 @@ import javax.persistence.FetchType;
|
|||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
import javax.persistence.Version;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Pattern;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Pattern;
|
||||
import javax.validation.constraints.Size;
|
||||
|
||||
import org.hibernate.AnnotationException;
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ import javax.persistence.GenerationType;
|
|||
import javax.persistence.Id;
|
||||
import javax.persistence.OneToMany;
|
||||
import javax.persistence.OrderBy;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
import org.hibernate.annotations.Cascade;
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ import javax.persistence.GenerationType;
|
|||
import javax.persistence.Id;
|
||||
import javax.persistence.OneToMany;
|
||||
import javax.persistence.OrderBy;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
import org.hibernate.annotations.Cascade;
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ import javax.persistence.Entity;
|
|||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @author Peter Kotula
|
||||
|
|
|
@ -11,7 +11,7 @@ import javax.persistence.Entity;
|
|||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
import javax.persistence.UniqueConstraint;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:bernhardt.manuel@gmail.com">Manuel Bernhardt</a>
|
||||
|
|
|
@ -11,7 +11,7 @@ import javax.persistence.JoinColumn;
|
|||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.OneToMany;
|
||||
import javax.persistence.Table;
|
||||
import jakarta.validation.constraints.AssertTrue;
|
||||
import javax.validation.constraints.AssertTrue;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
|
|
|
@ -11,7 +11,7 @@ import javax.persistence.FetchType;
|
|||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.ManyToOne;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
import org.hibernate.annotations.Fetch;
|
||||
import org.hibernate.annotations.FetchMode;
|
||||
|
|
|
@ -16,7 +16,7 @@ import javax.persistence.OneToOne;
|
|||
import javax.persistence.criteria.CriteriaBuilder;
|
||||
import javax.persistence.criteria.CriteriaQuery;
|
||||
import javax.persistence.criteria.Root;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
import org.hibernate.jpa.test.BaseEntityManagerFunctionalTestCase;
|
||||
|
||||
|
|
Loading…
Reference in New Issue