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

This commit is contained in:
Gail Badner 2012-12-12 02:29:23 -08:00 committed by Strong Liu
parent c6ef23a51c
commit 005cc6cd2a
21 changed files with 413 additions and 10 deletions

View File

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

View File

@ -150,11 +150,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;
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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}
*/

View File

@ -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}
*/

View File

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

View File

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

View File

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

View File

@ -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;
/**

View File

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