diff --git a/hibernate-core/src/main/java/org/hibernate/boot/model/source/internal/hbm/ModelBinder.java b/hibernate-core/src/main/java/org/hibernate/boot/model/source/internal/hbm/ModelBinder.java
index 19bb05c809..238d816183 100644
--- a/hibernate-core/src/main/java/org/hibernate/boot/model/source/internal/hbm/ModelBinder.java
+++ b/hibernate-core/src/main/java/org/hibernate/boot/model/source/internal/hbm/ModelBinder.java
@@ -2115,7 +2115,6 @@ public class ModelBinder {
if ( oneToOneSource.isEmbedXml() == Boolean.TRUE ) {
DeprecationLogger.DEPRECATION_LOGGER.logDeprecationOfEmbedXmlSupport();
}
- oneToOneBinding.setEmbedded( oneToOneSource.isEmbedXml() != Boolean.FALSE );
if ( StringHelper.isNotEmpty( oneToOneSource.getExplicitForeignKeyName() ) ) {
oneToOneBinding.setForeignKeyName( oneToOneSource.getExplicitForeignKeyName() );
@@ -2234,7 +2233,6 @@ public class ModelBinder {
if ( manyToOneSource.isEmbedXml() == Boolean.TRUE ) {
DeprecationLogger.DEPRECATION_LOGGER.logDeprecationOfEmbedXmlSupport();
}
- manyToOneBinding.setEmbedded( manyToOneSource.isEmbedXml() != Boolean.FALSE );
manyToOneBinding.setIgnoreNotFound( manyToOneSource.isIgnoreNotFound() );
diff --git a/hibernate-core/src/main/java/org/hibernate/cfg/OneToOneSecondPass.java b/hibernate-core/src/main/java/org/hibernate/cfg/OneToOneSecondPass.java
index 35e1b1803b..9bbd3157f7 100644
--- a/hibernate-core/src/main/java/org/hibernate/cfg/OneToOneSecondPass.java
+++ b/hibernate-core/src/main/java/org/hibernate/cfg/OneToOneSecondPass.java
@@ -176,7 +176,6 @@ public class OneToOneSecondPass implements SecondPass {
//FIXME use ignore not found here
manyToOne.setIgnoreNotFound( ignoreNotFound );
manyToOne.setCascadeDeleteEnabled( value.isCascadeDeleteEnabled() );
- manyToOne.setEmbedded( value.isEmbedded() );
manyToOne.setFetchMode( value.getFetchMode() );
manyToOne.setLazy( value.isLazy() );
manyToOne.setReferencedEntityName( value.getReferencedEntityName() );
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 4f92d78464..fb7c0230af 100644
--- a/hibernate-core/src/main/java/org/hibernate/mapping/Collection.java
+++ b/hibernate-core/src/main/java/org/hibernate/mapping/Collection.java
@@ -661,29 +661,10 @@ 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: HHH-7771
- */
- @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: HHH-7771
- */
- @Deprecated
- public void setEmbedded(boolean embedded) {
- this.embedded = embedded;
- }
-
public boolean isSubselectLoadable() {
return subselectLoadable;
}
-
public void setSubselectLoadable(boolean subqueryLoadable) {
this.subselectLoadable = subqueryLoadable;
}
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 3b1da02065..a462df9795 100644
--- a/hibernate-core/src/main/java/org/hibernate/mapping/OneToMany.java
+++ b/hibernate-core/src/main/java/org/hibernate/mapping/OneToMany.java
@@ -142,24 +142,6 @@ public class OneToMany implements Value {
throw new UnsupportedOperationException();
}
- /**
- * @deprecated To be removed in 5. Removed as part of removing the notion of DOM entity-mode.
- * See Jira issue: HHH-7771
- */
- @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: HHH-7771
- */
- @Deprecated
- public void setEmbedded(boolean embedded) {
- this.embedded = embedded;
- }
-
public boolean isIgnoreNotFound() {
return ignoreNotFound;
}
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 39890c294f..2351c4e157 100644
--- a/hibernate-core/src/main/java/org/hibernate/mapping/ToOne.java
+++ b/hibernate-core/src/main/java/org/hibernate/mapping/ToOne.java
@@ -76,24 +76,6 @@ public abstract class ToOne extends SimpleValue implements Fetchable {
return visitor.accept(this);
}
- /**
- * @deprecated To be removed in 5. Removed as part of removing the notion of DOM entity-mode.
- * See Jira issue: HHH-7771
- */
- @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: HHH-7771
- */
- @Deprecated
- public void setEmbedded(boolean embedded) {
- this.embedded = embedded;
- }
-
public boolean isValid(Mapping mapping) throws MappingException {
if (referencedEntityName==null) {
throw new MappingException("association must specify the referenced entity");
diff --git a/hibernate-core/src/main/java/org/hibernate/persister/entity/DiscriminatorType.java b/hibernate-core/src/main/java/org/hibernate/persister/entity/DiscriminatorType.java
index 60268dad47..c35fb7cd6a 100644
--- a/hibernate-core/src/main/java/org/hibernate/persister/entity/DiscriminatorType.java
+++ b/hibernate-core/src/main/java/org/hibernate/persister/entity/DiscriminatorType.java
@@ -137,13 +137,4 @@ public class DiscriminatorType extends AbstractType {
public int getColumnSpan(Mapping mapping) throws MappingException {
return underlyingType.getColumnSpan( mapping );
}
-
- public void setToXMLNode(Node node, Object value, SessionFactoryImplementor factory) throws HibernateException {
- }
-
- public Object fromXMLNode(Node xml, Mapping factory) throws HibernateException {
- // todo : ???
- return null;
- }
-
}
diff --git a/hibernate-core/src/main/java/org/hibernate/type/AbstractStandardBasicType.java b/hibernate-core/src/main/java/org/hibernate/type/AbstractStandardBasicType.java
index e203ca19a8..41d1cc45b9 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/AbstractStandardBasicType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/AbstractStandardBasicType.java
@@ -273,15 +273,6 @@ public abstract class AbstractStandardBasicType
return javaTypeDescriptor.extractLoggableRepresentation( (T) value );
}
- @SuppressWarnings({ "unchecked" })
- public final void setToXMLNode(Node node, Object value, SessionFactoryImplementor factory) {
- node.setText( toString( (T) value ) );
- }
-
- public final Object fromXMLNode(Node xml, Mapping factory) {
- return fromString( xml.getText() );
- }
-
public final boolean isMutable() {
return getMutabilityPlan().isMutable();
}
diff --git a/hibernate-core/src/main/java/org/hibernate/type/AbstractType.java b/hibernate-core/src/main/java/org/hibernate/type/AbstractType.java
index 493d3de649..86d7632853 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/AbstractType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/AbstractType.java
@@ -45,10 +45,6 @@ public abstract class AbstractType implements Type {
return false;
}
- public boolean isXMLElement() {
- return false;
- }
-
public int compare(Object x, Object y) {
return ( (Comparable) x ).compareTo(y);
}
@@ -128,16 +124,6 @@ public abstract class AbstractType implements Type {
return getHashCode(x );
}
- protected static void replaceNode(Node container, Element value) {
- if ( container!=value ) { //not really necessary, I guess...
- Element parent = container.getParent();
- container.detach();
- value.setName( container.getName() );
- value.detach();
- parent.add(value);
- }
- }
-
public Type getSemiResolvedType(SessionFactoryImplementor factory) {
return this;
}
diff --git a/hibernate-core/src/main/java/org/hibernate/type/AnyType.java b/hibernate-core/src/main/java/org/hibernate/type/AnyType.java
index 5b931cfb0b..67b951c50f 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/AnyType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/AnyType.java
@@ -361,18 +361,6 @@ public class AnyType extends AbstractType implements CompositeType, AssociationT
throw new UnsupportedOperationException( "any mappings may not form part of a property-ref" );
}
- @Override
- public void setToXMLNode(Node xml, Object value, SessionFactoryImplementor factory) {
- throw new UnsupportedOperationException("any types cannot be stringified");
- }
-
- @Override
- public Object fromXMLNode(Node xml, Mapping factory) throws HibernateException {
- throw new UnsupportedOperationException();
- }
-
-
-
// CompositeType implementation ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@Override
@@ -474,11 +462,6 @@ public class AnyType extends AbstractType implements CompositeType, AssociationT
return false;
}
- @Override
- public boolean isEmbeddedInXML() {
- return false;
- }
-
@Override
public Joinable getAssociatedJoinable(SessionFactoryImplementor factory) {
throw new UnsupportedOperationException("any types do not have a unique referenced persister");
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 675c3295d5..f6df74c276 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/ArrayType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/ArrayType.java
@@ -30,17 +30,6 @@ 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: HHH-7771
- */
- @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;
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 983176037e..9ff06e14c7 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/AssociationType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/AssociationType.java
@@ -75,17 +75,4 @@ 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: HHH-7771
- */
- @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 40874c4345..5e1d13d7b8 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/BagType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/BagType.java
@@ -18,15 +18,6 @@ import org.hibernate.persister.collection.CollectionPersister;
public class BagType extends CollectionType {
- /**
- * @deprecated Use {@link #BagType(TypeFactory.TypeScope, String, String )}
- * See Jira issue: HHH-7771
- */
- @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 );
}
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 a9ad4a1b7f..818e321ca5 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/CollectionType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/CollectionType.java
@@ -65,30 +65,11 @@ public abstract class CollectionType extends AbstractType implements Association
private final TypeFactory.TypeScope typeScope;
private final String role;
private final String foreignKeyPropertyName;
- private final boolean isEmbeddedInXML;
-
- /**
- * @deprecated Use {@link #CollectionType(TypeFactory.TypeScope, String, String)} instead
- * See Jira issue: HHH-7771
- */
- @Deprecated
- public CollectionType(TypeFactory.TypeScope typeScope, String role, String foreignKeyPropertyName, boolean isEmbeddedInXML) {
- this.typeScope = typeScope;
- this.role = role;
- this.foreignKeyPropertyName = foreignKeyPropertyName;
- this.isEmbeddedInXML = isEmbeddedInXML;
- }
public CollectionType(TypeFactory.TypeScope typeScope, String role, String foreignKeyPropertyName) {
this.typeScope = typeScope;
this.role = role;
this.foreignKeyPropertyName = foreignKeyPropertyName;
- this.isEmbeddedInXML = true;
- }
-
- @Override
- public boolean isEmbeddedInXML() {
- return isEmbeddedInXML;
}
public String getRole() {
@@ -795,27 +776,6 @@ public abstract class CollectionType extends AbstractType implements Association
return foreignKeyPropertyName;
}
- @Override
- public boolean isXMLElement() {
- return true;
- }
-
- @Override
- public Object fromXMLNode(Node xml, Mapping factory) throws HibernateException {
- return xml;
- }
-
- @Override
- public void setToXMLNode(Node node, Object value, SessionFactoryImplementor factory)
- throws HibernateException {
- if ( !isEmbeddedInXML ) {
- node.detach();
- }
- else {
- replaceNode( node, (Element) value );
- }
- }
-
/**
* We always need to dirty check the collection because we sometimes
* need to incremement version number of owner and also because of
diff --git a/hibernate-core/src/main/java/org/hibernate/type/ComponentType.java b/hibernate-core/src/main/java/org/hibernate/type/ComponentType.java
index b53ac07a3f..7e05804258 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/ComponentType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/ComponentType.java
@@ -702,21 +702,6 @@ public class ComponentType extends AbstractType implements CompositeType, Proced
return propertyNullability;
}
- @Override
- public boolean isXMLElement() {
- return true;
- }
-
- @Override
- public Object fromXMLNode(Node xml, Mapping factory) throws HibernateException {
- return xml;
- }
-
- @Override
- public void setToXMLNode(Node node, Object value, SessionFactoryImplementor factory) throws HibernateException {
- replaceNode( node, (Element) value );
- }
-
@Override
public boolean[] toColumnNullness(Object value, Mapping mapping) {
boolean[] result = new boolean[getColumnSpan( mapping )];
diff --git a/hibernate-core/src/main/java/org/hibernate/type/CompositeCustomType.java b/hibernate-core/src/main/java/org/hibernate/type/CompositeCustomType.java
index 6c7f528a8e..c77d3446e1 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/CompositeCustomType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/CompositeCustomType.java
@@ -254,15 +254,6 @@ public class CompositeCustomType extends AbstractType implements CompositeType,
return null;
}
- public Object fromXMLNode(Node xml, Mapping factory) throws HibernateException {
- return xml;
- }
-
- public void setToXMLNode(Node node, Object value, SessionFactoryImplementor factory)
- throws HibernateException {
- replaceNode( node, (Element) value );
- }
-
public boolean[] toColumnNullness(Object value, Mapping mapping) {
boolean[] result = new boolean[getColumnSpan( mapping )];
if ( value == null ) {
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 b9e03cbcfd..20747bb4f7 100755
--- a/hibernate-core/src/main/java/org/hibernate/type/CustomCollectionType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/CustomCollectionType.java
@@ -31,22 +31,6 @@ 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: HHH-7771
- */
- @Deprecated
- public CustomCollectionType(
- TypeFactory.TypeScope typeScope,
- Class userTypeClass,
- String role,
- String foreignKeyPropertyName,
- boolean isEmbeddedInXML) {
- super( typeScope, role, foreignKeyPropertyName, isEmbeddedInXML );
- userType = createUserCollectionType( userTypeClass );
- customLogging = LoggableUserType.class.isAssignableFrom( userTypeClass );
- }
-
public CustomCollectionType(
TypeFactory.TypeScope typeScope,
Class userTypeClass,
diff --git a/hibernate-core/src/main/java/org/hibernate/type/CustomType.java b/hibernate-core/src/main/java/org/hibernate/type/CustomType.java
index c0a1983d84..d90ff10ecb 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/CustomType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/CustomType.java
@@ -190,15 +190,6 @@ public class CustomType
return ( (UserVersionType) userType ).seed( session );
}
- public Object fromXMLNode(Node xml, Mapping factory) throws HibernateException {
- return fromXMLString( xml.getText(), factory );
- }
-
- public void setToXMLNode(Node node, Object value, SessionFactoryImplementor factory)
- throws HibernateException {
- node.setText( toXMLString(value, factory) );
- }
-
public String toLoggableString(Object value, SessionFactoryImplementor factory)
throws HibernateException {
if ( value == null ) {
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 174d077add..17419aa996 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/EntityType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/EntityType.java
@@ -13,7 +13,6 @@ import java.util.Map;
import java.util.Set;
import org.hibernate.AssertionFailure;
-import org.hibernate.EntityMode;
import org.hibernate.HibernateException;
import org.hibernate.MappingException;
import org.hibernate.engine.internal.ForeignKeys;
@@ -27,10 +26,6 @@ import org.hibernate.persister.entity.EntityPersister;
import org.hibernate.persister.entity.Joinable;
import org.hibernate.persister.entity.UniqueKeyLoadable;
import org.hibernate.proxy.HibernateProxy;
-import org.hibernate.tuple.ElementWrapper;
-
-import org.dom4j.Element;
-import org.dom4j.Node;
/**
* Base for types which map associations to persistent entities.
@@ -42,7 +37,6 @@ public abstract class EntityType extends AbstractType implements AssociationType
private final TypeFactory.TypeScope scope;
private final String associatedEntityName;
protected final String uniqueKeyPropertyName;
- protected final boolean isEmbeddedInXML;
private final boolean eager;
private final boolean unwrapProxy;
private final boolean referenceToPrimaryKey;
@@ -64,33 +58,6 @@ public abstract class EntityType extends AbstractType implements AssociationType
private transient Class returnedClass;
- /**
- * 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 isEmbeddedInXML Should values of this mapping be embedded in XML modes?
- * @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(org.hibernate.type.TypeFactory.TypeScope, String, boolean, String, boolean, boolean)} instead.
- * See Jira issue: HHH-7771
- */
- @Deprecated
- protected EntityType(
- TypeFactory.TypeScope scope,
- String entityName,
- String uniqueKeyPropertyName,
- boolean eager,
- boolean isEmbeddedInXML,
- boolean unwrapProxy) {
- this( scope, entityName, uniqueKeyPropertyName == null, uniqueKeyPropertyName, eager, unwrapProxy );
- }
-
/**
* Constructs the requested entity type mapping.
*
@@ -138,7 +105,6 @@ public abstract class EntityType extends AbstractType implements AssociationType
this.scope = scope;
this.associatedEntityName = entityName;
this.uniqueKeyPropertyName = uniqueKeyPropertyName;
- this.isEmbeddedInXML = true;
this.eager = eager;
this.unwrapProxy = unwrapProxy;
this.referenceToPrimaryKey = referenceToPrimaryKey;
@@ -429,37 +395,6 @@ public abstract class EntityType extends AbstractType implements AssociationType
.isEqual( xid, yid, factory );
}
- @Override
- public boolean isEmbeddedInXML() {
- return isEmbeddedInXML;
- }
-
- @Override
- public boolean isXMLElement() {
- return isEmbeddedInXML;
- }
-
- @Override
- public Object fromXMLNode(Node xml, Mapping factory) throws HibernateException {
- if ( !isEmbeddedInXML ) {
- return getIdentifierType( factory ).fromXMLNode( xml, factory );
- }
- else {
- return xml;
- }
- }
-
- @Override
- public void setToXMLNode(Node node, Object value, SessionFactoryImplementor factory) throws HibernateException {
- if ( !isEmbeddedInXML ) {
- getIdentifierType( factory ).setToXMLNode( node, value, factory );
- }
- else {
- Element elt = (Element) value;
- replaceNode( node, new ElementWrapper( elt ) );
- }
- }
-
@Override
public String getOnCondition(String alias, SessionFactoryImplementor factory, Map enabledFilters) {
return getOnCondition( alias, factory, enabledFilters, null );
@@ -484,10 +419,6 @@ public abstract class EntityType extends AbstractType implements AssociationType
*/
@Override
public Object resolve(Object value, SessionImplementor session, Object owner) throws HibernateException {
- if ( isNotEmbedded( session ) ) {
- return value;
- }
-
if ( value != null && !isNull( owner, session ) ) {
if ( isReferenceToPrimaryKey() ) {
return resolveIdentifier( (Serializable) value, session );
@@ -520,10 +451,6 @@ public abstract class EntityType extends AbstractType implements AssociationType
}
protected final Object getIdentifier(Object value, SessionImplementor session) throws HibernateException {
- if ( isNotEmbedded( session ) ) {
- return value;
- }
-
if ( isReferenceToPrimaryKey() || uniqueKeyPropertyName == null ) {
return ForeignKeys.getEntityIdentifierIfNotUnsaved(
getAssociatedEntityName(),
@@ -549,16 +476,6 @@ 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: HHH-7771
- */
- @Deprecated
- protected boolean isNotEmbedded(SessionImplementor session) {
-// return !isEmbeddedInXML;
- return false;
- }
-
/**
* Generate a loggable representation of an instance of the value mapped by this type.
*
@@ -579,15 +496,8 @@ public abstract class EntityType extends AbstractType implements AssociationType
StringBuilder result = new StringBuilder().append( associatedEntityName );
if ( persister.hasIdentifierProperty() ) {
- final EntityMode entityMode = persister.getEntityMode();
final Serializable id;
- if ( entityMode == null ) {
- if ( isEmbeddedInXML ) {
- throw new ClassCastException( value.getClass().getName() );
- }
- id = (Serializable) value;
- }
- else if ( value instanceof HibernateProxy ) {
+ if ( value instanceof HibernateProxy ) {
HibernateProxy proxy = (HibernateProxy) value;
id = proxy.getHibernateLazyInitializer().getIdentifier();
}
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 56f5befce7..7a8d8b3ba8 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/IdentifierBagType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/IdentifierBagType.java
@@ -17,15 +17,6 @@ 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: HHH-7771
- */
- @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 );
}
@@ -51,9 +42,3 @@ public class IdentifierBagType extends CollectionType {
}
}
-
-
-
-
-
-
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 8f3aaa9aa1..2503a1daaa 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/ListType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/ListType.java
@@ -17,15 +17,6 @@ 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: HHH-7771
- */
- @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 );
}
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 952adb773f..9c1ca0dc79 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/ManyToOneType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/ManyToOneType.java
@@ -70,22 +70,6 @@ public class ManyToOneType extends EntityType {
this( scope, referencedEntityName, uniqueKeyPropertyName == null, uniqueKeyPropertyName, lazy, unwrapProxy, ignoreNotFound, isLogicalOneToOne );
}
- /**
- * @deprecated Use {@link #ManyToOneType(TypeFactory.TypeScope, String, boolean, String, boolean, boolean, boolean, boolean ) } instead.
- * See Jira issue: HHH-7771
- */
- @Deprecated
- public ManyToOneType(
- TypeFactory.TypeScope scope,
- String referencedEntityName,
- String uniqueKeyPropertyName,
- boolean lazy,
- boolean unwrapProxy,
- boolean ignoreNotFound,
- boolean isLogicalOneToOne) {
- this( scope, referencedEntityName, uniqueKeyPropertyName == null, uniqueKeyPropertyName, lazy, unwrapProxy, ignoreNotFound, isLogicalOneToOne );
- }
-
public ManyToOneType(
TypeFactory.TypeScope scope,
String referencedEntityName,
@@ -230,10 +214,6 @@ public class ManyToOneType extends EntityType {
SessionImplementor session,
Object owner) throws HibernateException {
- if ( isNotEmbedded( session ) ) {
- return getIdentifierType( session ).disassemble( value, session, owner );
- }
-
if ( value == null ) {
return null;
}
@@ -265,10 +245,6 @@ public class ManyToOneType extends EntityType {
Serializable id = assembleId( oid, session );
- if ( isNotEmbedded( session ) ) {
- return id;
- }
-
if ( id == null ) {
return null;
}
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 988b54589e..9ff55c9daf 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/MapType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/MapType.java
@@ -20,15 +20,6 @@ import org.hibernate.persister.collection.CollectionPersister;
public class MapType extends CollectionType {
- /**
- * @deprecated Use {@link #MapType(TypeFactory.TypeScope, String, String) } instead.
- * See Jira issue: HHH-7771
- */
- @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 );
}
diff --git a/hibernate-core/src/main/java/org/hibernate/type/MetaType.java b/hibernate-core/src/main/java/org/hibernate/type/MetaType.java
index 2704e3e9f8..44bcff2896 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/MetaType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/MetaType.java
@@ -142,14 +142,6 @@ public class MetaType extends AbstractType {
return false;
}
- public Object fromXMLNode(Node xml, Mapping factory) throws HibernateException {
- return fromXMLString( xml.getText(), factory );
- }
-
- public void setToXMLNode(Node node, Object value, SessionFactoryImplementor factory) throws HibernateException {
- node.setText( toXMLString(value, factory) );
- }
-
public boolean[] toColumnNullness(Object value, Mapping mapping) {
throw new UnsupportedOperationException();
}
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 ad57733105..07a95b9557 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/OneToOneType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/OneToOneType.java
@@ -30,25 +30,6 @@ public class OneToOneType extends EntityType {
private final String propertyName;
private final String entityName;
- /**
- * @deprecated Use {@link #OneToOneType(TypeFactory.TypeScope, String, ForeignKeyDirection, boolean, String, boolean, boolean, String, String)}
- * instead.
- * See Jira issue: HHH-7771
- */
- @Deprecated
- public OneToOneType(
- TypeFactory.TypeScope scope,
- String referencedEntityName,
- ForeignKeyDirection foreignKeyType,
- String uniqueKeyPropertyName,
- boolean lazy,
- boolean unwrapProxy,
- boolean isEmbeddedInXML,
- String entityName,
- String propertyName) {
- this( scope, referencedEntityName, foreignKeyType, uniqueKeyPropertyName == null, uniqueKeyPropertyName, lazy, unwrapProxy, entityName, propertyName );
- }
-
/**
* @deprecated Use {@link #OneToOneType(TypeFactory.TypeScope, String, ForeignKeyDirection, boolean, String, boolean, boolean, String, String)}
* instead.
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 9e0f0378a4..49a82630d9 100755
--- a/hibernate-core/src/main/java/org/hibernate/type/OrderedMapType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/OrderedMapType.java
@@ -12,23 +12,6 @@ import java.util.LinkedHashMap;
*/
public class OrderedMapType extends MapType {
- /**
- * Constructs a map type capable of creating ordered maps of the given
- * role.
- *
- * @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: HHH-7771
- */
- @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 );
}
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 7bdb6837ff..e0947beae6 100755
--- a/hibernate-core/src/main/java/org/hibernate/type/OrderedSetType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/OrderedSetType.java
@@ -12,24 +12,6 @@ import java.util.LinkedHashSet;
*/
public class OrderedSetType extends SetType {
- /**
- * Constructs a set type capable of creating ordered sets of the given
- * role.
- *
- * @param typeScope The scope for this type instance.
- * @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: HHH-7771
- */
- @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 );
}
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 e0b68fc10a..57b2c807c9 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/SetType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/SetType.java
@@ -16,15 +16,6 @@ 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: HHH-7771
- */
- @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 );
}
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 b8c47aabec..ee1bf1ba1b 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/SortedMapType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/SortedMapType.java
@@ -20,17 +20,6 @@ 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: HHH-7771
- */
- @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;
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 7208932f10..91171fc273 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/SortedSetType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/SortedSetType.java
@@ -18,17 +18,6 @@ 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: HHH-7771
- */
- @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;
diff --git a/hibernate-core/src/main/java/org/hibernate/type/SpecialOneToOneType.java b/hibernate-core/src/main/java/org/hibernate/type/SpecialOneToOneType.java
index 05a7735b6e..d54412d354 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/SpecialOneToOneType.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/SpecialOneToOneType.java
@@ -98,10 +98,6 @@ public class SpecialOneToOneType extends OneToOneType {
public Serializable disassemble(Object value, SessionImplementor session, Object owner)
throws HibernateException {
- if ( isNotEmbedded(session) ) {
- return getIdentifierType(session).disassemble(value, session, owner);
- }
-
if (value==null) {
return null;
}
@@ -125,10 +121,6 @@ public class SpecialOneToOneType extends OneToOneType {
// change to unique key property of the associated object)
Serializable id = (Serializable) getIdentifierType(session).assemble(oid, session, null); //the owner of the association is not the owner of the id
- if ( isNotEmbedded(session) ) {
- return id;
- }
-
if (id==null) {
return null;
}
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 dad2b696ee..ab498ca8d8 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/Type.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/Type.java
@@ -150,14 +150,6 @@ public interface Type extends Serializable {
*/
public Class getReturnedClass();
- /**
- * @deprecated To be removed in 5. Removed as part of removing the notion of DOM entity-mode.
- * See Jira issue: HHH-7771
- */
- @SuppressWarnings( {"UnusedDeclaration"})
- @Deprecated
- public boolean isXMLElement();
-
/**
* Compare two instances of the class mapped by this type for persistence "equality" (equality of persistent
* state) taking a shortcut for entity references.
@@ -372,38 +364,6 @@ public interface Type extends Serializable {
public String toLoggableString(Object value, SessionFactoryImplementor factory)
throws HibernateException;
- /**
- * A representation of the value to be embedded in an XML element.
- *
- * @param node The XML node to which to write the value
- * @param value The value to write
- * @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: HHH-7771
- */
- @Deprecated
- public void setToXMLNode(Node node, Object value, SessionFactoryImplementor factory)
- throws HibernateException;
-
- /**
- * Parse the XML representation of an instance.
- *
- * @param xml The XML node from which to read the value
- * @param factory The session factory
- *
- * @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: HHH-7771
- */
- @Deprecated
- public Object fromXMLNode(Node xml, Mapping factory) throws HibernateException;
-
/**
* Returns the abbreviated name of the type.
*
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 aaa3b6fd07..92eca04b34 100644
--- a/hibernate-core/src/main/java/org/hibernate/type/TypeFactory.java
+++ b/hibernate-core/src/main/java/org/hibernate/type/TypeFactory.java
@@ -148,32 +148,6 @@ public final class TypeFactory implements Serializable {
}
}
- /**
- * @deprecated Use {@link #customCollection(String, java.util.Properties, String, String)}
- * instead.
- * See Jira issue: HHH-7771
- */
- @Deprecated
- public CollectionType customCollection(
- String typeName,
- Properties typeParameters,
- String role,
- String propertyRef,
- boolean embedded) {
- 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, embedded );
- if ( typeParameters != null ) {
- injectParameters( result.getUserType(), typeParameters );
- }
- return result;
- }
-
public CollectionType customCollection(
String typeName,
Properties typeParameters,
@@ -268,30 +242,6 @@ public final class TypeFactory implements Serializable {
return new ManyToOneType( typeScope, persistentClass, lazy );
}
- /**
- * @deprecated Use {@link #manyToOne(String, boolean, String, boolean, boolean, boolean, boolean)} instead.
- * See Jira issue: HHH-7771
- */
- @Deprecated
- public EntityType manyToOne(
- String persistentClass,
- String uniqueKeyPropertyName,
- boolean lazy,
- boolean unwrapProxy,
- boolean isEmbeddedInXML,
- boolean ignoreNotFound,
- boolean isLogicalOneToOne) {
- return manyToOne(
- persistentClass,
- uniqueKeyPropertyName == null,
- uniqueKeyPropertyName,
- lazy,
- unwrapProxy,
- ignoreNotFound,
- isLogicalOneToOne
- );
- }
-
/**
* @deprecated Use {@link #manyToOne(String, boolean, String, boolean, boolean, boolean, boolean)} instead.
*/
@@ -336,132 +286,42 @@ public final class TypeFactory implements Serializable {
// collection type builders ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- /**
- * @deprecated Use {@link #array(String, String, Class)} instead.
- * See Jira issue: HHH-7771
- */
- @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: HHH-7771
- */
- @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: HHH-7771
- */
- @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: HHH-7771
- */
- @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: HHH-7771
- */
- @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: HHH-7771
- */
- @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: HHH-7771
- */
- @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: HHH-7771
- */
- @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: HHH-7771
- */
- @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: HHH-7771
- */
- @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 );
}