diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/AnnotationBinder.java b/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/AnnotationBinder.java index 7adc497b8b..98ab6e4a37 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/AnnotationBinder.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/AnnotationBinder.java @@ -30,6 +30,9 @@ import org.jboss.jandex.Index; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.hibernate.metamodel.source.annotations.entity.ConfiguredClass; +import org.hibernate.metamodel.source.annotations.entity.ConfiguredClassHierarchy; +import org.hibernate.metamodel.source.annotations.entity.EntityBinder; import org.hibernate.metamodel.source.annotations.global.FetchProfileBinder; import org.hibernate.metamodel.source.annotations.global.TableBinder; import org.hibernate.metamodel.source.annotations.util.ConfiguredClassHierarchyBuilder; diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/ColumnValues.java b/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/ColumnValues.java similarity index 97% rename from hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/ColumnValues.java rename to hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/ColumnValues.java index 99b5c0f717..62fa322477 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/ColumnValues.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/ColumnValues.java @@ -21,12 +21,13 @@ * 51 Franklin Street, Fifth Floor * Boston, MA 02110-1301 USA */ -package org.hibernate.metamodel.source.annotations; +package org.hibernate.metamodel.source.annotations.entity; import org.jboss.jandex.AnnotationInstance; import org.jboss.jandex.AnnotationValue; import org.hibernate.AssertionFailure; +import org.hibernate.metamodel.source.annotations.JPADotNames; /** * Container for the properties defined by {@code @Column}. diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/ConfiguredClass.java b/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/ConfiguredClass.java similarity index 99% rename from hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/ConfiguredClass.java rename to hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/ConfiguredClass.java index 4c022f6376..0cca032de6 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/ConfiguredClass.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/ConfiguredClass.java @@ -21,7 +21,7 @@ * 51 Franklin Street, Fifth Floor * Boston, MA 02110-1301 USA */ -package org.hibernate.metamodel.source.annotations; +package org.hibernate.metamodel.source.annotations.entity; import java.lang.reflect.Field; import java.lang.reflect.Member; @@ -52,6 +52,7 @@ import org.hibernate.AssertionFailure; import org.hibernate.HibernateException; import org.hibernate.MappingException; import org.hibernate.metamodel.binding.InheritanceType; +import org.hibernate.metamodel.source.annotations.JPADotNames; import org.hibernate.metamodel.source.annotations.util.JandexHelper; import org.hibernate.metamodel.source.annotations.util.ReflectionHelper; import org.hibernate.service.ServiceRegistry; diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/ConfiguredClassHierarchy.java b/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/ConfiguredClassHierarchy.java similarity index 98% rename from hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/ConfiguredClassHierarchy.java rename to hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/ConfiguredClassHierarchy.java index c2e3630ee7..e4b1723620 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/ConfiguredClassHierarchy.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/ConfiguredClassHierarchy.java @@ -21,7 +21,7 @@ * 51 Franklin Street, Fifth Floor * Boston, MA 02110-1301 USA */ -package org.hibernate.metamodel.source.annotations; +package org.hibernate.metamodel.source.annotations.entity; import java.util.ArrayList; import java.util.Iterator; @@ -36,6 +36,7 @@ import org.jboss.jandex.MethodInfo; import org.hibernate.AnnotationException; import org.hibernate.metamodel.binding.InheritanceType; +import org.hibernate.metamodel.source.annotations.JPADotNames; import org.hibernate.metamodel.source.annotations.util.JandexHelper; import org.hibernate.metamodel.source.annotations.util.ReflectionHelper; import org.hibernate.service.ServiceRegistry; diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/ConfiguredClassType.java b/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/ConfiguredClassType.java similarity index 95% rename from hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/ConfiguredClassType.java rename to hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/ConfiguredClassType.java index 553646830b..cf7d0207ad 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/ConfiguredClassType.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/ConfiguredClassType.java @@ -21,7 +21,7 @@ * 51 Franklin Street, Fifth Floor * Boston, MA 02110-1301 USA */ -package org.hibernate.metamodel.source.annotations; +package org.hibernate.metamodel.source.annotations.entity; /** * @author Hardy Ferentschik diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/DiscriminatorColumnValues.java b/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/DiscriminatorColumnValues.java similarity index 95% rename from hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/DiscriminatorColumnValues.java rename to hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/DiscriminatorColumnValues.java index 0e9f40b66e..7ca84331a4 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/DiscriminatorColumnValues.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/DiscriminatorColumnValues.java @@ -21,7 +21,7 @@ * 51 Franklin Street, Fifth Floor * Boston, MA 02110-1301 USA */ -package org.hibernate.metamodel.source.annotations; +package org.hibernate.metamodel.source.annotations.entity; import java.util.List; import java.util.Map; @@ -29,6 +29,8 @@ import java.util.Map; import org.jboss.jandex.AnnotationInstance; import org.jboss.jandex.DotName; +import org.hibernate.metamodel.source.annotations.HibernateDotNames; +import org.hibernate.metamodel.source.annotations.JPADotNames; import org.hibernate.metamodel.source.annotations.util.JandexHelper; /** diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/EntityBinder.java b/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/EntityBinder.java similarity index 90% rename from hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/EntityBinder.java rename to hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/EntityBinder.java index 8aa175d999..85b5c88b70 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/EntityBinder.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/EntityBinder.java @@ -21,7 +21,7 @@ * 51 Franklin Street, Fifth Floor * Boston, MA 02110-1301 USA */ -package org.hibernate.metamodel.source.annotations; +package org.hibernate.metamodel.source.annotations.entity; import org.jboss.jandex.AnnotationInstance; import org.jboss.jandex.AnnotationValue; @@ -37,14 +37,17 @@ import org.hibernate.internal.util.StringHelper; import org.hibernate.metamodel.binding.Caching; import org.hibernate.metamodel.binding.EntityBinding; import org.hibernate.metamodel.binding.SimpleAttributeBinding; +import org.hibernate.metamodel.binding.state.SimpleAttributeBindingState; import org.hibernate.metamodel.domain.Entity; import org.hibernate.metamodel.domain.Hierarchical; import org.hibernate.metamodel.relational.Identifier; import org.hibernate.metamodel.relational.Schema; -import org.hibernate.metamodel.source.annotations.state.binding.AnnotationsAttributeBindingState; -import org.hibernate.metamodel.source.annotations.state.binding.AnnotationsDiscriminatorBindingState; -import org.hibernate.metamodel.source.annotations.state.relational.AttributeColumnRelationalState; -import org.hibernate.metamodel.source.annotations.state.relational.AttributeTupleRelationalState; +import org.hibernate.metamodel.source.annotations.HibernateDotNames; +import org.hibernate.metamodel.source.annotations.JPADotNames; +import org.hibernate.metamodel.source.annotations.entity.state.binding.AnnotationsAttributeBindingState; +import org.hibernate.metamodel.source.annotations.entity.state.binding.AnnotationsDiscriminatorBindingState; +import org.hibernate.metamodel.source.annotations.entity.state.relational.AttributeColumnRelationalState; +import org.hibernate.metamodel.source.annotations.entity.state.relational.AttributeTupleRelationalState; import org.hibernate.metamodel.source.annotations.util.JandexHelper; import org.hibernate.metamodel.source.internal.MetadataImpl; import org.hibernate.service.classloading.spi.ClassLoaderService; @@ -298,9 +301,10 @@ public class EntityBinder { MappedAttribute idAttribute = configuredClass.getMappedProperty( idName ); entityBinding.getEntity().getOrCreateSingularAttribute( idName ); - entityBinding.makeSimpleIdAttributeBinding( idName ) - .initialize( new AnnotationsAttributeBindingState( idAttribute ) ) - .initialize( new AttributeColumnRelationalState( idAttribute, meta ) ); + + SimpleAttributeBinding attributeBinding = entityBinding.makeSimpleIdAttributeBinding( idName ); + attributeBinding.initialize( new AnnotationsAttributeBindingState( idAttribute ) ); + attributeBinding.initialize( new AttributeColumnRelationalState( idAttribute, meta ) ); } private void bindAttributes(EntityBinding entityBinding) { @@ -317,18 +321,21 @@ public class EntityBinder { String attributeName = mappedAttribute.getName(); entityBinding.getEntity().getOrCreateSingularAttribute( attributeName ); SimpleAttributeBinding attributeBinding; + SimpleAttributeBindingState bindingState; if ( mappedAttribute.isDiscriminator() ) { - attributeBinding = entityBinding.makeEntityDiscriminator( attributeName ) - .initialize( new AnnotationsDiscriminatorBindingState( mappedAttribute ) ) - .getValueBinding(); + attributeBinding = entityBinding.makeEntityDiscriminator( attributeName ).getValueBinding(); + bindingState = new AnnotationsDiscriminatorBindingState( mappedAttribute ); + } + else if ( mappedAttribute.isVersioned() ) { + attributeBinding = entityBinding.makeVersionBinding( attributeName ); + bindingState = new AnnotationsAttributeBindingState( mappedAttribute ); } else { - attributeBinding = mappedAttribute.isVersioned() ? - entityBinding.makeVersionBinding( attributeName ) : - entityBinding.makeSimpleAttributeBinding( attributeName ); - attributeBinding.initialize( new AnnotationsAttributeBindingState( mappedAttribute ) ); + attributeBinding = entityBinding.makeSimpleAttributeBinding( attributeName ); + bindingState = new AnnotationsAttributeBindingState( mappedAttribute ); } + attributeBinding.initialize( bindingState ); if ( configuredClass.hasOwnTable() ) { AttributeColumnRelationalState columnRelationsState = new AttributeColumnRelationalState( @@ -336,6 +343,7 @@ public class EntityBinder { ); AttributeTupleRelationalState relationalState = new AttributeTupleRelationalState(); relationalState.addValueState( columnRelationsState ); + // TODO: if this really just binds a column, then it can be changed to // attributeBinding.initialize( columnRelationsState ); attributeBinding.initialize( relationalState ); diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/IdType.java b/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/IdType.java similarity index 95% rename from hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/IdType.java rename to hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/IdType.java index edd72e0d12..164e756af7 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/IdType.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/IdType.java @@ -21,7 +21,7 @@ * 51 Franklin Street, Fifth Floor * Boston, MA 02110-1301 USA */ -package org.hibernate.metamodel.source.annotations; +package org.hibernate.metamodel.source.annotations.entity; /** * An emum for the type of id configuration for an entity. diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/MappedAttribute.java b/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/MappedAttribute.java similarity index 96% rename from hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/MappedAttribute.java rename to hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/MappedAttribute.java index b873512617..57552efcda 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/MappedAttribute.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/MappedAttribute.java @@ -21,7 +21,7 @@ * 51 Franklin Street, Fifth Floor * Boston, MA 02110-1301 USA */ -package org.hibernate.metamodel.source.annotations; +package org.hibernate.metamodel.source.annotations.entity; import java.util.List; import java.util.Map; @@ -32,9 +32,10 @@ import org.jboss.jandex.DotName; import org.hibernate.AnnotationException; import org.hibernate.AssertionFailure; +import org.hibernate.metamodel.source.annotations.HibernateDotNames; +import org.hibernate.metamodel.source.annotations.JPADotNames; import org.hibernate.metamodel.source.annotations.util.JandexHelper; - /** * Represent a mapped attribute (explicitly or implicitly mapped). Also used for synthetic attributes likes a * discriminator column. diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/package-info.java b/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/package-info.java new file mode 100644 index 0000000000..3bdf584ff3 --- /dev/null +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/package-info.java @@ -0,0 +1,30 @@ +/* + * Hibernate, Relational Persistence for Idiomatic Java + * + * Copyright (c) 2011, Red Hat Inc. or third-party contributors as + * indicated by the @author tags or express copyright attribution + * statements applied by the authors. All third-party contributions are + * distributed under license by Red Hat Inc. + * + * This copyrighted material is made available to anyone wishing to use, modify, + * copy, or redistribute it subject to the terms and conditions of the GNU + * Lesser General Public License, as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License + * for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this distribution; if not, write to: + * Free Software Foundation, Inc. + * 51 Franklin Street, Fifth Floor + * Boston, MA 02110-1301 USA + */ +package org.hibernate.metamodel.source.annotations.entity; + +/** + * This package contains binding code for entities. In particular it contains classes like {@code ConfiguredClass} and + * {@code MappedAttribute} which are populated from annotations to make it easier to bind to the Hibernate metamodel. + * The configured classes (entities) are also ordered in a ways that they can be bound in the right order. + */ \ No newline at end of file diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/state/binding/AnnotationsAttributeBindingState.java b/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/state/binding/AnnotationsAttributeBindingState.java similarity index 96% rename from hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/state/binding/AnnotationsAttributeBindingState.java rename to hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/state/binding/AnnotationsAttributeBindingState.java index fa2b657158..453f4708cb 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/state/binding/AnnotationsAttributeBindingState.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/state/binding/AnnotationsAttributeBindingState.java @@ -21,7 +21,7 @@ * 51 Franklin Street, Fifth Floor * Boston, MA 02110-1301 USA */ -package org.hibernate.metamodel.source.annotations.state.binding; +package org.hibernate.metamodel.source.annotations.entity.state.binding; import java.util.Map; import java.util.Properties; @@ -29,7 +29,7 @@ import java.util.Properties; import org.hibernate.mapping.PropertyGeneration; import org.hibernate.metamodel.binding.state.SimpleAttributeBindingState; import org.hibernate.metamodel.domain.MetaAttribute; -import org.hibernate.metamodel.source.annotations.MappedAttribute; +import org.hibernate.metamodel.source.annotations.entity.MappedAttribute; /** * @author Hardy Ferentschik diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/state/binding/AnnotationsDiscriminatorBindingState.java b/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/state/binding/AnnotationsDiscriminatorBindingState.java similarity index 85% rename from hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/state/binding/AnnotationsDiscriminatorBindingState.java rename to hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/state/binding/AnnotationsDiscriminatorBindingState.java index 2764c1e643..ccf578f2df 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/state/binding/AnnotationsDiscriminatorBindingState.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/state/binding/AnnotationsDiscriminatorBindingState.java @@ -21,21 +21,22 @@ * 51 Franklin Street, Fifth Floor * Boston, MA 02110-1301 USA */ -package org.hibernate.metamodel.source.annotations.state.binding; +package org.hibernate.metamodel.source.annotations.entity.state.binding; -import org.hibernate.metamodel.source.annotations.DiscriminatorColumnValues; -import org.hibernate.metamodel.source.annotations.MappedAttribute; import org.hibernate.metamodel.binding.state.DiscriminatorBindingState; +import org.hibernate.metamodel.source.annotations.entity.DiscriminatorColumnValues; +import org.hibernate.metamodel.source.annotations.entity.MappedAttribute; /** * @author Gail Badner * - * TODO: extract a superclass that sets defaults for other stuff + * TODO: extract a superclass that sets defaults for other stuff */ public class AnnotationsDiscriminatorBindingState extends AnnotationsAttributeBindingState implements DiscriminatorBindingState { private final boolean isForced; private final boolean isInserted; + public AnnotationsDiscriminatorBindingState(MappedAttribute mappedAttribute) { super( mappedAttribute ); DiscriminatorColumnValues columnValues = DiscriminatorColumnValues.class.cast( mappedAttribute.getColumnValues() ); diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/state/relational/AttributeColumnRelationalState.java b/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/state/relational/AttributeColumnRelationalState.java similarity index 96% rename from hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/state/relational/AttributeColumnRelationalState.java rename to hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/state/relational/AttributeColumnRelationalState.java index 4e0c5dcf4f..c513142c9a 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/state/relational/AttributeColumnRelationalState.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/state/relational/AttributeColumnRelationalState.java @@ -21,7 +21,7 @@ * 51 Franklin Street, Fifth Floor * Boston, MA 02110-1301 USA */ -package org.hibernate.metamodel.source.annotations.state.relational; +package org.hibernate.metamodel.source.annotations.entity.state.relational; import java.util.ArrayList; import java.util.Arrays; @@ -35,9 +35,9 @@ import org.hibernate.AnnotationException; import org.hibernate.cfg.NamingStrategy; import org.hibernate.metamodel.relational.Size; import org.hibernate.metamodel.relational.state.ColumnRelationalState; -import org.hibernate.metamodel.source.annotations.ColumnValues; import org.hibernate.metamodel.source.annotations.HibernateDotNames; -import org.hibernate.metamodel.source.annotations.MappedAttribute; +import org.hibernate.metamodel.source.annotations.entity.ColumnValues; +import org.hibernate.metamodel.source.annotations.entity.MappedAttribute; import org.hibernate.metamodel.source.internal.MetadataImpl; /** diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/state/relational/AttributeTupleRelationalState.java b/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/state/relational/AttributeTupleRelationalState.java similarity index 95% rename from hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/state/relational/AttributeTupleRelationalState.java rename to hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/state/relational/AttributeTupleRelationalState.java index e81a915f94..87af3b9634 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/state/relational/AttributeTupleRelationalState.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/state/relational/AttributeTupleRelationalState.java @@ -21,7 +21,7 @@ * 51 Franklin Street, Fifth Floor * Boston, MA 02110-1301 USA */ -package org.hibernate.metamodel.source.annotations.state.relational; +package org.hibernate.metamodel.source.annotations.entity.state.relational; import java.util.ArrayList; import java.util.List; diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/package-info.java b/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/package-info.java index 15b17fa268..b8cb2f04a7 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/package-info.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/package-info.java @@ -24,5 +24,5 @@ package org.hibernate.metamodel.source.annotations; /** - * This package contains the core binding code for binding annotation based configuration to the Hibernate metadata model. + * This package contains the binding code for binding annotation based configuration to the Hibernate metamodel. */ \ No newline at end of file diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/util/ConfiguredClassHierarchyBuilder.java b/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/util/ConfiguredClassHierarchyBuilder.java index d227b8bb56..41d07be3cd 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/util/ConfiguredClassHierarchyBuilder.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/util/ConfiguredClassHierarchyBuilder.java @@ -36,8 +36,9 @@ import org.jboss.jandex.DotName; import org.jboss.jandex.Index; import org.hibernate.AnnotationException; -import org.hibernate.metamodel.source.annotations.ConfiguredClassHierarchy; +import org.hibernate.metamodel.source.annotations.entity.ConfiguredClassHierarchy; import org.hibernate.metamodel.source.annotations.JPADotNames; +import org.hibernate.metamodel.source.annotations.entity.ConfiguredClassHierarchy; import org.hibernate.service.ServiceRegistry; import org.hibernate.service.classloading.spi.ClassLoaderService; diff --git a/hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/CacheBindingTests.java b/hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/entity/CacheBindingTests.java similarity index 98% rename from hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/CacheBindingTests.java rename to hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/entity/CacheBindingTests.java index b35f23a53e..db9c06d56c 100644 --- a/hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/CacheBindingTests.java +++ b/hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/entity/CacheBindingTests.java @@ -21,7 +21,7 @@ * 51 Franklin Street, Fifth Floor * Boston, MA 02110-1301 USA */ -package org.hibernate.metamodel.source.annotations; +package org.hibernate.metamodel.source.annotations.entity; import javax.persistence.Cacheable; import javax.persistence.Entity; diff --git a/hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/InheritanceTypeTest.java b/hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/entity/InheritanceTypeTest.java similarity index 97% rename from hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/InheritanceTypeTest.java rename to hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/entity/InheritanceTypeTest.java index 90ec00efd4..ace6963078 100644 --- a/hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/InheritanceTypeTest.java +++ b/hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/entity/InheritanceTypeTest.java @@ -21,7 +21,7 @@ * 51 Franklin Street, Fifth Floor * Boston, MA 02110-1301 USA */ -package org.hibernate.metamodel.source.annotations; +package org.hibernate.metamodel.source.annotations.entity; import javax.persistence.Entity; import javax.persistence.GeneratedValue; diff --git a/hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/RootOfSingleTableInheritance.java b/hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/entity/RootOfSingleTableInheritance.java similarity index 95% rename from hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/RootOfSingleTableInheritance.java rename to hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/entity/RootOfSingleTableInheritance.java index ef78455cd6..a16b0beb2b 100644 --- a/hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/RootOfSingleTableInheritance.java +++ b/hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/entity/RootOfSingleTableInheritance.java @@ -21,7 +21,7 @@ * 51 Franklin Street, Fifth Floor * Boston, MA 02110-1301 USA */ -package org.hibernate.metamodel.source.annotations; +package org.hibernate.metamodel.source.annotations.entity; import javax.persistence.Entity; import javax.persistence.GeneratedValue; diff --git a/hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/SubclassOfSingleTableInheritance.java b/hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/entity/SubclassOfSingleTableInheritance.java similarity index 95% rename from hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/SubclassOfSingleTableInheritance.java rename to hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/entity/SubclassOfSingleTableInheritance.java index e7a76529ef..6cc033e95e 100644 --- a/hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/SubclassOfSingleTableInheritance.java +++ b/hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/entity/SubclassOfSingleTableInheritance.java @@ -21,7 +21,7 @@ * 51 Franklin Street, Fifth Floor * Boston, MA 02110-1301 USA */ -package org.hibernate.metamodel.source.annotations; +package org.hibernate.metamodel.source.annotations.entity; import javax.persistence.DiscriminatorValue; import javax.persistence.Entity; diff --git a/hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/TableNameTest.java b/hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/entity/TableNameTest.java similarity index 97% rename from hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/TableNameTest.java rename to hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/entity/TableNameTest.java index 9544412ac2..feafbc5f4c 100644 --- a/hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/TableNameTest.java +++ b/hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/entity/TableNameTest.java @@ -21,7 +21,7 @@ * 51 Franklin Street, Fifth Floor * Boston, MA 02110-1301 USA */ -package org.hibernate.metamodel.source.annotations; +package org.hibernate.metamodel.source.annotations.entity; import java.util.Iterator; import java.util.Set; @@ -40,6 +40,8 @@ import org.junit.Before; import org.junit.Test; import org.hibernate.metamodel.binding.InheritanceType; +import org.hibernate.metamodel.source.annotations.entity.ConfiguredClass; +import org.hibernate.metamodel.source.annotations.entity.ConfiguredClassHierarchy; import org.hibernate.metamodel.source.annotations.util.ConfiguredClassHierarchyBuilder; import org.hibernate.metamodel.source.annotations.util.JandexHelper; import org.hibernate.service.ServiceRegistryBuilder; diff --git a/hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/util/ConfiguredClassHierarchyBuilderTest.java b/hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/util/ConfiguredClassHierarchyBuilderTest.java index 15977204d4..8363514f42 100644 --- a/hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/util/ConfiguredClassHierarchyBuilderTest.java +++ b/hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/util/ConfiguredClassHierarchyBuilderTest.java @@ -42,8 +42,10 @@ import org.junit.Test; import org.hibernate.AnnotationException; import org.hibernate.metamodel.binding.InheritanceType; -import org.hibernate.metamodel.source.annotations.ConfiguredClass; -import org.hibernate.metamodel.source.annotations.ConfiguredClassHierarchy; +import org.hibernate.metamodel.source.annotations.entity.ConfiguredClass; +import org.hibernate.metamodel.source.annotations.entity.ConfiguredClassHierarchy; +import org.hibernate.metamodel.source.annotations.entity.ConfiguredClass; +import org.hibernate.metamodel.source.annotations.entity.ConfiguredClassHierarchy; import org.hibernate.service.ServiceRegistryBuilder; import org.hibernate.service.classloading.spi.ClassLoaderService; import org.hibernate.service.internal.BasicServiceRegistryImpl; diff --git a/hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/util/GenericTypeDiscoveryTest.java b/hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/util/GenericTypeDiscoveryTest.java index 2d7a25a1dc..d54180674e 100644 --- a/hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/util/GenericTypeDiscoveryTest.java +++ b/hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/util/GenericTypeDiscoveryTest.java @@ -38,9 +38,11 @@ import org.junit.After; import org.junit.Before; import org.junit.Test; -import org.hibernate.metamodel.source.annotations.ConfiguredClass; -import org.hibernate.metamodel.source.annotations.ConfiguredClassHierarchy; -import org.hibernate.metamodel.source.annotations.MappedAttribute; +import org.hibernate.metamodel.source.annotations.entity.ConfiguredClass; +import org.hibernate.metamodel.source.annotations.entity.ConfiguredClassHierarchy; +import org.hibernate.metamodel.source.annotations.entity.MappedAttribute; +import org.hibernate.metamodel.source.annotations.entity.ConfiguredClass; +import org.hibernate.metamodel.source.annotations.entity.ConfiguredClassHierarchy; import org.hibernate.service.ServiceRegistryBuilder; import org.hibernate.service.classloading.spi.ClassLoaderService; import org.hibernate.service.internal.BasicServiceRegistryImpl;