HHH-16999 Relax visibility of some methods for hibernate-reactive

This commit is contained in:
Barry LaFond 2023-07-26 08:48:54 -05:00 committed by Andrea Boriero
parent 74acc73c2b
commit 2ee435143c
4 changed files with 12 additions and 12 deletions

View File

@ -138,7 +138,7 @@ else if ( persister.isVersionPropertyGenerated() ) {
} }
} }
private void putCacheIfNecessary() { protected void putCacheIfNecessary() {
final EntityPersister persister = getPersister(); final EntityPersister persister = getPersister();
final SharedSessionContractImplementor session = getSession(); final SharedSessionContractImplementor session = getSession();
if ( isCachePutEnabled( persister, session ) ) { if ( isCachePutEnabled( persister, session ) ) {

View File

@ -180,7 +180,7 @@ public void execute() throws HibernateException {
} }
} }
private void handleNaturalIdResolutions(EntityPersister persister, SharedSessionContractImplementor session, Object id) { protected void handleNaturalIdResolutions(EntityPersister persister, SharedSessionContractImplementor session, Object id) {
if ( naturalIdMapping != null ) { if ( naturalIdMapping != null ) {
session.getPersistenceContextInternal().getNaturalIdResolutions().manageSharedResolution( session.getPersistenceContextInternal().getNaturalIdResolutions().manageSharedResolution(
id, id,
@ -192,7 +192,7 @@ private void handleNaturalIdResolutions(EntityPersister persister, SharedSession
} }
} }
private void updateCacheItem(Object previousVersion, Object ck, EntityEntry entry) { protected void updateCacheItem(Object previousVersion, Object ck, EntityEntry entry) {
final EntityPersister persister = getPersister(); final EntityPersister persister = getPersister();
if ( persister.canWriteToCache() ) { if ( persister.canWriteToCache() ) {
final SharedSessionContractImplementor session = getSession(); final SharedSessionContractImplementor session = getSession();
@ -279,7 +279,7 @@ protected Object getPreviousVersion() {
} }
} }
private Object lockCacheItem(Object previousVersion) { protected Object lockCacheItem(Object previousVersion) {
final EntityPersister persister = getPersister(); final EntityPersister persister = getPersister();
if ( persister.canWriteToCache() ) { if ( persister.canWriteToCache() ) {
final SharedSessionContractImplementor session = getSession(); final SharedSessionContractImplementor session = getSession();

View File

@ -735,7 +735,7 @@ private <R> SelectionQuery<R> createSelectionQuery(String hql, Class<R> resultTy
return query; return query;
} }
private <R> HqlInterpretation interpretHql(String hql, Class<R> resultType) { protected <R> HqlInterpretation interpretHql(String hql, Class<R> resultType) {
final QueryEngine queryEngine = getFactory().getQueryEngine(); final QueryEngine queryEngine = getFactory().getQueryEngine();
return queryEngine.getInterpretationCache() return queryEngine.getInterpretationCache()
.resolveHqlInterpretation( .resolveHqlInterpretation(
@ -745,13 +745,13 @@ private <R> HqlInterpretation interpretHql(String hql, Class<R> resultType) {
); );
} }
private static void checkSelectionQuery(String hql, HqlInterpretation hqlInterpretation) { protected static void checkSelectionQuery(String hql, HqlInterpretation hqlInterpretation) {
if ( !( hqlInterpretation.getSqmStatement() instanceof SqmSelectStatement ) ) { if ( !( hqlInterpretation.getSqmStatement() instanceof SqmSelectStatement ) ) {
throw new IllegalSelectQueryException( "Expecting a selection query, but found `" + hql + "`", hql); throw new IllegalSelectQueryException( "Expecting a selection query, but found `" + hql + "`", hql);
} }
} }
private static <R> void checkResultType(Class<R> expectedResultType, SqmSelectionQueryImpl<?> query) { protected static <R> void checkResultType(Class<R> expectedResultType, SqmSelectionQueryImpl<?> query) {
final Class<?> resultType = query.getResultType(); final Class<?> resultType = query.getResultType();
if ( !expectedResultType.isAssignableFrom( resultType ) ) { if ( !expectedResultType.isAssignableFrom( resultType ) ) {
throw new QueryTypeMismatchException( throw new QueryTypeMismatchException(
@ -836,7 +836,7 @@ public NativeQueryImplementor createNativeQuery(String sqlString, String resultS
} }
} }
private NamedResultSetMappingMemento getResultSetMappingMemento(String resultSetMappingName) { protected NamedResultSetMappingMemento getResultSetMappingMemento(String resultSetMappingName) {
final NamedResultSetMappingMemento resultSetMappingMemento = getFactory().getQueryEngine() final NamedResultSetMappingMemento resultSetMappingMemento = getFactory().getQueryEngine()
.getNamedObjectRepository().getResultSetMappingMemento( resultSetMappingName ); .getNamedObjectRepository().getResultSetMappingMemento( resultSetMappingName );
if ( resultSetMappingMemento == null ) { if ( resultSetMappingMemento == null ) {
@ -1088,7 +1088,7 @@ public MutationQuery createMutationQuery(String hqlString) {
return query; return query;
} }
private static void checkMutationQuery(String hqlString, SqmStatement<?> sqmStatement) { protected static void checkMutationQuery(String hqlString, SqmStatement<?> sqmStatement) {
if ( !( sqmStatement instanceof SqmDmlStatement ) ) { if ( !( sqmStatement instanceof SqmDmlStatement ) ) {
throw new IllegalMutationQueryException( "Expecting a mutation query, but found `" + hqlString + "`" ); throw new IllegalMutationQueryException( "Expecting a mutation query, but found `" + hqlString + "`" );
} }
@ -1112,7 +1112,7 @@ public MutationQuery createNamedMutationQuery(String queryName) {
); );
} }
private NativeQueryImplementor<?> createNativeQueryImplementor(String queryName, NamedNativeQueryMemento memento) { protected NativeQueryImplementor<?> createNativeQueryImplementor(String queryName, NamedNativeQueryMemento memento) {
final NativeQueryImplementor<?> query = memento.toQuery( this ); final NativeQueryImplementor<?> query = memento.toQuery( this );
final Boolean isUnequivocallySelect = query.isSelectQuery(); final Boolean isUnequivocallySelect = query.isSelectQuery();
if ( isUnequivocallySelect == TRUE ) { if ( isUnequivocallySelect == TRUE ) {
@ -1128,7 +1128,7 @@ private NativeQueryImplementor<?> createNativeQueryImplementor(String queryName,
return query; return query;
} }
private SqmQueryImplementor<?> createSqmQueryImplementor(String queryName, NamedSqmQueryMemento memento) { protected SqmQueryImplementor<?> createSqmQueryImplementor(String queryName, NamedSqmQueryMemento memento) {
final SqmQueryImplementor<?> query = memento.toQuery( this ); final SqmQueryImplementor<?> query = memento.toQuery( this );
final SqmStatement<?> sqmStatement = query.getSqmStatement(); final SqmStatement<?> sqmStatement = query.getSqmStatement();
if ( !( sqmStatement instanceof SqmDmlStatement ) ) { if ( !( sqmStatement instanceof SqmDmlStatement ) ) {

View File

@ -1087,7 +1087,7 @@ public Object internalLoad(
} }
} }
private static LoadType internalLoadType(boolean eager, boolean nullable) { protected static LoadType internalLoadType(boolean eager, boolean nullable) {
if ( nullable ) { if ( nullable ) {
return LoadEventListener.INTERNAL_LOAD_NULLABLE; return LoadEventListener.INTERNAL_LOAD_NULLABLE;
} }