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 getElementClass() throws MappingException {
public CollectionType getDefaultCollectionType() throws MappingException { public CollectionType getDefaultCollectionType() throws MappingException {
return getMappings().getTypeResolver() return getMappings().getTypeResolver()
.getTypeFactory() .getTypeFactory()
.array( getRole(), getReferencedPropertyName(), isEmbedded(), getElementClass() ); .array( getRole(), getReferencedPropertyName(), getElementClass() );
} }
@Override @Override

View File

@ -39,7 +39,7 @@ public Bag(Mappings mappings, PersistentClass owner) {
public CollectionType getDefaultCollectionType() { public CollectionType getDefaultCollectionType() {
return getMappings().getTypeResolver() return getMappings().getTypeResolver()
.getTypeFactory() .getTypeFactory()
.bag( getRole(), getReferencedPropertyName(), isEmbedded() ); .bag( getRole(), getReferencedPropertyName() );
} }
void createPrimaryKey() { void createPrimaryKey() {

View File

@ -384,7 +384,7 @@ public CollectionType getCollectionType() {
else { else {
return mappings.getTypeResolver() return mappings.getTypeResolver()
.getTypeFactory() .getTypeFactory()
.customCollection( typeName, typeParameters, role, referencedPropertyName, isEmbedded() ); .customCollection( typeName, typeParameters, role, referencedPropertyName );
} }
} }

View File

@ -38,7 +38,7 @@ public IdentifierBag(Mappings mappings, PersistentClass owner) {
public CollectionType getDefaultCollectionType() { public CollectionType getDefaultCollectionType() {
return getMappings().getTypeResolver() return getMappings().getTypeResolver()
.getTypeFactory() .getTypeFactory()
.idbag( getRole(), getReferencedPropertyName(), isEmbedded() ); .idbag( getRole(), getReferencedPropertyName() );
} }
public Object accept(ValueVisitor visitor) { public Object accept(ValueVisitor visitor) {

View File

@ -46,7 +46,7 @@ public List(Mappings mappings, PersistentClass owner) {
public CollectionType getDefaultCollectionType() throws MappingException { public CollectionType getDefaultCollectionType() throws MappingException {
return getMappings().getTypeResolver() return getMappings().getTypeResolver()
.getTypeFactory() .getTypeFactory()
.list( getRole(), getReferencedPropertyName(), isEmbedded() ); .list( getRole(), getReferencedPropertyName() );
} }
public Object accept(ValueVisitor visitor) { public Object accept(ValueVisitor visitor) {

View File

@ -49,7 +49,6 @@ public Type getType() throws MappingException {
getReferencedPropertyName(), getReferencedPropertyName(),
isLazy(), isLazy(),
isUnwrapProxy(), isUnwrapProxy(),
isEmbedded(),
isIgnoreNotFound(), isIgnoreNotFound(),
isLogicalOneToOne isLogicalOneToOne
); );

View File

@ -44,17 +44,17 @@ public CollectionType getDefaultCollectionType() {
if ( isSorted() ) { if ( isSorted() ) {
return getMappings().getTypeResolver() return getMappings().getTypeResolver()
.getTypeFactory() .getTypeFactory()
.sortedMap( getRole(), getReferencedPropertyName(), isEmbedded(), getComparator() ); .sortedMap( getRole(), getReferencedPropertyName(), getComparator() );
} }
else if ( hasOrder() ) { else if ( hasOrder() ) {
return getMappings().getTypeResolver() return getMappings().getTypeResolver()
.getTypeFactory() .getTypeFactory()
.orderedMap( getRole(), getReferencedPropertyName(), isEmbedded() ); .orderedMap( getRole(), getReferencedPropertyName() );
} }
else { else {
return getMappings().getTypeResolver() return getMappings().getTypeResolver()
.getTypeFactory() .getTypeFactory()
.map( getRole(), getReferencedPropertyName(), isEmbedded() ); .map( getRole(), getReferencedPropertyName() );
} }
} }

View File

@ -51,7 +51,6 @@ private EntityType getEntityType() {
null, null,
false, false,
false, false,
isEmbedded(),
isIgnoreNotFound(), isIgnoreNotFound(),
false false
); );

View File

@ -84,7 +84,6 @@ public Type getType() throws MappingException {
referencedPropertyName, referencedPropertyName,
isLazy(), isLazy(),
isUnwrapProxy(), isUnwrapProxy(),
isEmbedded(),
entityName, entityName,
propertyName propertyName
); );

View File

@ -61,17 +61,17 @@ public CollectionType getDefaultCollectionType() {
if ( isSorted() ) { if ( isSorted() ) {
return getMappings().getTypeResolver() return getMappings().getTypeResolver()
.getTypeFactory() .getTypeFactory()
.sortedSet( getRole(), getReferencedPropertyName(), isEmbedded(), getComparator() ); .sortedSet( getRole(), getReferencedPropertyName(), getComparator() );
} }
else if ( hasOrder() ) { else if ( hasOrder() ) {
return getMappings().getTypeResolver() return getMappings().getTypeResolver()
.getTypeFactory() .getTypeFactory()
.orderedSet( getRole(), getReferencedPropertyName(), isEmbedded() ); .orderedSet( getRole(), getReferencedPropertyName() );
} }
else { else {
return getMappings().getTypeResolver() return getMappings().getTypeResolver()
.getTypeFactory() .getTypeFactory()
.set( getRole(), getReferencedPropertyName(), isEmbedded() ); .set( getRole(), getReferencedPropertyName() );
} }
} }

View File

@ -159,9 +159,7 @@ private void resolvePluralAttributeTypeInformation(AbstractPluralAttributeBindin
typeName, typeName,
getTypeParameters( attributeBinding.getHibernateTypeDescriptor() ), getTypeParameters( attributeBinding.getHibernateTypeDescriptor() ),
attributeBinding.getAttribute().getName(), attributeBinding.getAttribute().getName(),
attributeBinding.getReferencedPropertyName(), attributeBinding.getReferencedPropertyName()
attributeBinding.getCollectionElement().getCollectionElementNature() ==
CollectionElementNature.COMPOSITE
); );
} }
else { else {
@ -182,16 +180,13 @@ private Type determineDefaultCollectionInformation(AbstractPluralAttributeBindin
case SET: { case SET: {
return typeFactory.set( return typeFactory.set(
attributeBinding.getAttribute().getName(), attributeBinding.getAttribute().getName(),
attributeBinding.getReferencedPropertyName(), attributeBinding.getReferencedPropertyName()
attributeBinding.getCollectionElement().getCollectionElementNature() == CollectionElementNature.COMPOSITE
); );
} }
case BAG: { case BAG: {
return typeFactory.bag( return typeFactory.bag(
attributeBinding.getAttribute().getName(), attributeBinding.getAttribute().getName(),
attributeBinding.getReferencedPropertyName(), attributeBinding.getReferencedPropertyName()
attributeBinding.getCollectionElement()
.getCollectionElementNature() == CollectionElementNature.COMPOSITE
); );
} }
default: { default: {