HHH-7771 : Deprecate obsolete Type, AssociationType, and TypeFactory methods

This commit is contained in:
Gail Badner 2012-12-12 10:37:40 -08:00
parent 32e8765615
commit cb4e92a98d
11 changed files with 14 additions and 22 deletions

View File

@ -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

View File

@ -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() {

View File

@ -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 );
}
}

View File

@ -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) {

View File

@ -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) {

View File

@ -49,7 +49,6 @@ public class ManyToOne extends ToOne {
getReferencedPropertyName(),
isLazy(),
isUnwrapProxy(),
isEmbedded(),
isIgnoreNotFound(),
isLogicalOneToOne
);

View File

@ -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() );
}
}

View File

@ -51,7 +51,6 @@ public class OneToMany implements Value {
null,
false,
false,
isEmbedded(),
isIgnoreNotFound(),
false
);

View File

@ -84,7 +84,6 @@ public class OneToOne extends ToOne {
referencedPropertyName,
isLazy(),
isUnwrapProxy(),
isEmbedded(),
entityName,
propertyName
);

View File

@ -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() );
}
}

View File

@ -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: {