Skip to content

Commit 47b8ed5

Browse files
gunnarmorlingsebersole
authored andcommitted
HHH-10073 Removing methods scheduled for removal in 5.0
1 parent 1db462f commit 47b8ed5

32 files changed

+1
-658
lines changed

hibernate-core/src/main/java/org/hibernate/boot/model/source/internal/hbm/ModelBinder.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2115,7 +2115,6 @@ public void bindOneToOne(
21152115
if ( oneToOneSource.isEmbedXml() == Boolean.TRUE ) {
21162116
DeprecationLogger.DEPRECATION_LOGGER.logDeprecationOfEmbedXmlSupport();
21172117
}
2118-
oneToOneBinding.setEmbedded( oneToOneSource.isEmbedXml() != Boolean.FALSE );
21192118

21202119
if ( StringHelper.isNotEmpty( oneToOneSource.getExplicitForeignKeyName() ) ) {
21212120
oneToOneBinding.setForeignKeyName( oneToOneSource.getExplicitForeignKeyName() );
@@ -2234,7 +2233,6 @@ private void bindManyToOneAttribute(
22342233
if ( manyToOneSource.isEmbedXml() == Boolean.TRUE ) {
22352234
DeprecationLogger.DEPRECATION_LOGGER.logDeprecationOfEmbedXmlSupport();
22362235
}
2237-
manyToOneBinding.setEmbedded( manyToOneSource.isEmbedXml() != Boolean.FALSE );
22382236

22392237
manyToOneBinding.setIgnoreNotFound( manyToOneSource.isIgnoreNotFound() );
22402238

hibernate-core/src/main/java/org/hibernate/cfg/OneToOneSecondPass.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,6 @@ else if ( otherSideProperty.getValue() instanceof ManyToOne ) {
176176
//FIXME use ignore not found here
177177
manyToOne.setIgnoreNotFound( ignoreNotFound );
178178
manyToOne.setCascadeDeleteEnabled( value.isCascadeDeleteEnabled() );
179-
manyToOne.setEmbedded( value.isEmbedded() );
180179
manyToOne.setFetchMode( value.getFetchMode() );
181180
manyToOne.setLazy( value.isLazy() );
182181
manyToOne.setReferencedEntityName( value.getReferencedEntityName() );

hibernate-core/src/main/java/org/hibernate/mapping/Collection.java

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -661,29 +661,10 @@ public void setElementNodeName(String elementNodeName) {
661661
this.elementNodeName = elementNodeName;
662662
}
663663

664-
/**
665-
* @deprecated To be removed in 5. Removed as part of removing the notion of DOM entity-mode.
666-
* See Jira issue: <a href="https://hibernate.onjira.com/browse/HHH-7771">HHH-7771</a>
667-
*/
668-
@Deprecated
669-
public boolean isEmbedded() {
670-
return embedded;
671-
}
672-
673-
/**
674-
* @deprecated To be removed in 5. Removed as part of removing the notion of DOM entity-mode.
675-
* See Jira issue: <a href="https://hibernate.onjira.com/browse/HHH-7771">HHH-7771</a>
676-
*/
677-
@Deprecated
678-
public void setEmbedded(boolean embedded) {
679-
this.embedded = embedded;
680-
}
681-
682664
public boolean isSubselectLoadable() {
683665
return subselectLoadable;
684666
}
685667

686-
687668
public void setSubselectLoadable(boolean subqueryLoadable) {
688669
this.subselectLoadable = subqueryLoadable;
689670
}

hibernate-core/src/main/java/org/hibernate/mapping/OneToMany.java

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -142,24 +142,6 @@ public boolean[] getColumnUpdateability() {
142142
throw new UnsupportedOperationException();
143143
}
144144

145-
/**
146-
* @deprecated To be removed in 5. Removed as part of removing the notion of DOM entity-mode.
147-
* See Jira issue: <a href="https://hibernate.onjira.com/browse/HHH-7771">HHH-7771</a>
148-
*/
149-
@Deprecated
150-
public boolean isEmbedded() {
151-
return embedded;
152-
}
153-
154-
/**
155-
* @deprecated To be removed in 5. Removed as part of removing the notion of DOM entity-mode.
156-
* See Jira issue: <a href="https://hibernate.onjira.com/browse/HHH-7771">HHH-7771</a>
157-
*/
158-
@Deprecated
159-
public void setEmbedded(boolean embedded) {
160-
this.embedded = embedded;
161-
}
162-
163145
public boolean isIgnoreNotFound() {
164146
return ignoreNotFound;
165147
}

hibernate-core/src/main/java/org/hibernate/mapping/ToOne.java

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -76,24 +76,6 @@ public Object accept(ValueVisitor visitor) {
7676
return visitor.accept(this);
7777
}
7878

79-
/**
80-
* @deprecated To be removed in 5. Removed as part of removing the notion of DOM entity-mode.
81-
* See Jira issue: <a href="https://hibernate.onjira.com/browse/HHH-7771">HHH-7771</a>
82-
*/
83-
@Deprecated
84-
public boolean isEmbedded() {
85-
return embedded;
86-
}
87-
88-
/**
89-
* @deprecated To be removed in 5. Removed as part of removing the notion of DOM entity-mode.
90-
* See Jira issue: <a href="https://hibernate.onjira.com/browse/HHH-7771">HHH-7771</a>
91-
*/
92-
@Deprecated
93-
public void setEmbedded(boolean embedded) {
94-
this.embedded = embedded;
95-
}
96-
9779
public boolean isValid(Mapping mapping) throws MappingException {
9880
if (referencedEntityName==null) {
9981
throw new MappingException("association must specify the referenced entity");

hibernate-core/src/main/java/org/hibernate/persister/entity/DiscriminatorType.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,4 @@ public Size[] defaultSizes(Mapping mapping) throws MappingException {
137137
public int getColumnSpan(Mapping mapping) throws MappingException {
138138
return underlyingType.getColumnSpan( mapping );
139139
}
140-
141-
public void setToXMLNode(Node node, Object value, SessionFactoryImplementor factory) throws HibernateException {
142-
}
143-
144-
public Object fromXMLNode(Node xml, Mapping factory) throws HibernateException {
145-
// todo : ???
146-
return null;
147-
}
148-
149140
}

hibernate-core/src/main/java/org/hibernate/type/AbstractStandardBasicType.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -273,15 +273,6 @@ public final String toLoggableString(Object value, SessionFactoryImplementor fac
273273
return javaTypeDescriptor.extractLoggableRepresentation( (T) value );
274274
}
275275

276-
@SuppressWarnings({ "unchecked" })
277-
public final void setToXMLNode(Node node, Object value, SessionFactoryImplementor factory) {
278-
node.setText( toString( (T) value ) );
279-
}
280-
281-
public final Object fromXMLNode(Node xml, Mapping factory) {
282-
return fromString( xml.getText() );
283-
}
284-
285276
public final boolean isMutable() {
286277
return getMutabilityPlan().isMutable();
287278
}

hibernate-core/src/main/java/org/hibernate/type/AbstractType.java

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,6 @@ public boolean isEntityType() {
4545
return false;
4646
}
4747

48-
public boolean isXMLElement() {
49-
return false;
50-
}
51-
5248
public int compare(Object x, Object y) {
5349
return ( (Comparable) x ).compareTo(y);
5450
}
@@ -128,16 +124,6 @@ public int getHashCode(Object x, SessionFactoryImplementor factory) {
128124
return getHashCode(x );
129125
}
130126

131-
protected static void replaceNode(Node container, Element value) {
132-
if ( container!=value ) { //not really necessary, I guess...
133-
Element parent = container.getParent();
134-
container.detach();
135-
value.setName( container.getName() );
136-
value.detach();
137-
parent.add(value);
138-
}
139-
}
140-
141127
public Type getSemiResolvedType(SessionFactoryImplementor factory) {
142128
return this;
143129
}

hibernate-core/src/main/java/org/hibernate/type/AnyType.java

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -361,18 +361,6 @@ public Object semiResolve(Object value, SessionImplementor session, Object owner
361361
throw new UnsupportedOperationException( "any mappings may not form part of a property-ref" );
362362
}
363363

364-
@Override
365-
public void setToXMLNode(Node xml, Object value, SessionFactoryImplementor factory) {
366-
throw new UnsupportedOperationException("any types cannot be stringified");
367-
}
368-
369-
@Override
370-
public Object fromXMLNode(Node xml, Mapping factory) throws HibernateException {
371-
throw new UnsupportedOperationException();
372-
}
373-
374-
375-
376364
// CompositeType implementation ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
377365

378366
@Override
@@ -474,11 +462,6 @@ public boolean isAlwaysDirtyChecked() {
474462
return false;
475463
}
476464

477-
@Override
478-
public boolean isEmbeddedInXML() {
479-
return false;
480-
}
481-
482465
@Override
483466
public Joinable getAssociatedJoinable(SessionFactoryImplementor factory) {
484467
throw new UnsupportedOperationException("any types do not have a unique referenced persister");

hibernate-core/src/main/java/org/hibernate/type/ArrayType.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,6 @@ public class ArrayType extends CollectionType {
3030
private final Class elementClass;
3131
private final Class arrayClass;
3232

33-
/**
34-
* @deprecated Use {@link #ArrayType(TypeFactory.TypeScope, String, String, Class )} instead.
35-
* See Jira issue: <a href="https://hibernate.onjira.com/browse/HHH-7771">HHH-7771</a>
36-
*/
37-
@Deprecated
38-
public ArrayType(TypeFactory.TypeScope typeScope, String role, String propertyRef, Class elementClass, boolean isEmbeddedInXML) {
39-
super( typeScope, role, propertyRef, isEmbeddedInXML );
40-
this.elementClass = elementClass;
41-
arrayClass = Array.newInstance(elementClass, 0).getClass();
42-
}
43-
4433
public ArrayType(TypeFactory.TypeScope typeScope, String role, String propertyRef, Class elementClass) {
4534
super( typeScope, role, propertyRef );
4635
this.elementClass = elementClass;

hibernate-core/src/main/java/org/hibernate/type/AssociationType.java

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -75,17 +75,4 @@ public String getOnCondition(String alias, SessionFactoryImplementor factory, Ma
7575
* no columns to be updated?
7676
*/
7777
public abstract boolean isAlwaysDirtyChecked();
78-
79-
/**
80-
* @deprecated To be removed in 5. Removed as part of removing the notion of DOM entity-mode.
81-
* See Jira issue: <a href="https://hibernate.onjira.com/browse/HHH-7771">HHH-7771</a>
82-
*/
83-
@Deprecated
84-
public boolean isEmbeddedInXML();
8578
}
86-
87-
88-
89-
90-
91-

hibernate-core/src/main/java/org/hibernate/type/BagType.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,6 @@
1818

1919
public class BagType extends CollectionType {
2020

21-
/**
22-
* @deprecated Use {@link #BagType(TypeFactory.TypeScope, String, String )}
23-
* See Jira issue: <a href="https://hibernate.onjira.com/browse/HHH-7771">HHH-7771</a>
24-
*/
25-
@Deprecated
26-
public BagType(TypeFactory.TypeScope typeScope, String role, String propertyRef, boolean isEmbeddedInXML) {
27-
super( typeScope, role, propertyRef, isEmbeddedInXML );
28-
}
29-
3021
public BagType(TypeFactory.TypeScope typeScope, String role, String propertyRef) {
3122
super( typeScope, role, propertyRef );
3223
}

hibernate-core/src/main/java/org/hibernate/type/CollectionType.java

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -65,30 +65,11 @@ public abstract class CollectionType extends AbstractType implements Association
6565
private final TypeFactory.TypeScope typeScope;
6666
private final String role;
6767
private final String foreignKeyPropertyName;
68-
private final boolean isEmbeddedInXML;
69-
70-
/**
71-
* @deprecated Use {@link #CollectionType(TypeFactory.TypeScope, String, String)} instead
72-
* See Jira issue: <a href="https://hibernate.onjira.com/browse/HHH-7771">HHH-7771</a>
73-
*/
74-
@Deprecated
75-
public CollectionType(TypeFactory.TypeScope typeScope, String role, String foreignKeyPropertyName, boolean isEmbeddedInXML) {
76-
this.typeScope = typeScope;
77-
this.role = role;
78-
this.foreignKeyPropertyName = foreignKeyPropertyName;
79-
this.isEmbeddedInXML = isEmbeddedInXML;
80-
}
8168

8269
public CollectionType(TypeFactory.TypeScope typeScope, String role, String foreignKeyPropertyName) {
8370
this.typeScope = typeScope;
8471
this.role = role;
8572
this.foreignKeyPropertyName = foreignKeyPropertyName;
86-
this.isEmbeddedInXML = true;
87-
}
88-
89-
@Override
90-
public boolean isEmbeddedInXML() {
91-
return isEmbeddedInXML;
9273
}
9374

9475
public String getRole() {
@@ -795,27 +776,6 @@ public String getLHSPropertyName() {
795776
return foreignKeyPropertyName;
796777
}
797778

798-
@Override
799-
public boolean isXMLElement() {
800-
return true;
801-
}
802-
803-
@Override
804-
public Object fromXMLNode(Node xml, Mapping factory) throws HibernateException {
805-
return xml;
806-
}
807-
808-
@Override
809-
public void setToXMLNode(Node node, Object value, SessionFactoryImplementor factory)
810-
throws HibernateException {
811-
if ( !isEmbeddedInXML ) {
812-
node.detach();
813-
}
814-
else {
815-
replaceNode( node, (Element) value );
816-
}
817-
}
818-
819779
/**
820780
* We always need to dirty check the collection because we sometimes
821781
* need to incremement version number of owner and also because of

hibernate-core/src/main/java/org/hibernate/type/ComponentType.java

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -702,21 +702,6 @@ public boolean[] getPropertyNullability() {
702702
return propertyNullability;
703703
}
704704

705-
@Override
706-
public boolean isXMLElement() {
707-
return true;
708-
}
709-
710-
@Override
711-
public Object fromXMLNode(Node xml, Mapping factory) throws HibernateException {
712-
return xml;
713-
}
714-
715-
@Override
716-
public void setToXMLNode(Node node, Object value, SessionFactoryImplementor factory) throws HibernateException {
717-
replaceNode( node, (Element) value );
718-
}
719-
720705
@Override
721706
public boolean[] toColumnNullness(Object value, Mapping mapping) {
722707
boolean[] result = new boolean[getColumnSpan( mapping )];

hibernate-core/src/main/java/org/hibernate/type/CompositeCustomType.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -254,15 +254,6 @@ public boolean[] getPropertyNullability() {
254254
return null;
255255
}
256256

257-
public Object fromXMLNode(Node xml, Mapping factory) throws HibernateException {
258-
return xml;
259-
}
260-
261-
public void setToXMLNode(Node node, Object value, SessionFactoryImplementor factory)
262-
throws HibernateException {
263-
replaceNode( node, (Element) value );
264-
}
265-
266257
public boolean[] toColumnNullness(Object value, Mapping mapping) {
267258
boolean[] result = new boolean[getColumnSpan( mapping )];
268259
if ( value == null ) {

hibernate-core/src/main/java/org/hibernate/type/CustomCollectionType.java

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,22 +31,6 @@ public class CustomCollectionType extends CollectionType {
3131
private final UserCollectionType userType;
3232
private final boolean customLogging;
3333

34-
/**
35-
* @deprecated Use {@link #CustomCollectionType(TypeFactory.TypeScope, Class, String, String )} instead.
36-
* See Jira issue: <a href="https://hibernate.onjira.com/browse/HHH-7771">HHH-7771</a>
37-
*/
38-
@Deprecated
39-
public CustomCollectionType(
40-
TypeFactory.TypeScope typeScope,
41-
Class userTypeClass,
42-
String role,
43-
String foreignKeyPropertyName,
44-
boolean isEmbeddedInXML) {
45-
super( typeScope, role, foreignKeyPropertyName, isEmbeddedInXML );
46-
userType = createUserCollectionType( userTypeClass );
47-
customLogging = LoggableUserType.class.isAssignableFrom( userTypeClass );
48-
}
49-
5034
public CustomCollectionType(
5135
TypeFactory.TypeScope typeScope,
5236
Class userTypeClass,

hibernate-core/src/main/java/org/hibernate/type/CustomType.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -190,15 +190,6 @@ public Object seed(SessionImplementor session) {
190190
return ( (UserVersionType) userType ).seed( session );
191191
}
192192

193-
public Object fromXMLNode(Node xml, Mapping factory) throws HibernateException {
194-
return fromXMLString( xml.getText(), factory );
195-
}
196-
197-
public void setToXMLNode(Node node, Object value, SessionFactoryImplementor factory)
198-
throws HibernateException {
199-
node.setText( toXMLString(value, factory) );
200-
}
201-
202193
public String toLoggableString(Object value, SessionFactoryImplementor factory)
203194
throws HibernateException {
204195
if ( value == null ) {

0 commit comments

Comments
 (0)