diff --git a/hibernate-envers/src/main/java/org/hibernate/envers/configuration/internal/AnnotationProxyBuilder.java b/hibernate-envers/src/main/java/org/hibernate/envers/configuration/internal/AnnotationProxyBuilder.java index 1aa312f452..6c9622a696 100644 --- a/hibernate-envers/src/main/java/org/hibernate/envers/configuration/internal/AnnotationProxyBuilder.java +++ b/hibernate-envers/src/main/java/org/hibernate/envers/configuration/internal/AnnotationProxyBuilder.java @@ -25,10 +25,7 @@ package org.hibernate.envers.configuration.internal; import java.lang.reflect.Array; import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.Arrays; import java.util.HashMap; -import java.util.List; import java.util.Map; import javassist.util.proxy.MethodHandler; @@ -38,7 +35,7 @@ import org.jboss.jandex.AnnotationInstance; import org.hibernate.HibernateException; import org.hibernate.boot.registry.classloading.spi.ClassLoaderService; -import org.hibernate.metamodel.internal.source.annotations.util.JandexHelper; +import org.hibernate.metamodel.source.internal.annotations.util.JandexHelper; /** * @author Lukasz Antoniak (lukasz dot antoniak at gmail dot com) diff --git a/hibernate-envers/src/main/java/org/hibernate/envers/configuration/internal/RevisionInfoConfiguration.java b/hibernate-envers/src/main/java/org/hibernate/envers/configuration/internal/RevisionInfoConfiguration.java index 771cc39b2c..854e852d68 100644 --- a/hibernate-envers/src/main/java/org/hibernate/envers/configuration/internal/RevisionInfoConfiguration.java +++ b/hibernate-envers/src/main/java/org/hibernate/envers/configuration/internal/RevisionInfoConfiguration.java @@ -47,8 +47,8 @@ import org.hibernate.envers.internal.revisioninfo.RevisionInfoQueryCreator; import org.hibernate.envers.internal.tools.MutableBoolean; import org.hibernate.envers.internal.tools.Tools; import org.hibernate.internal.util.xml.XMLHelper; -import org.hibernate.metamodel.internal.source.annotations.util.JandexHelper; -import org.hibernate.metamodel.internal.source.annotations.util.JPADotNames; +import org.hibernate.metamodel.source.internal.annotations.util.JPADotNames; +import org.hibernate.metamodel.source.internal.annotations.util.JandexHelper; import org.hibernate.metamodel.spi.InFlightMetadataCollector; import org.hibernate.metamodel.spi.binding.EntityBinding; import org.hibernate.metamodel.spi.binding.AttributeBinding; @@ -291,7 +291,7 @@ public class RevisionInfoConfiguration { revisionTimestampProperty ); HibernateTypeDescriptor revisionTimestampType = revisionTimestampAttribute.getHibernateTypeDescriptor(); - final String revisionTimestampClassName = revisionTimestampType.getJavaTypeDescriptor().getName().fullName(); + final String revisionTimestampClassName = revisionTimestampType.getJavaTypeDescriptor().getName().toString(); if ( Long.TYPE.getName().equals( revisionTimestampClassName ) || java.util.Date.class.getName().equals( revisionTimestampClassName ) || Date.class.getName().equals( revisionTimestampClassName) ) { @@ -339,7 +339,7 @@ public class RevisionInfoConfiguration { collectionBinding .getPluralAttributeElementBinding() .getHibernateTypeDescriptor() - .getJavaTypeDescriptor().getName().fullName(); + .getJavaTypeDescriptor().getName().toString(); if ( String.class.getName().equals( elementType ) ) { modifiedEntityNamesData = new PropertyData( modifiedEntityNamesProperty, diff --git a/hibernate-envers/src/main/java/org/hibernate/envers/configuration/internal/metadata/AuditMetadataGenerator.java b/hibernate-envers/src/main/java/org/hibernate/envers/configuration/internal/metadata/AuditMetadataGenerator.java index a3a434c5f1..b965b80b3f 100644 --- a/hibernate-envers/src/main/java/org/hibernate/envers/configuration/internal/metadata/AuditMetadataGenerator.java +++ b/hibernate-envers/src/main/java/org/hibernate/envers/configuration/internal/metadata/AuditMetadataGenerator.java @@ -632,7 +632,7 @@ public final class AuditMetadataGenerator { final String parentEntityName = null; final EntityConfiguration entityCfg = new EntityConfiguration( entityName, - entityBinding.getEntity().getDescriptor().getName().fullName(), + entityBinding.getEntity().getDescriptor().getName().toString(), idMapper, propertyMapper, parentEntityName @@ -722,7 +722,7 @@ public final class AuditMetadataGenerator { // Storing the generated configuration final EntityConfiguration entityCfg = new EntityConfiguration( auditEntityName, - entityBinding.getEntity().getDescriptor().getName().fullName(), + entityBinding.getEntity().getDescriptor().getName().toString(), idMapper, propertyMapper, parentEntityName diff --git a/hibernate-envers/src/main/java/org/hibernate/envers/configuration/internal/metadata/BasicMetadataGenerator.java b/hibernate-envers/src/main/java/org/hibernate/envers/configuration/internal/metadata/BasicMetadataGenerator.java index c20ee07ba6..59443cf578 100644 --- a/hibernate-envers/src/main/java/org/hibernate/envers/configuration/internal/metadata/BasicMetadataGenerator.java +++ b/hibernate-envers/src/main/java/org/hibernate/envers/configuration/internal/metadata/BasicMetadataGenerator.java @@ -60,7 +60,7 @@ public final class BasicMetadataGenerator { || "org.hibernate.type.PrimitiveByteArrayBlobType".equals( hibernateTypeDescriptor.getJavaTypeDescriptor() .getName() - .fullName() + .toString() ) ) { if ( parent != null ) { final boolean addNestedType = !hibernateTypeDescriptor.getTypeParameters().isEmpty(); @@ -118,7 +118,7 @@ public final class BasicMetadataGenerator { typeName = type.getName(); } if ( typeName == null ) { - typeName = hibernateTypeDescriptor.getJavaTypeDescriptor().getName().fullName(); + typeName = hibernateTypeDescriptor.getJavaTypeDescriptor().getName().toString(); } return typeName; } diff --git a/hibernate-envers/src/main/java/org/hibernate/envers/configuration/internal/metadata/CollectionMetadataGenerator.java b/hibernate-envers/src/main/java/org/hibernate/envers/configuration/internal/metadata/CollectionMetadataGenerator.java index 4c924b6111..ae092b2f9a 100644 --- a/hibernate-envers/src/main/java/org/hibernate/envers/configuration/internal/metadata/CollectionMetadataGenerator.java +++ b/hibernate-envers/src/main/java/org/hibernate/envers/configuration/internal/metadata/CollectionMetadataGenerator.java @@ -640,7 +640,7 @@ public final class CollectionMetadataGenerator { } // Collection of embeddable elements. final Class componentClass = ReflectionTools.loadClass( - hibernateTypeDescriptor.getJavaTypeDescriptor().getName().fullName(), + hibernateTypeDescriptor.getJavaTypeDescriptor().getName().toString(), context.getClassLoaderService() ); final MiddleEmbeddableComponentMapper componentMapper = new MiddleEmbeddableComponentMapper( diff --git a/hibernate-envers/src/main/java/org/hibernate/envers/configuration/internal/metadata/ComponentMetadataGenerator.java b/hibernate-envers/src/main/java/org/hibernate/envers/configuration/internal/metadata/ComponentMetadataGenerator.java index b74cadfd52..cf45d30646 100644 --- a/hibernate-envers/src/main/java/org/hibernate/envers/configuration/internal/metadata/ComponentMetadataGenerator.java +++ b/hibernate-envers/src/main/java/org/hibernate/envers/configuration/internal/metadata/ComponentMetadataGenerator.java @@ -65,7 +65,7 @@ public final class ComponentMetadataGenerator { } else { // TODO: get rid of classloading. componentClass = context.getClassLoaderService().classForName( - compositeAttributeBinding.getHibernateTypeDescriptor().getJavaTypeDescriptor().getName().fullName() + compositeAttributeBinding.getHibernateTypeDescriptor().getJavaTypeDescriptor().getName().toString() ); } final CompositeMapperBuilder componentMapper = mapper.addComponent( diff --git a/hibernate-envers/src/main/java/org/hibernate/envers/configuration/internal/metadata/IdMetadataGenerator.java b/hibernate-envers/src/main/java/org/hibernate/envers/configuration/internal/metadata/IdMetadataGenerator.java index 034813c85c..f4a1da25b2 100644 --- a/hibernate-envers/src/main/java/org/hibernate/envers/configuration/internal/metadata/IdMetadataGenerator.java +++ b/hibernate-envers/src/main/java/org/hibernate/envers/configuration/internal/metadata/IdMetadataGenerator.java @@ -42,7 +42,6 @@ import org.hibernate.metamodel.spi.binding.EntityBinding; import org.hibernate.metamodel.spi.binding.EntityIdentifier; import org.hibernate.metamodel.spi.binding.ManyToOneAttributeBinding; import org.hibernate.metamodel.spi.binding.SingularAttributeBinding; -import org.hibernate.metamodel.spi.binding.SingularNonAssociationAttributeBinding; import org.hibernate.type.ManyToOneType; import org.hibernate.type.Type; @@ -160,7 +159,7 @@ public final class IdMetadataGenerator { // Embeddable id // TODO: get rid of classloading. final Class embeddableClass = context.getClassLoaderService().classForName( - entityIdentifier.getAttributeBinding().getHibernateTypeDescriptor().getJavaTypeDescriptor().getName().fullName() + entityIdentifier.getAttributeBinding().getHibernateTypeDescriptor().getJavaTypeDescriptor().getName().toString() ); mapper = new EmbeddedIdMapper( getIdPropertyData( entityIdentifier.getAttributeBinding() ), embeddableClass ); if ( !addIdProperties( @@ -219,7 +218,7 @@ public final class IdMetadataGenerator { return new IdMappingData( mapper, origIdMapping, relIdMapping ); } - private PropertyData getIdPropertyData(SingularNonAssociationAttributeBinding idAttributeBinding) { + private PropertyData getIdPropertyData(SingularAttributeBinding idAttributeBinding) { return new PropertyData( idAttributeBinding.getAttribute().getName(), idAttributeBinding.getAttribute().getName(), diff --git a/hibernate-envers/src/main/java/org/hibernate/envers/configuration/internal/metadata/ToOneRelationMetadataGenerator.java b/hibernate-envers/src/main/java/org/hibernate/envers/configuration/internal/metadata/ToOneRelationMetadataGenerator.java index 7bcf44734f..72d0539537 100644 --- a/hibernate-envers/src/main/java/org/hibernate/envers/configuration/internal/metadata/ToOneRelationMetadataGenerator.java +++ b/hibernate-envers/src/main/java/org/hibernate/envers/configuration/internal/metadata/ToOneRelationMetadataGenerator.java @@ -34,10 +34,6 @@ import org.hibernate.envers.internal.entities.mapper.relation.OneToOneNotOwningM import org.hibernate.envers.internal.entities.mapper.relation.OneToOnePrimaryKeyJoinColumnMapper; import org.hibernate.envers.internal.entities.mapper.relation.ToOneIdMapper; import org.hibernate.envers.internal.tools.MappingTools; -import org.hibernate.mapping.OneToOne; -import org.hibernate.mapping.ToOne; -import org.hibernate.mapping.Value; -import org.hibernate.metamodel.internal.source.annotations.attribute.SingularAssociationAttribute; import org.hibernate.metamodel.spi.binding.OneToOneAttributeBinding; import org.hibernate.metamodel.spi.binding.SingularAssociationAttributeBinding; diff --git a/hibernate-envers/src/main/java/org/hibernate/envers/event/spi/EnversJaxbRootProducer.java b/hibernate-envers/src/main/java/org/hibernate/envers/event/spi/EnversJaxbRootProducer.java index 050ed61ea1..1488af1908 100644 --- a/hibernate-envers/src/main/java/org/hibernate/envers/event/spi/EnversJaxbRootProducer.java +++ b/hibernate-envers/src/main/java/org/hibernate/envers/event/spi/EnversJaxbRootProducer.java @@ -32,7 +32,7 @@ import org.hibernate.envers.configuration.internal.RevisionInfoConfigurationResu import org.hibernate.envers.configuration.spi.AuditConfiguration; import org.hibernate.internal.CoreMessageLogger; import org.hibernate.metamodel.Metadata; -import org.hibernate.metamodel.internal.source.annotations.util.JandexHelper; +import org.hibernate.metamodel.source.internal.annotations.util.JandexHelper; import org.hibernate.metamodel.spi.AdditionalJaxbRootProducer; import org.hibernate.metamodel.spi.InFlightMetadataCollector; import org.hibernate.metamodel.spi.binding.EntityBinding; @@ -122,7 +122,7 @@ public class EnversJaxbRootProducer implements AdditionalJaxbRootProducer { @Override public ClassInfo getClassInfo(AttributeContainer attributeContainer) { return getClassInfo( - attributeContainer.getDescriptor().getName().fullName() + attributeContainer.getDescriptor().getName().toString() ); } diff --git a/hibernate-envers/src/main/java/org/hibernate/envers/internal/tools/MappingTools.java b/hibernate-envers/src/main/java/org/hibernate/envers/internal/tools/MappingTools.java index 5cf8af3f17..ea97624260 100644 --- a/hibernate-envers/src/main/java/org/hibernate/envers/internal/tools/MappingTools.java +++ b/hibernate-envers/src/main/java/org/hibernate/envers/internal/tools/MappingTools.java @@ -82,7 +82,7 @@ public abstract class MappingTools { */ public static boolean ignoreNotFound(AttributeBinding attributeBinding) { if ( ManyToOneAttributeBinding.class.isInstance( attributeBinding )) { - return ! ( (ManyToOneAttributeBinding) attributeBinding ).isNotFoundAnException(); + return ( (ManyToOneAttributeBinding) attributeBinding ).isIgnoreNotFound(); } else if ( attributeBinding instanceof PluralAttributeBinding ) { final PluralAttributeBinding pluralAttributeBinding = (PluralAttributeBinding) attributeBinding;