HHH-14028 Change scope of various private methods to protected

So that Hibernate Reactive can reuse them.
This commit is contained in:
Davide D'Alto 2020-05-14 14:34:45 +01:00 committed by Steve Ebersole
parent 0633559f9f
commit 42acc81067
4 changed files with 9 additions and 9 deletions

View File

@ -274,7 +274,7 @@ public class HQLQueryPlan implements Serializable {
* @return a reasonable size to use for allocation
*/
@SuppressWarnings("UnnecessaryUnboxing")
private int guessResultSize(RowSelection rowSelection) {
protected int guessResultSize(RowSelection rowSelection) {
if ( rowSelection != null ) {
final int maxReasonableAllocation = rowSelection.getFetchSize() != null ? rowSelection.getFetchSize().intValue() : 100;
if ( rowSelection.getMaxRows() != null && rowSelection.getMaxRows().intValue() > 0 ) {

View File

@ -314,7 +314,7 @@ public class QueryTranslatorImpl implements FilterTranslator {
}
}
private void errorIfDML() throws HibernateException {
protected void errorIfDML() throws HibernateException {
if ( sqlAst.needsExecutor() ) {
throw new QueryExecutionRequestException( "Not supported for DML operations", hql );
}

View File

@ -2710,7 +2710,7 @@ public abstract class Loader {
return getResultList( result, queryParameters.getResultTransformer() );
}
private QueryKey generateQueryKey(
protected QueryKey generateQueryKey(
SharedSessionContractImplementor session,
QueryParameters queryParameters) {
return QueryKey.generateQueryKey(
@ -2722,7 +2722,7 @@ public abstract class Loader {
);
}
private CacheableResultTransformer createCacheableResultTransformer(QueryParameters queryParameters) {
protected CacheableResultTransformer createCacheableResultTransformer(QueryParameters queryParameters) {
return CacheableResultTransformer.create(
queryParameters.getResultTransformer(),
getResultRowAliases(),
@ -2730,7 +2730,7 @@ public abstract class Loader {
);
}
private List getResultFromQueryCache(
protected List getResultFromQueryCache(
final SharedSessionContractImplementor session,
final QueryParameters queryParameters,
final Set<Serializable> querySpaces,
@ -2786,7 +2786,7 @@ public abstract class Loader {
return result;
}
private EntityPersister getEntityPersister(EntityType entityType) {
protected EntityPersister getEntityPersister(EntityType entityType) {
return factory.getMetamodel().entityPersister( entityType.getAssociatedEntityName() );
}

View File

@ -402,7 +402,7 @@ public class QueryLoader extends BasicLoader {
return true;
}
private boolean hasSelectNew() {
protected boolean hasSelectNew() {
return aggregatedSelectExpression != null && aggregatedSelectExpression.getResultTransformer() != null;
}
@ -487,7 +487,7 @@ public class QueryLoader extends BasicLoader {
}
}
private HolderInstantiator buildHolderInstantiator(ResultTransformer queryLocalResultTransformer) {
protected HolderInstantiator buildHolderInstantiator(ResultTransformer queryLocalResultTransformer) {
final ResultTransformer implicitResultTransformer = aggregatedSelectExpression == null
? null
: aggregatedSelectExpression.getResultTransformer();
@ -506,7 +506,7 @@ public class QueryLoader extends BasicLoader {
return list( session, queryParameters, queryTranslator.getQuerySpaces(), queryReturnTypes );
}
private void checkQuery(QueryParameters queryParameters) {
protected void checkQuery(QueryParameters queryParameters) {
if ( hasSelectNew() && queryParameters.getResultTransformer() != null ) {
throw new QueryException( "ResultTransformer is not allowed for 'select new' queries." );
}