HHH-7712 remove deprecated code

This commit is contained in:
Strong Liu 2012-10-24 15:22:56 +08:00
parent 5501336c28
commit 9fbfcdcabf
2 changed files with 2 additions and 84 deletions

View File

@ -319,10 +319,6 @@ public abstract class AbstractEntityTuplizer implements EntityTuplizer {
return entityMetamodel.getSubclassEntityNames();
}
public Serializable getIdentifier(Object entity) throws HibernateException {
return getIdentifier( entity, null );
}
public Serializable getIdentifier(Object entity, SessionImplementor session) {
final Object id;
if ( entityMetamodel.getIdentifierProperty().isEmbedded() ) {
@ -357,16 +353,6 @@ public abstract class AbstractEntityTuplizer implements EntityTuplizer {
}
}
/**
* {@inheritDoc}
*/
public void setIdentifier(Object entity, Serializable id) throws HibernateException {
// 99% of the time the session is not needed. Its only needed for certain brain-dead
// interpretations of JPA 2 "derived identity" support
setIdentifier( entity, id, null );
}
/**
* {@inheritDoc}
*/
@ -417,8 +403,8 @@ public abstract class AbstractEntityTuplizer implements EntityTuplizer {
}
return wereAllEquivalent
? (MappedIdentifierValueMarshaller) new NormalMappedIdentifierValueMarshaller( virtualIdComponent, mappedIdClassComponentType )
: (MappedIdentifierValueMarshaller) new IncrediblySillyJpaMapsIdMappedIdentifierValueMarshaller( virtualIdComponent, mappedIdClassComponentType );
? new NormalMappedIdentifierValueMarshaller( virtualIdComponent, mappedIdClassComponentType )
: new IncrediblySillyJpaMapsIdMappedIdentifierValueMarshaller( virtualIdComponent, mappedIdClassComponentType );
}
private static class NormalMappedIdentifierValueMarshaller implements MappedIdentifierValueMarshaller {
@ -548,16 +534,6 @@ public abstract class AbstractEntityTuplizer implements EntityTuplizer {
.getEventListenerGroup( EventType.PERSIST )
.listeners();
}
/**
* {@inheritDoc}
*/
public void resetIdentifier(Object entity, Serializable currentId, Object currentVersion) {
// 99% of the time the session is not needed. Its only needed for certain brain-dead
// interpretations of JPA 2 "derived identity" support
resetIdentifier( entity, currentId, currentVersion, null );
}
/**
* {@inheritDoc}
*/
@ -726,12 +702,6 @@ public abstract class AbstractEntityTuplizer implements EntityTuplizer {
setters[ entityMetamodel.getPropertyIndex( propertyName ) ].set( entity, value, getFactory() );
}
public final Object instantiate(Serializable id) throws HibernateException {
// 99% of the time the session is not needed. Its only needed for certain brain-dead
// interpretations of JPA 2 "derived identity" support
return instantiate( id, null );
}
public final Object instantiate(Serializable id, SessionImplementor session) {
Object result = getInstantiator().instantiate( id );
if ( id != null ) {

View File

@ -53,18 +53,6 @@ public interface EntityTuplizer extends Tuplizer {
*/
public EntityMode getEntityMode();
/**
* Create an entity instance initialized with the given identifier.
*
* @param id The identifier value for the entity to be instantiated.
* @return The instantiated entity.
* @throws HibernateException
*
* @deprecated Use {@link #instantiate(Serializable, SessionImplementor)} instead.
*/
@SuppressWarnings( {"JavaDoc"})
public Object instantiate(Serializable id) throws HibernateException;
/**
* Create an entity instance initialized with the given identifier.
*
@ -75,20 +63,6 @@ public interface EntityTuplizer extends Tuplizer {
*/
public Object instantiate(Serializable id, SessionImplementor session);
/**
* Extract the identifier value from the given entity.
*
* @param entity The entity from which to extract the identifier value.
*
* @return The identifier value.
*
* @throws HibernateException If the entity does not define an identifier property, or an
* error occurs accessing its value.
*
* @deprecated Use {@link #getIdentifier(Object,SessionImplementor)} instead.
*/
public Serializable getIdentifier(Object entity) throws HibernateException;
/**
* Extract the identifier value from the given entity.
*
@ -99,19 +73,6 @@ public interface EntityTuplizer extends Tuplizer {
*/
public Serializable getIdentifier(Object entity, SessionImplementor session);
/**
* Inject the identifier value into the given entity.
* </p>
* Has no effect if the entity does not define an identifier property
*
* @param entity The entity to inject with the identifier value.
* @param id The value to be injected as the identifier.
*
* @deprecated Use {@link #setIdentifier(Object, Serializable, SessionImplementor)} instead.
*/
@SuppressWarnings( {"JavaDoc"})
public void setIdentifier(Object entity, Serializable id) throws HibernateException;
/**
* Inject the identifier value into the given entity.
* </p>
@ -123,19 +84,6 @@ public interface EntityTuplizer extends Tuplizer {
*/
public void setIdentifier(Object entity, Serializable id, SessionImplementor session);
/**
* Inject the given identifier and version into the entity, in order to
* "roll back" to their original values.
*
* @param entity The entity for which to reset the id/version values
* @param currentId The identifier value to inject into the entity.
* @param currentVersion The version value to inject into the entity.
*
* @deprecated Use {@link #resetIdentifier(Object, Serializable, Object, SessionImplementor)} instead
*/
@SuppressWarnings( {"UnusedDeclaration"})
public void resetIdentifier(Object entity, Serializable currentId, Object currentVersion);
/**
* Inject the given identifier and version into the entity, in order to
* "roll back" to their original values.