From cb4e92a98d6e6cd3cf8ba23ba7b6b6f18f4f455f Mon Sep 17 00:00:00 2001 From: Gail Badner Date: Wed, 12 Dec 2012 10:37:40 -0800 Subject: [PATCH] HHH-7771 : Deprecate obsolete Type, AssociationType, and TypeFactory methods --- .../src/main/java/org/hibernate/mapping/Array.java | 2 +- .../src/main/java/org/hibernate/mapping/Bag.java | 2 +- .../main/java/org/hibernate/mapping/Collection.java | 2 +- .../java/org/hibernate/mapping/IdentifierBag.java | 2 +- .../src/main/java/org/hibernate/mapping/List.java | 2 +- .../main/java/org/hibernate/mapping/ManyToOne.java | 1 - .../src/main/java/org/hibernate/mapping/Map.java | 6 +++--- .../main/java/org/hibernate/mapping/OneToMany.java | 1 - .../src/main/java/org/hibernate/mapping/OneToOne.java | 1 - .../src/main/java/org/hibernate/mapping/Set.java | 6 +++--- .../source/internal/HibernateTypeResolver.java | 11 +++-------- 11 files changed, 14 insertions(+), 22 deletions(-) diff --git a/hibernate-core/src/main/java/org/hibernate/mapping/Array.java b/hibernate-core/src/main/java/org/hibernate/mapping/Array.java index b6e565a13a..5f6700f7a2 100644 --- a/hibernate-core/src/main/java/org/hibernate/mapping/Array.java +++ b/hibernate-core/src/main/java/org/hibernate/mapping/Array.java @@ -63,7 +63,7 @@ public class Array extends List { public CollectionType getDefaultCollectionType() throws MappingException { return getMappings().getTypeResolver() .getTypeFactory() - .array( getRole(), getReferencedPropertyName(), isEmbedded(), getElementClass() ); + .array( getRole(), getReferencedPropertyName(), getElementClass() ); } @Override diff --git a/hibernate-core/src/main/java/org/hibernate/mapping/Bag.java b/hibernate-core/src/main/java/org/hibernate/mapping/Bag.java index 326cc22f6e..a01b24fd37 100644 --- a/hibernate-core/src/main/java/org/hibernate/mapping/Bag.java +++ b/hibernate-core/src/main/java/org/hibernate/mapping/Bag.java @@ -39,7 +39,7 @@ public class Bag extends Collection { public CollectionType getDefaultCollectionType() { return getMappings().getTypeResolver() .getTypeFactory() - .bag( getRole(), getReferencedPropertyName(), isEmbedded() ); + .bag( getRole(), getReferencedPropertyName() ); } void createPrimaryKey() { diff --git a/hibernate-core/src/main/java/org/hibernate/mapping/Collection.java b/hibernate-core/src/main/java/org/hibernate/mapping/Collection.java index 86a03fbeb8..51dbd0e25b 100644 --- a/hibernate-core/src/main/java/org/hibernate/mapping/Collection.java +++ b/hibernate-core/src/main/java/org/hibernate/mapping/Collection.java @@ -384,7 +384,7 @@ public abstract class Collection implements Fetchable, Value, Filterable { else { return mappings.getTypeResolver() .getTypeFactory() - .customCollection( typeName, typeParameters, role, referencedPropertyName, isEmbedded() ); + .customCollection( typeName, typeParameters, role, referencedPropertyName ); } } diff --git a/hibernate-core/src/main/java/org/hibernate/mapping/IdentifierBag.java b/hibernate-core/src/main/java/org/hibernate/mapping/IdentifierBag.java index ed8f1ed0ea..a1164173fd 100644 --- a/hibernate-core/src/main/java/org/hibernate/mapping/IdentifierBag.java +++ b/hibernate-core/src/main/java/org/hibernate/mapping/IdentifierBag.java @@ -38,7 +38,7 @@ public class IdentifierBag extends IdentifierCollection { public CollectionType getDefaultCollectionType() { return getMappings().getTypeResolver() .getTypeFactory() - .idbag( getRole(), getReferencedPropertyName(), isEmbedded() ); + .idbag( getRole(), getReferencedPropertyName() ); } public Object accept(ValueVisitor visitor) { diff --git a/hibernate-core/src/main/java/org/hibernate/mapping/List.java b/hibernate-core/src/main/java/org/hibernate/mapping/List.java index 132d708204..a034491401 100644 --- a/hibernate-core/src/main/java/org/hibernate/mapping/List.java +++ b/hibernate-core/src/main/java/org/hibernate/mapping/List.java @@ -46,7 +46,7 @@ public class List extends IndexedCollection { public CollectionType getDefaultCollectionType() throws MappingException { return getMappings().getTypeResolver() .getTypeFactory() - .list( getRole(), getReferencedPropertyName(), isEmbedded() ); + .list( getRole(), getReferencedPropertyName() ); } public Object accept(ValueVisitor visitor) { diff --git a/hibernate-core/src/main/java/org/hibernate/mapping/ManyToOne.java b/hibernate-core/src/main/java/org/hibernate/mapping/ManyToOne.java index e013a9eba2..9736b5bf51 100644 --- a/hibernate-core/src/main/java/org/hibernate/mapping/ManyToOne.java +++ b/hibernate-core/src/main/java/org/hibernate/mapping/ManyToOne.java @@ -49,7 +49,6 @@ public class ManyToOne extends ToOne { getReferencedPropertyName(), isLazy(), isUnwrapProxy(), - isEmbedded(), isIgnoreNotFound(), isLogicalOneToOne ); diff --git a/hibernate-core/src/main/java/org/hibernate/mapping/Map.java b/hibernate-core/src/main/java/org/hibernate/mapping/Map.java index 3751eae2ce..b196a5af22 100644 --- a/hibernate-core/src/main/java/org/hibernate/mapping/Map.java +++ b/hibernate-core/src/main/java/org/hibernate/mapping/Map.java @@ -44,17 +44,17 @@ public class Map extends IndexedCollection { if ( isSorted() ) { return getMappings().getTypeResolver() .getTypeFactory() - .sortedMap( getRole(), getReferencedPropertyName(), isEmbedded(), getComparator() ); + .sortedMap( getRole(), getReferencedPropertyName(), getComparator() ); } else if ( hasOrder() ) { return getMappings().getTypeResolver() .getTypeFactory() - .orderedMap( getRole(), getReferencedPropertyName(), isEmbedded() ); + .orderedMap( getRole(), getReferencedPropertyName() ); } else { return getMappings().getTypeResolver() .getTypeFactory() - .map( getRole(), getReferencedPropertyName(), isEmbedded() ); + .map( getRole(), getReferencedPropertyName() ); } } diff --git a/hibernate-core/src/main/java/org/hibernate/mapping/OneToMany.java b/hibernate-core/src/main/java/org/hibernate/mapping/OneToMany.java index 3322e2ad34..5abfefd081 100644 --- a/hibernate-core/src/main/java/org/hibernate/mapping/OneToMany.java +++ b/hibernate-core/src/main/java/org/hibernate/mapping/OneToMany.java @@ -51,7 +51,6 @@ public class OneToMany implements Value { null, false, false, - isEmbedded(), isIgnoreNotFound(), false ); diff --git a/hibernate-core/src/main/java/org/hibernate/mapping/OneToOne.java b/hibernate-core/src/main/java/org/hibernate/mapping/OneToOne.java index 74102aa9e7..ca8e196db6 100644 --- a/hibernate-core/src/main/java/org/hibernate/mapping/OneToOne.java +++ b/hibernate-core/src/main/java/org/hibernate/mapping/OneToOne.java @@ -84,7 +84,6 @@ public class OneToOne extends ToOne { referencedPropertyName, isLazy(), isUnwrapProxy(), - isEmbedded(), entityName, propertyName ); diff --git a/hibernate-core/src/main/java/org/hibernate/mapping/Set.java b/hibernate-core/src/main/java/org/hibernate/mapping/Set.java index c6a91012e6..2c77bf1e28 100644 --- a/hibernate-core/src/main/java/org/hibernate/mapping/Set.java +++ b/hibernate-core/src/main/java/org/hibernate/mapping/Set.java @@ -61,17 +61,17 @@ public class Set extends Collection { if ( isSorted() ) { return getMappings().getTypeResolver() .getTypeFactory() - .sortedSet( getRole(), getReferencedPropertyName(), isEmbedded(), getComparator() ); + .sortedSet( getRole(), getReferencedPropertyName(), getComparator() ); } else if ( hasOrder() ) { return getMappings().getTypeResolver() .getTypeFactory() - .orderedSet( getRole(), getReferencedPropertyName(), isEmbedded() ); + .orderedSet( getRole(), getReferencedPropertyName() ); } else { return getMappings().getTypeResolver() .getTypeFactory() - .set( getRole(), getReferencedPropertyName(), isEmbedded() ); + .set( getRole(), getReferencedPropertyName() ); } } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/source/internal/HibernateTypeResolver.java b/hibernate-core/src/main/java/org/hibernate/metamodel/source/internal/HibernateTypeResolver.java index d8379db561..84fde97807 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/source/internal/HibernateTypeResolver.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/source/internal/HibernateTypeResolver.java @@ -159,9 +159,7 @@ class HibernateTypeResolver { typeName, getTypeParameters( attributeBinding.getHibernateTypeDescriptor() ), attributeBinding.getAttribute().getName(), - attributeBinding.getReferencedPropertyName(), - attributeBinding.getCollectionElement().getCollectionElementNature() == - CollectionElementNature.COMPOSITE + attributeBinding.getReferencedPropertyName() ); } else { @@ -182,16 +180,13 @@ class HibernateTypeResolver { case SET: { return typeFactory.set( attributeBinding.getAttribute().getName(), - attributeBinding.getReferencedPropertyName(), - attributeBinding.getCollectionElement().getCollectionElementNature() == CollectionElementNature.COMPOSITE + attributeBinding.getReferencedPropertyName() ); } case BAG: { return typeFactory.bag( attributeBinding.getAttribute().getName(), - attributeBinding.getReferencedPropertyName(), - attributeBinding.getCollectionElement() - .getCollectionElementNature() == CollectionElementNature.COMPOSITE + attributeBinding.getReferencedPropertyName() ); } default: {