deprecate old code for fetching id by natural id

This commit is contained in:
Gavin King 2021-02-23 23:10:41 +01:00 committed by Steve Ebersole
parent 3a24c700fc
commit 496e5995b2
2 changed files with 6 additions and 1 deletions

View File

@ -5578,7 +5578,7 @@ public abstract class AbstractEntityPersister
}
}
@Override
@Override @Deprecated
public Serializable loadEntityIdByNaturalId(
Object[] naturalIdValues,
LockOptions lockOptions,
@ -5653,6 +5653,7 @@ public abstract class AbstractEntityPersister
private Boolean naturalIdIsNonNullable;
private String cachedPkByNonNullableNaturalIdQuery;
@Deprecated
protected String determinePkByNaturalIdQuery(boolean[] valueNullness) {
if ( !hasNaturalIdentifier() ) {
throw new HibernateException(
@ -5694,6 +5695,7 @@ public abstract class AbstractEntityPersister
return true;
}
@Deprecated
private String generateEntityIdByNaturalIdSql(boolean[] valueNullness) {
EntityPersister rootPersister = getFactory().getEntityPersister( getRootEntityName() );
if ( rootPersister != this ) {

View File

@ -365,7 +365,10 @@ public interface EntityPersister extends EntityDefinition {
/**
* Load the id for the entity based on the natural id.
*
* @deprecated use {@link UniqueKeyLoadable#loadByNaturalId(Object[], LockOptions, SharedSessionContractImplementor)}
*/
@Deprecated
Serializable loadEntityIdByNaturalId(
Object[] naturalIdValues, LockOptions lockOptions,
SharedSessionContractImplementor session);