Created
December 13, 2012 04:15
-
-
Save stliu/4273992 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 b6e565a..5f6700f 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 326cc22..a01b24f 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 16abb15..51dbd0e 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 ); | |
| } | |
| } | |
| @@ -612,10 +612,20 @@ public abstract class Collection implements Fetchable, Value, Filterable { | |
| this.elementNodeName = elementNodeName; | |
| } | |
| + /** | |
| + * @deprecated To be removed in 5. Removed as part of removing the notion of DOM entity-mode. | |
| + * See Jira issue: <a href="https://hibernate.onjira.com/browse/HHH-7771">HHH-7771</a> | |
| + */ | |
| + @Deprecated | |
| public boolean isEmbedded() { | |
| return embedded; | |
| } | |
| + /** | |
| + * @deprecated To be removed in 5. Removed as part of removing the notion of DOM entity-mode. | |
| + * See Jira issue: <a href="https://hibernate.onjira.com/browse/HHH-7771">HHH-7771</a> | |
| + */ | |
| + @Deprecated | |
| public void setEmbedded(boolean embedded) { | |
| this.embedded = embedded; | |
| } | |
| 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 ed8f1ed..a116417 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 132d708..a034491 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 e013a9e..9736b5b 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 3751eae..b196a5a 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 8b14cfb..5abfefd 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 | |
| ); | |
| @@ -150,11 +149,21 @@ public class OneToMany implements Value { | |
| //TODO: we could just return all false... | |
| throw new UnsupportedOperationException(); | |
| } | |
| - | |
| + | |
| + /** | |
| + * @deprecated To be removed in 5. Removed as part of removing the notion of DOM entity-mode. | |
| + * See Jira issue: <a href="https://hibernate.onjira.com/browse/HHH-7771">HHH-7771</a> | |
| + */ | |
| + @Deprecated | |
| public boolean isEmbedded() { | |
| return embedded; | |
| } | |
| - | |
| + | |
| + /** | |
| + * @deprecated To be removed in 5. Removed as part of removing the notion of DOM entity-mode. | |
| + * See Jira issue: <a href="https://hibernate.onjira.com/browse/HHH-7771">HHH-7771</a> | |
| + */ | |
| + @Deprecated | |
| public void setEmbedded(boolean embedded) { | |
| this.embedded = embedded; | |
| } | |
| 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 74102aa..ca8e196 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 c6a9101..2c77bf1 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/mapping/ToOne.java b/hibernate-core/src/main/java/org/hibernate/mapping/ToOne.java | |
| index a33fb73..9a6ab73 100644 | |
| --- a/hibernate-core/src/main/java/org/hibernate/mapping/ToOne.java | |
| +++ b/hibernate-core/src/main/java/org/hibernate/mapping/ToOne.java | |
| @@ -88,11 +88,21 @@ public abstract class ToOne extends SimpleValue implements Fetchable { | |
| public Object accept(ValueVisitor visitor) { | |
| return visitor.accept(this); | |
| } | |
| - | |
| + | |
| + /** | |
| + * @deprecated To be removed in 5. Removed as part of removing the notion of DOM entity-mode. | |
| + * See Jira issue: <a href="https://hibernate.onjira.com/browse/HHH-7771">HHH-7771</a> | |
| + */ | |
| + @Deprecated | |
| public boolean isEmbedded() { | |
| return embedded; | |
| } | |
| - | |
| + | |
| + /** | |
| + * @deprecated To be removed in 5. Removed as part of removing the notion of DOM entity-mode. | |
| + * See Jira issue: <a href="https://hibernate.onjira.com/browse/HHH-7771">HHH-7771</a> | |
| + */ | |
| + @Deprecated | |
| public void setEmbedded(boolean embedded) { | |
| this.embedded = embedded; | |
| } | |
| 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 d8379db..84fde97 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: { | |
| diff --git a/hibernate-core/src/main/java/org/hibernate/type/ArrayType.java b/hibernate-core/src/main/java/org/hibernate/type/ArrayType.java | |
| index 0c2aef0..893518f 100644 | |
| --- a/hibernate-core/src/main/java/org/hibernate/type/ArrayType.java | |
| +++ b/hibernate-core/src/main/java/org/hibernate/type/ArrayType.java | |
| @@ -47,12 +47,23 @@ public class ArrayType extends CollectionType { | |
| private final Class elementClass; | |
| private final Class arrayClass; | |
| + /** | |
| + * @deprecated Use {@link #ArrayType(TypeFactory.TypeScope, String, String, Class )} instead. | |
| + * See Jira issue: <a href="https://hibernate.onjira.com/browse/HHH-7771">HHH-7771</a> | |
| + */ | |
| + @Deprecated | |
| public ArrayType(TypeFactory.TypeScope typeScope, String role, String propertyRef, Class elementClass, boolean isEmbeddedInXML) { | |
| super( typeScope, role, propertyRef, isEmbeddedInXML ); | |
| this.elementClass = elementClass; | |
| arrayClass = Array.newInstance(elementClass, 0).getClass(); | |
| } | |
| + public ArrayType(TypeFactory.TypeScope typeScope, String role, String propertyRef, Class elementClass) { | |
| + super( typeScope, role, propertyRef ); | |
| + this.elementClass = elementClass; | |
| + arrayClass = Array.newInstance(elementClass, 0).getClass(); | |
| + } | |
| + | |
| public Class getReturnedClass() { | |
| return arrayClass; | |
| } | |
| diff --git a/hibernate-core/src/main/java/org/hibernate/type/AssociationType.java b/hibernate-core/src/main/java/org/hibernate/type/AssociationType.java | |
| index de865bb..88ed066 100644 | |
| --- a/hibernate-core/src/main/java/org/hibernate/type/AssociationType.java | |
| +++ b/hibernate-core/src/main/java/org/hibernate/type/AssociationType.java | |
| @@ -85,7 +85,12 @@ public interface AssociationType extends Type { | |
| * no columns to be updated? | |
| */ | |
| public abstract boolean isAlwaysDirtyChecked(); | |
| - | |
| + | |
| + /** | |
| + * @deprecated To be removed in 5. Removed as part of removing the notion of DOM entity-mode. | |
| + * See Jira issue: <a href="https://hibernate.onjira.com/browse/HHH-7771">HHH-7771</a> | |
| + */ | |
| + @Deprecated | |
| public boolean isEmbeddedInXML(); | |
| } | |
| diff --git a/hibernate-core/src/main/java/org/hibernate/type/BagType.java b/hibernate-core/src/main/java/org/hibernate/type/BagType.java | |
| index 969aa96..08f7ad2 100644 | |
| --- a/hibernate-core/src/main/java/org/hibernate/type/BagType.java | |
| +++ b/hibernate-core/src/main/java/org/hibernate/type/BagType.java | |
| @@ -35,10 +35,19 @@ import org.hibernate.persister.collection.CollectionPersister; | |
| public class BagType extends CollectionType { | |
| + /** | |
| + * @deprecated Use {@link #BagType(TypeFactory.TypeScope, String, String )} | |
| + * See Jira issue: <a href="https://hibernate.onjira.com/browse/HHH-7771">HHH-7771</a> | |
| + */ | |
| + @Deprecated | |
| public BagType(TypeFactory.TypeScope typeScope, String role, String propertyRef, boolean isEmbeddedInXML) { | |
| super( typeScope, role, propertyRef, isEmbeddedInXML ); | |
| } | |
| + public BagType(TypeFactory.TypeScope typeScope, String role, String propertyRef) { | |
| + super( typeScope, role, propertyRef ); | |
| + } | |
| + | |
| public PersistentCollection instantiate(SessionImplementor session, CollectionPersister persister, Serializable key) | |
| throws HibernateException { | |
| return new PersistentBag(session); | |
| diff --git a/hibernate-core/src/main/java/org/hibernate/type/CollectionType.java b/hibernate-core/src/main/java/org/hibernate/type/CollectionType.java | |
| index d119bad..4950059 100644 | |
| --- a/hibernate-core/src/main/java/org/hibernate/type/CollectionType.java | |
| +++ b/hibernate-core/src/main/java/org/hibernate/type/CollectionType.java | |
| @@ -81,6 +81,11 @@ public abstract class CollectionType extends AbstractType implements Association | |
| private final String foreignKeyPropertyName; | |
| private final boolean isEmbeddedInXML; | |
| + /** | |
| + * @deprecated Use {@link #CollectionType(TypeFactory.TypeScope, String, String)} instead | |
| + * See Jira issue: <a href="https://hibernate.onjira.com/browse/HHH-7771">HHH-7771</a> | |
| + */ | |
| + @Deprecated | |
| public CollectionType(TypeFactory.TypeScope typeScope, String role, String foreignKeyPropertyName, boolean isEmbeddedInXML) { | |
| this.typeScope = typeScope; | |
| this.role = role; | |
| @@ -88,6 +93,13 @@ public abstract class CollectionType extends AbstractType implements Association | |
| this.isEmbeddedInXML = isEmbeddedInXML; | |
| } | |
| + public CollectionType(TypeFactory.TypeScope typeScope, String role, String foreignKeyPropertyName) { | |
| + this.typeScope = typeScope; | |
| + this.role = role; | |
| + this.foreignKeyPropertyName = foreignKeyPropertyName; | |
| + this.isEmbeddedInXML = true; | |
| + } | |
| + | |
| public boolean isEmbeddedInXML() { | |
| return isEmbeddedInXML; | |
| } | |
| diff --git a/hibernate-core/src/main/java/org/hibernate/type/CustomCollectionType.java b/hibernate-core/src/main/java/org/hibernate/type/CustomCollectionType.java | |
| index d2cff37..e0531c4 100755 | |
| --- a/hibernate-core/src/main/java/org/hibernate/type/CustomCollectionType.java | |
| +++ b/hibernate-core/src/main/java/org/hibernate/type/CustomCollectionType.java | |
| @@ -48,6 +48,11 @@ public class CustomCollectionType extends CollectionType { | |
| private final UserCollectionType userType; | |
| private final boolean customLogging; | |
| + /** | |
| + * @deprecated Use {@link #CustomCollectionType(TypeFactory.TypeScope, Class, String, String )} instead. | |
| + * See Jira issue: <a href="https://hibernate.onjira.com/browse/HHH-7771">HHH-7771</a> | |
| + */ | |
| + @Deprecated | |
| public CustomCollectionType( | |
| TypeFactory.TypeScope typeScope, | |
| Class userTypeClass, | |
| @@ -55,13 +60,27 @@ public class CustomCollectionType extends CollectionType { | |
| String foreignKeyPropertyName, | |
| boolean isEmbeddedInXML) { | |
| super( typeScope, role, foreignKeyPropertyName, isEmbeddedInXML ); | |
| + userType = createUserCollectionType( userTypeClass ); | |
| + customLogging = LoggableUserType.class.isAssignableFrom( userTypeClass ); | |
| + } | |
| + public CustomCollectionType( | |
| + TypeFactory.TypeScope typeScope, | |
| + Class userTypeClass, | |
| + String role, | |
| + String foreignKeyPropertyName) { | |
| + super( typeScope, role, foreignKeyPropertyName ); | |
| + userType = createUserCollectionType( userTypeClass ); | |
| + customLogging = LoggableUserType.class.isAssignableFrom( userTypeClass ); | |
| + } | |
| + | |
| + private static UserCollectionType createUserCollectionType(Class userTypeClass) { | |
| if ( !UserCollectionType.class.isAssignableFrom( userTypeClass ) ) { | |
| throw new MappingException( "Custom type does not implement UserCollectionType: " + userTypeClass.getName() ); | |
| } | |
| try { | |
| - userType = ( UserCollectionType ) userTypeClass.newInstance(); | |
| + return ( UserCollectionType ) userTypeClass.newInstance(); | |
| } | |
| catch ( InstantiationException ie ) { | |
| throw new MappingException( "Cannot instantiate custom type: " + userTypeClass.getName() ); | |
| @@ -69,8 +88,6 @@ public class CustomCollectionType extends CollectionType { | |
| catch ( IllegalAccessException iae ) { | |
| throw new MappingException( "IllegalAccessException trying to instantiate custom type: " + userTypeClass.getName() ); | |
| } | |
| - | |
| - customLogging = LoggableUserType.class.isAssignableFrom( userTypeClass ); | |
| } | |
| public PersistentCollection instantiate(SessionImplementor session, CollectionPersister persister, Serializable key) | |
| diff --git a/hibernate-core/src/main/java/org/hibernate/type/EntityType.java b/hibernate-core/src/main/java/org/hibernate/type/EntityType.java | |
| index 9265c31..0451e09 100644 | |
| --- a/hibernate-core/src/main/java/org/hibernate/type/EntityType.java | |
| +++ b/hibernate-core/src/main/java/org/hibernate/type/EntityType.java | |
| @@ -76,7 +76,11 @@ public abstract class EntityType extends AbstractType implements AssociationType | |
| * @param unwrapProxy Is unwrapping of proxies allowed for this association; unwrapping | |
| * says to return the "implementation target" of lazy prooxies; typically only possible | |
| * with lazy="no-proxy". | |
| + * | |
| + * @deprecated Use {@link #EntityType(TypeFactory.TypeScope, String, String, boolean, boolean )} instead. | |
| + * See Jira issue: <a href="https://hibernate.onjira.com/browse/HHH-7771">HHH-7771</a> | |
| */ | |
| + @Deprecated | |
| protected EntityType( | |
| TypeFactory.TypeScope scope, | |
| String entityName, | |
| @@ -92,6 +96,32 @@ public abstract class EntityType extends AbstractType implements AssociationType | |
| this.unwrapProxy = unwrapProxy; | |
| } | |
| + /** | |
| + * Constructs the requested entity type mapping. | |
| + * | |
| + * @param scope The type scope | |
| + * @param entityName The name of the associated entity. | |
| + * @param uniqueKeyPropertyName The property-ref name, or null if we | |
| + * reference the PK of the associated entity. | |
| + * @param eager Is eager fetching enabled. | |
| + * @param unwrapProxy Is unwrapping of proxies allowed for this association; unwrapping | |
| + * says to return the "implementation target" of lazy prooxies; typically only possible | |
| + * with lazy="no-proxy". | |
| + */ | |
| + protected EntityType( | |
| + TypeFactory.TypeScope scope, | |
| + String entityName, | |
| + String uniqueKeyPropertyName, | |
| + boolean eager, | |
| + boolean unwrapProxy) { | |
| + this.scope = scope; | |
| + this.associatedEntityName = entityName; | |
| + this.uniqueKeyPropertyName = uniqueKeyPropertyName; | |
| + this.isEmbeddedInXML = true; | |
| + this.eager = eager; | |
| + this.unwrapProxy = unwrapProxy; | |
| + } | |
| + | |
| protected TypeFactory.TypeScope scope() { | |
| return scope; | |
| } | |
| @@ -476,6 +506,11 @@ public abstract class EntityType extends AbstractType implements AssociationType | |
| } | |
| } | |
| + /** | |
| + * @deprecated To be removed in 5. Removed as part of removing the notion of DOM entity-mode. | |
| + * See Jira issue: <a href="https://hibernate.onjira.com/browse/HHH-7771">HHH-7771</a> | |
| + */ | |
| + @Deprecated | |
| protected boolean isNotEmbedded(SessionImplementor session) { | |
| // return !isEmbeddedInXML; | |
| return false; | |
| diff --git a/hibernate-core/src/main/java/org/hibernate/type/IdentifierBagType.java b/hibernate-core/src/main/java/org/hibernate/type/IdentifierBagType.java | |
| index 306a815..2d34237 100644 | |
| --- a/hibernate-core/src/main/java/org/hibernate/type/IdentifierBagType.java | |
| +++ b/hibernate-core/src/main/java/org/hibernate/type/IdentifierBagType.java | |
| @@ -34,10 +34,19 @@ import org.hibernate.persister.collection.CollectionPersister; | |
| public class IdentifierBagType extends CollectionType { | |
| + /** | |
| + * @deprecated Use {@link #IdentifierBagType(org.hibernate.type.TypeFactory.TypeScope, String, String)} | |
| + * See Jira issue: <a href="https://hibernate.onjira.com/browse/HHH-7771">HHH-7771</a> | |
| + */ | |
| + @Deprecated | |
| public IdentifierBagType(TypeFactory.TypeScope typeScope, String role, String propertyRef, boolean isEmbeddedInXML) { | |
| super( typeScope, role, propertyRef, isEmbeddedInXML ); | |
| } | |
| + public IdentifierBagType(TypeFactory.TypeScope typeScope, String role, String propertyRef) { | |
| + super( typeScope, role, propertyRef ); | |
| + } | |
| + | |
| public PersistentCollection instantiate( | |
| SessionImplementor session, | |
| CollectionPersister persister, Serializable key) | |
| diff --git a/hibernate-core/src/main/java/org/hibernate/type/ListType.java b/hibernate-core/src/main/java/org/hibernate/type/ListType.java | |
| index fd825d9..b7d9824 100644 | |
| --- a/hibernate-core/src/main/java/org/hibernate/type/ListType.java | |
| +++ b/hibernate-core/src/main/java/org/hibernate/type/ListType.java | |
| @@ -34,10 +34,19 @@ import org.hibernate.persister.collection.CollectionPersister; | |
| public class ListType extends CollectionType { | |
| + /** | |
| + * @deprecated Use {@link #ListType(org.hibernate.type.TypeFactory.TypeScope, String, String)} | |
| + * See Jira issue: <a href="https://hibernate.onjira.com/browse/HHH-7771">HHH-7771</a> | |
| + */ | |
| + @Deprecated | |
| public ListType(TypeFactory.TypeScope typeScope, String role, String propertyRef, boolean isEmbeddedInXML) { | |
| super( typeScope, role, propertyRef, isEmbeddedInXML ); | |
| } | |
| + public ListType(TypeFactory.TypeScope typeScope, String role, String propertyRef) { | |
| + super( typeScope, role, propertyRef ); | |
| + } | |
| + | |
| public PersistentCollection instantiate(SessionImplementor session, CollectionPersister persister, Serializable key) { | |
| return new PersistentList(session); | |
| } | |
| diff --git a/hibernate-core/src/main/java/org/hibernate/type/ManyToOneType.java b/hibernate-core/src/main/java/org/hibernate/type/ManyToOneType.java | |
| index 446dbf3..c7cd51d 100644 | |
| --- a/hibernate-core/src/main/java/org/hibernate/type/ManyToOneType.java | |
| +++ b/hibernate-core/src/main/java/org/hibernate/type/ManyToOneType.java | |
| @@ -70,6 +70,12 @@ public class ManyToOneType extends EntityType { | |
| this( scope, referencedEntityName, null, lazy, true, false, false, false ); | |
| } | |
| + | |
| + /** | |
| + * @deprecated Use {@link #ManyToOneType(TypeFactory.TypeScope, String, String, boolean, boolean, boolean, boolean ) } instead. | |
| + * See Jira issue: <a href="https://hibernate.onjira.com/browse/HHH-7771">HHH-7771</a> | |
| + */ | |
| + @Deprecated | |
| public ManyToOneType( | |
| TypeFactory.TypeScope scope, | |
| String referencedEntityName, | |
| @@ -84,6 +90,19 @@ public class ManyToOneType extends EntityType { | |
| this.isLogicalOneToOne = isLogicalOneToOne; | |
| } | |
| + public ManyToOneType( | |
| + TypeFactory.TypeScope scope, | |
| + String referencedEntityName, | |
| + String uniqueKeyPropertyName, | |
| + boolean lazy, | |
| + boolean unwrapProxy, | |
| + boolean ignoreNotFound, | |
| + boolean isLogicalOneToOne) { | |
| + super( scope, referencedEntityName, uniqueKeyPropertyName, !lazy, unwrapProxy ); | |
| + this.ignoreNotFound = ignoreNotFound; | |
| + this.isLogicalOneToOne = isLogicalOneToOne; | |
| + } | |
| + | |
| protected boolean isNullable() { | |
| return ignoreNotFound; | |
| } | |
| diff --git a/hibernate-core/src/main/java/org/hibernate/type/MapType.java b/hibernate-core/src/main/java/org/hibernate/type/MapType.java | |
| index 38a737b..f0aa1d1 100644 | |
| --- a/hibernate-core/src/main/java/org/hibernate/type/MapType.java | |
| +++ b/hibernate-core/src/main/java/org/hibernate/type/MapType.java | |
| @@ -37,10 +37,19 @@ import org.hibernate.persister.collection.CollectionPersister; | |
| public class MapType extends CollectionType { | |
| + /** | |
| + * @deprecated Use {@link #MapType(TypeFactory.TypeScope, String, String ) } instead. | |
| + * See Jira issue: <a href="https://hibernate.onjira.com/browse/HHH-7771">HHH-7771</a> | |
| + */ | |
| + @Deprecated | |
| public MapType(TypeFactory.TypeScope typeScope, String role, String propertyRef, boolean isEmbeddedInXML) { | |
| super( typeScope, role, propertyRef, isEmbeddedInXML ); | |
| } | |
| + public MapType(TypeFactory.TypeScope typeScope, String role, String propertyRef) { | |
| + super( typeScope, role, propertyRef ); | |
| + } | |
| + | |
| public PersistentCollection instantiate(SessionImplementor session, CollectionPersister persister, Serializable key) { | |
| return new PersistentMap(session); | |
| } | |
| diff --git a/hibernate-core/src/main/java/org/hibernate/type/OneToOneType.java b/hibernate-core/src/main/java/org/hibernate/type/OneToOneType.java | |
| index ccf543c..838955b 100644 | |
| --- a/hibernate-core/src/main/java/org/hibernate/type/OneToOneType.java | |
| +++ b/hibernate-core/src/main/java/org/hibernate/type/OneToOneType.java | |
| @@ -47,6 +47,12 @@ public class OneToOneType extends EntityType { | |
| private final String propertyName; | |
| private final String entityName; | |
| + /** | |
| + * @deprecated Use {@link #OneToOneType(TypeFactory.TypeScope, String, ForeignKeyDirection, String, boolean, boolean, String, String)} | |
| + * instead. | |
| + * See Jira issue: <a href="https://hibernate.onjira.com/browse/HHH-7771">HHH-7771</a> | |
| + */ | |
| + @Deprecated | |
| public OneToOneType( | |
| TypeFactory.TypeScope scope, | |
| String referencedEntityName, | |
| @@ -62,7 +68,22 @@ public class OneToOneType extends EntityType { | |
| this.propertyName = propertyName; | |
| this.entityName = entityName; | |
| } | |
| - | |
| + | |
| + public OneToOneType( | |
| + TypeFactory.TypeScope scope, | |
| + String referencedEntityName, | |
| + ForeignKeyDirection foreignKeyType, | |
| + String uniqueKeyPropertyName, | |
| + boolean lazy, | |
| + boolean unwrapProxy, | |
| + String entityName, | |
| + String propertyName) { | |
| + super( scope, referencedEntityName, uniqueKeyPropertyName, !lazy, unwrapProxy ); | |
| + this.foreignKeyType = foreignKeyType; | |
| + this.propertyName = propertyName; | |
| + this.entityName = entityName; | |
| + } | |
| + | |
| public String getPropertyName() { | |
| return propertyName; | |
| } | |
| diff --git a/hibernate-core/src/main/java/org/hibernate/type/OrderedMapType.java b/hibernate-core/src/main/java/org/hibernate/type/OrderedMapType.java | |
| index 708be71..b00b1ea 100755 | |
| --- a/hibernate-core/src/main/java/org/hibernate/type/OrderedMapType.java | |
| +++ b/hibernate-core/src/main/java/org/hibernate/type/OrderedMapType.java | |
| @@ -36,11 +36,20 @@ public class OrderedMapType extends MapType { | |
| * @param role The collection role name. | |
| * @param propertyRef The property ref name. | |
| * @param isEmbeddedInXML Is this collection to embed itself in xml | |
| + * | |
| + * @deprecated Use {@link #OrderedMapType(TypeFactory.TypeScope, String, String)} instead. | |
| + * instead. | |
| + * See Jira issue: <a href="https://hibernate.onjira.com/browse/HHH-7771">HHH-7771</a> | |
| */ | |
| + @Deprecated | |
| public OrderedMapType(TypeFactory.TypeScope typeScope, String role, String propertyRef, boolean isEmbeddedInXML) { | |
| super( typeScope, role, propertyRef, isEmbeddedInXML ); | |
| } | |
| + public OrderedMapType(TypeFactory.TypeScope typeScope, String role, String propertyRef) { | |
| + super( typeScope, role, propertyRef ); | |
| + } | |
| + | |
| /** | |
| * {@inheritDoc} | |
| */ | |
| diff --git a/hibernate-core/src/main/java/org/hibernate/type/OrderedSetType.java b/hibernate-core/src/main/java/org/hibernate/type/OrderedSetType.java | |
| index 970b018..b9aae70 100755 | |
| --- a/hibernate-core/src/main/java/org/hibernate/type/OrderedSetType.java | |
| +++ b/hibernate-core/src/main/java/org/hibernate/type/OrderedSetType.java | |
| @@ -37,11 +37,20 @@ public class OrderedSetType extends SetType { | |
| * @param role The collection role name. | |
| * @param propertyRef The property ref name. | |
| * @param isEmbeddedInXML Is this collection to embed itself in xml | |
| + * | |
| + * @deprecated Use {@link #OrderedSetType(org.hibernate.type.TypeFactory.TypeScope, String, String)} | |
| + * instead. | |
| + * See Jira issue: <a href="https://hibernate.onjira.com/browse/HHH-7771">HHH-7771</a> | |
| */ | |
| + @Deprecated | |
| public OrderedSetType(TypeFactory.TypeScope typeScope, String role, String propertyRef, boolean isEmbeddedInXML) { | |
| super( typeScope, role, propertyRef, isEmbeddedInXML ); | |
| } | |
| + public OrderedSetType(TypeFactory.TypeScope typeScope, String role, String propertyRef) { | |
| + super( typeScope, role, propertyRef ); | |
| + } | |
| + | |
| /** | |
| * {@inheritDoc} | |
| */ | |
| diff --git a/hibernate-core/src/main/java/org/hibernate/type/SetType.java b/hibernate-core/src/main/java/org/hibernate/type/SetType.java | |
| index 52b03db..e1b6bd3 100644 | |
| --- a/hibernate-core/src/main/java/org/hibernate/type/SetType.java | |
| +++ b/hibernate-core/src/main/java/org/hibernate/type/SetType.java | |
| @@ -33,10 +33,19 @@ import org.hibernate.persister.collection.CollectionPersister; | |
| public class SetType extends CollectionType { | |
| + /** | |
| + * @deprecated Use {@link #SetType(org.hibernate.type.TypeFactory.TypeScope, String, String)} instead. | |
| + * See Jira issue: <a href="https://hibernate.onjira.com/browse/HHH-7771">HHH-7771</a> | |
| + */ | |
| + @Deprecated | |
| public SetType(TypeFactory.TypeScope typeScope, String role, String propertyRef, boolean isEmbeddedInXML) { | |
| super( typeScope, role, propertyRef, isEmbeddedInXML ); | |
| } | |
| + public SetType(TypeFactory.TypeScope typeScope, String role, String propertyRef) { | |
| + super( typeScope, role, propertyRef ); | |
| + } | |
| + | |
| public PersistentCollection instantiate(SessionImplementor session, CollectionPersister persister, Serializable key) { | |
| return new PersistentSet(session); | |
| } | |
| diff --git a/hibernate-core/src/main/java/org/hibernate/type/SortedMapType.java b/hibernate-core/src/main/java/org/hibernate/type/SortedMapType.java | |
| index 172bcb2..1087ea0 100644 | |
| --- a/hibernate-core/src/main/java/org/hibernate/type/SortedMapType.java | |
| +++ b/hibernate-core/src/main/java/org/hibernate/type/SortedMapType.java | |
| @@ -37,11 +37,22 @@ public class SortedMapType extends MapType { | |
| private final Comparator comparator; | |
| + /** | |
| + * @deprecated Use {@link #SortedMapType(org.hibernate.type.TypeFactory.TypeScope, String, String, java.util.Comparator)} | |
| + * instead. | |
| + * See Jira issue: <a href="https://hibernate.onjira.com/browse/HHH-7771">HHH-7771</a> | |
| + */ | |
| + @Deprecated | |
| public SortedMapType(TypeFactory.TypeScope typeScope, String role, String propertyRef, Comparator comparator, boolean isEmbeddedInXML) { | |
| super( typeScope, role, propertyRef, isEmbeddedInXML ); | |
| this.comparator = comparator; | |
| } | |
| + public SortedMapType(TypeFactory.TypeScope typeScope, String role, String propertyRef, Comparator comparator) { | |
| + super( typeScope, role, propertyRef ); | |
| + this.comparator = comparator; | |
| + } | |
| + | |
| public PersistentCollection instantiate(SessionImplementor session, CollectionPersister persister, Serializable key) { | |
| PersistentSortedMap map = new PersistentSortedMap(session); | |
| map.setComparator(comparator); | |
| diff --git a/hibernate-core/src/main/java/org/hibernate/type/SortedSetType.java b/hibernate-core/src/main/java/org/hibernate/type/SortedSetType.java | |
| index 8e78e05..eeb6ff4 100644 | |
| --- a/hibernate-core/src/main/java/org/hibernate/type/SortedSetType.java | |
| +++ b/hibernate-core/src/main/java/org/hibernate/type/SortedSetType.java | |
| @@ -35,11 +35,22 @@ import org.hibernate.persister.collection.CollectionPersister; | |
| public class SortedSetType extends SetType { | |
| private final Comparator comparator; | |
| + /** | |
| + * @deprecated Use {@link #SortedSetType(org.hibernate.type.TypeFactory.TypeScope, String, String, java.util.Comparator)} | |
| + * instead. | |
| + * See Jira issue: <a href="https://hibernate.onjira.com/browse/HHH-7771">HHH-7771</a> | |
| + */ | |
| + @Deprecated | |
| public SortedSetType(TypeFactory.TypeScope typeScope, String role, String propertyRef, Comparator comparator, boolean isEmbeddedInXML) { | |
| super( typeScope, role, propertyRef, isEmbeddedInXML ); | |
| this.comparator = comparator; | |
| } | |
| + public SortedSetType(TypeFactory.TypeScope typeScope, String role, String propertyRef, Comparator comparator) { | |
| + super( typeScope, role, propertyRef ); | |
| + this.comparator = comparator; | |
| + } | |
| + | |
| public PersistentCollection instantiate(SessionImplementor session, CollectionPersister persister, Serializable key) { | |
| PersistentSortedSet set = new PersistentSortedSet(session); | |
| set.setComparator(comparator); | |
| diff --git a/hibernate-core/src/main/java/org/hibernate/type/Type.java b/hibernate-core/src/main/java/org/hibernate/type/Type.java | |
| index d2b3aa0..3a75ac8 100644 | |
| --- a/hibernate-core/src/main/java/org/hibernate/type/Type.java | |
| +++ b/hibernate-core/src/main/java/org/hibernate/type/Type.java | |
| @@ -166,8 +166,13 @@ public interface Type extends Serializable { | |
| * @return The java type class handled by this type. | |
| */ | |
| public Class getReturnedClass(); | |
| - | |
| + | |
| + /** | |
| + * @deprecated To be removed in 5. Removed as part of removing the notion of DOM entity-mode. | |
| + * See Jira issue: <a href="https://hibernate.onjira.com/browse/HHH-7771">HHH-7771</a> | |
| + */ | |
| @SuppressWarnings( {"UnusedDeclaration"}) | |
| + @Deprecated | |
| public boolean isXMLElement(); | |
| /** | |
| @@ -392,7 +397,11 @@ public interface Type extends Serializable { | |
| * @param factory The session factory | |
| * | |
| * @throws HibernateException An error from Hibernate | |
| + * | |
| + * @deprecated To be removed in 5. Removed as part of removing the notion of DOM entity-mode. | |
| + * See Jira issue: <a href="https://hibernate.onjira.com/browse/HHH-7771">HHH-7771</a> | |
| */ | |
| + @Deprecated | |
| public void setToXMLNode(Node node, Object value, SessionFactoryImplementor factory) | |
| throws HibernateException; | |
| @@ -405,7 +414,11 @@ public interface Type extends Serializable { | |
| * @return an instance of the {@link #getReturnedClass() mapped class} | |
| * | |
| * @throws HibernateException An error from Hibernate | |
| + * | |
| + * @deprecated To be removed in 5. Removed as part of removing the notion of DOM entity-mode. | |
| + * See Jira issue: <a href="https://hibernate.onjira.com/browse/HHH-7771">HHH-7771</a> | |
| */ | |
| + @Deprecated | |
| public Object fromXMLNode(Node xml, Mapping factory) throws HibernateException; | |
| /** | |
| diff --git a/hibernate-core/src/main/java/org/hibernate/type/TypeFactory.java b/hibernate-core/src/main/java/org/hibernate/type/TypeFactory.java | |
| index 5086bd8..1312513 100644 | |
| --- a/hibernate-core/src/main/java/org/hibernate/type/TypeFactory.java | |
| +++ b/hibernate-core/src/main/java/org/hibernate/type/TypeFactory.java | |
| @@ -155,6 +155,12 @@ public final class TypeFactory implements Serializable { | |
| } | |
| } | |
| + /** | |
| + * @deprecated Use {@link #customCollection(String, java.util.Properties, String, String)} | |
| + * instead. | |
| + * See Jira issue: <a href="https://hibernate.onjira.com/browse/HHH-7771">HHH-7771</a> | |
| + */ | |
| + @Deprecated | |
| public CollectionType customCollection( | |
| String typeName, | |
| Properties typeParameters, | |
| @@ -175,6 +181,25 @@ public final class TypeFactory implements Serializable { | |
| return result; | |
| } | |
| + public CollectionType customCollection( | |
| + String typeName, | |
| + Properties typeParameters, | |
| + String role, | |
| + String propertyRef) { | |
| + Class typeClass; | |
| + try { | |
| + typeClass = ReflectHelper.classForName( typeName ); | |
| + } | |
| + catch ( ClassNotFoundException cnfe ) { | |
| + throw new MappingException( "user collection type class not found: " + typeName, cnfe ); | |
| + } | |
| + CustomCollectionType result = new CustomCollectionType( typeScope, typeClass, role, propertyRef ); | |
| + if ( typeParameters != null ) { | |
| + injectParameters( result.getUserType(), typeParameters ); | |
| + } | |
| + return result; | |
| + } | |
| + | |
| public CustomType custom(Class<UserType> typeClass, Properties parameters) { | |
| return custom( typeClass, parameters, typeScope ); | |
| } | |
| @@ -209,6 +234,12 @@ public final class TypeFactory implements Serializable { | |
| // one-to-one type builders ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| + /** | |
| + * @deprecated Use {@link #oneToOne(String, ForeignKeyDirection, String, boolean, boolean, String, String)} | |
| + * instead. | |
| + * See Jira issue: <a href="https://hibernate.onjira.com/browse/HHH-7771">HHH-7771</a> | |
| + */ | |
| + @Deprecated | |
| public EntityType oneToOne( | |
| String persistentClass, | |
| ForeignKeyDirection foreignKeyType, | |
| @@ -222,6 +253,18 @@ public final class TypeFactory implements Serializable { | |
| lazy, unwrapProxy, isEmbeddedInXML, entityName, propertyName ); | |
| } | |
| + public EntityType oneToOne( | |
| + String persistentClass, | |
| + ForeignKeyDirection foreignKeyType, | |
| + String uniqueKeyPropertyName, | |
| + boolean lazy, | |
| + boolean unwrapProxy, | |
| + String entityName, | |
| + String propertyName) { | |
| + return new OneToOneType( typeScope, persistentClass, foreignKeyType, uniqueKeyPropertyName, | |
| + lazy, unwrapProxy, entityName, propertyName ); | |
| + } | |
| + | |
| public EntityType specialOneToOne( | |
| String persistentClass, | |
| ForeignKeyDirection foreignKeyType, | |
| @@ -245,6 +288,12 @@ public final class TypeFactory implements Serializable { | |
| return new ManyToOneType( typeScope, persistentClass, lazy ); | |
| } | |
| + /** | |
| + * @deprecated Use {@link #manyToOne(String, String, boolean, boolean, boolean, boolean)} | |
| + * instead. | |
| + * See Jira issue: <a href="https://hibernate.onjira.com/browse/HHH-7771">HHH-7771</a> | |
| + */ | |
| + @Deprecated | |
| public EntityType manyToOne( | |
| String persistentClass, | |
| String uniqueKeyPropertyName, | |
| @@ -265,49 +314,155 @@ public final class TypeFactory implements Serializable { | |
| ); | |
| } | |
| + public EntityType manyToOne( | |
| + String persistentClass, | |
| + String uniqueKeyPropertyName, | |
| + boolean lazy, | |
| + boolean unwrapProxy, | |
| + boolean ignoreNotFound, | |
| + boolean isLogicalOneToOne) { | |
| + return new ManyToOneType( | |
| + typeScope, | |
| + persistentClass, | |
| + uniqueKeyPropertyName, | |
| + lazy, | |
| + unwrapProxy, | |
| + ignoreNotFound, | |
| + isLogicalOneToOne | |
| + ); | |
| + } | |
| // collection type builders ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| + /** | |
| + * @deprecated Use {@link #array(String, String, Class)} instead. | |
| + * See Jira issue: <a href="https://hibernate.onjira.com/browse/HHH-7771">HHH-7771</a> | |
| + */ | |
| + @Deprecated | |
| public CollectionType array(String role, String propertyRef, boolean embedded, Class elementClass) { | |
| return new ArrayType( typeScope, role, propertyRef, elementClass, embedded ); | |
| } | |
| + public CollectionType array(String role, String propertyRef, Class elementClass) { | |
| + return new ArrayType( typeScope, role, propertyRef, elementClass ); | |
| + } | |
| + | |
| + /** | |
| + * @deprecated Use {@link #list(String, String)} instead. | |
| + * See Jira issue: <a href="https://hibernate.onjira.com/browse/HHH-7771">HHH-7771</a> | |
| + */ | |
| + @Deprecated | |
| public CollectionType list(String role, String propertyRef, boolean embedded) { | |
| return new ListType( typeScope, role, propertyRef, embedded ); | |
| } | |
| + public CollectionType list(String role, String propertyRef) { | |
| + return new ListType( typeScope, role, propertyRef ); | |
| + } | |
| + | |
| + /** | |
| + * @deprecated Use {@link #bag(String, String)} instead. | |
| + * See Jira issue: <a href="https://hibernate.onjira.com/browse/HHH-7771">HHH-7771</a> | |
| + */ | |
| + @Deprecated | |
| public CollectionType bag(String role, String propertyRef, boolean embedded) { | |
| return new BagType( typeScope, role, propertyRef, embedded ); | |
| } | |
| + public CollectionType bag(String role, String propertyRef) { | |
| + return new BagType( typeScope, role, propertyRef ); | |
| + } | |
| + | |
| + /** | |
| + * @deprecated Use {@link #idbag(String, String)} instead. | |
| + * See Jira issue: <a href="https://hibernate.onjira.com/browse/HHH-7771">HHH-7771</a> | |
| + */ | |
| + @Deprecated | |
| public CollectionType idbag(String role, String propertyRef, boolean embedded) { | |
| return new IdentifierBagType( typeScope, role, propertyRef, embedded ); | |
| } | |
| + public CollectionType idbag(String role, String propertyRef) { | |
| + return new IdentifierBagType( typeScope, role, propertyRef ); | |
| + } | |
| + | |
| + /** | |
| + * @deprecated Use {@link #map(String, String)} instead. | |
| + * See Jira issue: <a href="https://hibernate.onjira.com/browse/HHH-7771">HHH-7771</a> | |
| + */ | |
| + @Deprecated | |
| public CollectionType map(String role, String propertyRef, boolean embedded) { | |
| return new MapType( typeScope, role, propertyRef, embedded ); | |
| } | |
| + public CollectionType map(String role, String propertyRef) { | |
| + return new MapType( typeScope, role, propertyRef ); | |
| + } | |
| + | |
| + /** | |
| + * @deprecated Use {@link #orderedMap(String, String)} instead. | |
| + * See Jira issue: <a href="https://hibernate.onjira.com/browse/HHH-7771">HHH-7771</a> | |
| + */ | |
| + @Deprecated | |
| public CollectionType orderedMap(String role, String propertyRef, boolean embedded) { | |
| return new OrderedMapType( typeScope, role, propertyRef, embedded ); | |
| } | |
| + public CollectionType orderedMap(String role, String propertyRef) { | |
| + return new OrderedMapType( typeScope, role, propertyRef ); | |
| + } | |
| + | |
| + /** | |
| + * @deprecated Use {@link #sortedMap(String, String, java.util.Comparator)} instead. | |
| + * See Jira issue: <a href="https://hibernate.onjira.com/browse/HHH-7771">HHH-7771</a> | |
| + */ | |
| + @Deprecated | |
| public CollectionType sortedMap(String role, String propertyRef, boolean embedded, Comparator comparator) { | |
| return new SortedMapType( typeScope, role, propertyRef, comparator, embedded ); | |
| } | |
| + public CollectionType sortedMap(String role, String propertyRef, Comparator comparator) { | |
| + return new SortedMapType( typeScope, role, propertyRef, comparator ); | |
| + } | |
| + | |
| + /** | |
| + * @deprecated Use {@link #set(String, String)} instead. | |
| + * See Jira issue: <a href="https://hibernate.onjira.com/browse/HHH-7771">HHH-7771</a> | |
| + */ | |
| + @Deprecated | |
| public CollectionType set(String role, String propertyRef, boolean embedded) { | |
| return new SetType( typeScope, role, propertyRef, embedded ); | |
| } | |
| + public CollectionType set(String role, String propertyRef) { | |
| + return new SetType( typeScope, role, propertyRef ); | |
| + } | |
| + | |
| + /** | |
| + * @deprecated Use {@link #orderedSet(String, String)} instead. | |
| + * See Jira issue: <a href="https://hibernate.onjira.com/browse/HHH-7771">HHH-7771</a> | |
| + */ | |
| + @Deprecated | |
| public CollectionType orderedSet(String role, String propertyRef, boolean embedded) { | |
| return new OrderedSetType( typeScope, role, propertyRef, embedded ); | |
| } | |
| + public CollectionType orderedSet(String role, String propertyRef) { | |
| + return new OrderedSetType( typeScope, role, propertyRef ); | |
| + } | |
| + | |
| + /** | |
| + * @deprecated Use {@link #sortedSet(String, String, java.util.Comparator)} instead. | |
| + * See Jira issue: <a href="https://hibernate.onjira.com/browse/HHH-7771">HHH-7771</a> | |
| + */ | |
| + @Deprecated | |
| public CollectionType sortedSet(String role, String propertyRef, boolean embedded, Comparator comparator) { | |
| return new SortedSetType( typeScope, role, propertyRef, comparator, embedded ); | |
| } | |
| + public CollectionType sortedSet(String role, String propertyRef, Comparator comparator) { | |
| + return new SortedSetType( typeScope, role, propertyRef, comparator ); | |
| + } | |
| // component type builders ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment