Skip to content

Commit 9fbfcdc

Browse files
committed
HHH-7712 remove deprecated code
1 parent 5501336 commit 9fbfcdc

File tree

2 files changed

+2
-84
lines changed

2 files changed

+2
-84
lines changed

hibernate-core/src/main/java/org/hibernate/tuple/entity/AbstractEntityTuplizer.java

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -319,10 +319,6 @@ protected Set getSubclassEntityNames() {
319319
return entityMetamodel.getSubclassEntityNames();
320320
}
321321

322-
public Serializable getIdentifier(Object entity) throws HibernateException {
323-
return getIdentifier( entity, null );
324-
}
325-
326322
public Serializable getIdentifier(Object entity, SessionImplementor session) {
327323
final Object id;
328324
if ( entityMetamodel.getIdentifierProperty().isEmbedded() ) {
@@ -357,16 +353,6 @@ public Serializable getIdentifier(Object entity, SessionImplementor session) {
357353
}
358354
}
359355

360-
/**
361-
* {@inheritDoc}
362-
*/
363-
public void setIdentifier(Object entity, Serializable id) throws HibernateException {
364-
// 99% of the time the session is not needed. Its only needed for certain brain-dead
365-
// interpretations of JPA 2 "derived identity" support
366-
setIdentifier( entity, id, null );
367-
}
368-
369-
370356
/**
371357
* {@inheritDoc}
372358
*/
@@ -417,8 +403,8 @@ private static MappedIdentifierValueMarshaller buildMappedIdentifierValueMarshal
417403
}
418404

419405
return wereAllEquivalent
420-
? (MappedIdentifierValueMarshaller) new NormalMappedIdentifierValueMarshaller( virtualIdComponent, mappedIdClassComponentType )
421-
: (MappedIdentifierValueMarshaller) new IncrediblySillyJpaMapsIdMappedIdentifierValueMarshaller( virtualIdComponent, mappedIdClassComponentType );
406+
? new NormalMappedIdentifierValueMarshaller( virtualIdComponent, mappedIdClassComponentType )
407+
: new IncrediblySillyJpaMapsIdMappedIdentifierValueMarshaller( virtualIdComponent, mappedIdClassComponentType );
422408
}
423409

424410
private static class NormalMappedIdentifierValueMarshaller implements MappedIdentifierValueMarshaller {
@@ -548,16 +534,6 @@ private static Iterable<PersistEventListener> persistEventListeners(SessionImple
548534
.getEventListenerGroup( EventType.PERSIST )
549535
.listeners();
550536
}
551-
552-
/**
553-
* {@inheritDoc}
554-
*/
555-
public void resetIdentifier(Object entity, Serializable currentId, Object currentVersion) {
556-
// 99% of the time the session is not needed. Its only needed for certain brain-dead
557-
// interpretations of JPA 2 "derived identity" support
558-
resetIdentifier( entity, currentId, currentVersion, null );
559-
}
560-
561537
/**
562538
* {@inheritDoc}
563539
*/
@@ -726,12 +702,6 @@ public void setPropertyValue(Object entity, String propertyName, Object value) t
726702
setters[ entityMetamodel.getPropertyIndex( propertyName ) ].set( entity, value, getFactory() );
727703
}
728704

729-
public final Object instantiate(Serializable id) throws HibernateException {
730-
// 99% of the time the session is not needed. Its only needed for certain brain-dead
731-
// interpretations of JPA 2 "derived identity" support
732-
return instantiate( id, null );
733-
}
734-
735705
public final Object instantiate(Serializable id, SessionImplementor session) {
736706
Object result = getInstantiator().instantiate( id );
737707
if ( id != null ) {

hibernate-core/src/main/java/org/hibernate/tuple/entity/EntityTuplizer.java

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -53,18 +53,6 @@ public interface EntityTuplizer extends Tuplizer {
5353
*/
5454
public EntityMode getEntityMode();
5555

56-
/**
57-
* Create an entity instance initialized with the given identifier.
58-
*
59-
* @param id The identifier value for the entity to be instantiated.
60-
* @return The instantiated entity.
61-
* @throws HibernateException
62-
*
63-
* @deprecated Use {@link #instantiate(Serializable, SessionImplementor)} instead.
64-
*/
65-
@SuppressWarnings( {"JavaDoc"})
66-
public Object instantiate(Serializable id) throws HibernateException;
67-
6856
/**
6957
* Create an entity instance initialized with the given identifier.
7058
*
@@ -75,20 +63,6 @@ public interface EntityTuplizer extends Tuplizer {
7563
*/
7664
public Object instantiate(Serializable id, SessionImplementor session);
7765

78-
/**
79-
* Extract the identifier value from the given entity.
80-
*
81-
* @param entity The entity from which to extract the identifier value.
82-
*
83-
* @return The identifier value.
84-
*
85-
* @throws HibernateException If the entity does not define an identifier property, or an
86-
* error occurs accessing its value.
87-
*
88-
* @deprecated Use {@link #getIdentifier(Object,SessionImplementor)} instead.
89-
*/
90-
public Serializable getIdentifier(Object entity) throws HibernateException;
91-
9266
/**
9367
* Extract the identifier value from the given entity.
9468
*
@@ -99,19 +73,6 @@ public interface EntityTuplizer extends Tuplizer {
9973
*/
10074
public Serializable getIdentifier(Object entity, SessionImplementor session);
10175

102-
/**
103-
* Inject the identifier value into the given entity.
104-
* </p>
105-
* Has no effect if the entity does not define an identifier property
106-
*
107-
* @param entity The entity to inject with the identifier value.
108-
* @param id The value to be injected as the identifier.
109-
*
110-
* @deprecated Use {@link #setIdentifier(Object, Serializable, SessionImplementor)} instead.
111-
*/
112-
@SuppressWarnings( {"JavaDoc"})
113-
public void setIdentifier(Object entity, Serializable id) throws HibernateException;
114-
11576
/**
11677
* Inject the identifier value into the given entity.
11778
* </p>
@@ -123,19 +84,6 @@ public interface EntityTuplizer extends Tuplizer {
12384
*/
12485
public void setIdentifier(Object entity, Serializable id, SessionImplementor session);
12586

126-
/**
127-
* Inject the given identifier and version into the entity, in order to
128-
* "roll back" to their original values.
129-
*
130-
* @param entity The entity for which to reset the id/version values
131-
* @param currentId The identifier value to inject into the entity.
132-
* @param currentVersion The version value to inject into the entity.
133-
*
134-
* @deprecated Use {@link #resetIdentifier(Object, Serializable, Object, SessionImplementor)} instead
135-
*/
136-
@SuppressWarnings( {"UnusedDeclaration"})
137-
public void resetIdentifier(Object entity, Serializable currentId, Object currentVersion);
138-
13987
/**
14088
* Inject the given identifier and version into the entity, in order to
14189
* "roll back" to their original values.

0 commit comments

Comments
 (0)