HHH-5645 - Fix Checkstyle errors

This commit is contained in:
Andrea Boriero 2017-11-20 11:48:44 +00:00
parent d330fdcfca
commit 877e790995
4 changed files with 35 additions and 35 deletions

View File

@ -36,11 +36,11 @@ public abstract class OuterJoinLoader extends BasicLoader {
protected String[] suffixes;
protected String[] collectionSuffixes;
private LoadQueryInfluencers loadQueryInfluencers;
private LoadQueryInfluencers loadQueryInfluencers;
protected final Dialect getDialect() {
return getFactory().getDialect();
}
return getFactory().getDialect();
}
public OuterJoinLoader(
SessionFactoryImplementor factory,

View File

@ -154,7 +154,7 @@ public class CriteriaLoader extends OuterJoinLoader {
for ( int i=0, pos=0; i<result.length; i++ ) {
int numColumns = types[i].getColumnSpan( session.getFactory() );
if ( numColumns > 1 ) {
String[] typeColumnAliases = ArrayHelper.slice( columnAliases, pos, numColumns );
String[] typeColumnAliases = ArrayHelper.slice( columnAliases, pos, numColumns );
result[i] = types[i].nullSafeGet(rs, typeColumnAliases, session, null);
}
else {
@ -207,8 +207,8 @@ public class CriteriaLoader extends OuterJoinLoader {
if ( ( parameters.getLockOptions().getFollowOnLocking() == null && dialect.useFollowOnLocking( parameters ) ) ||
( parameters.getLockOptions().getFollowOnLocking() != null && parameters.getLockOptions().getFollowOnLocking() ) ) {
final LockMode lockMode = determineFollowOnLockMode( lockOptions );
if( lockMode != LockMode.UPGRADE_SKIPLOCKED ) {
final LockMode lockMode = determineFollowOnLockMode( lockOptions );
if ( lockMode != LockMode.UPGRADE_SKIPLOCKED ) {
// Dialect prefers to perform locking in a separate step
LOG.usingFollowOnLocking();
@ -223,7 +223,7 @@ public class CriteriaLoader extends OuterJoinLoader {
( (Session) session ).buildLockRequest( lockOptionsToUse )
.lock( persister.getEntityName(), entity );
}
}
}
);
parameters.setLockOptions( new LockOptions() );
return sql;

View File

@ -67,26 +67,26 @@ public class CriteriaQueryTranslator implements CriteriaQuery {
private final Map<String, Criteria> associationPathCriteriaMap = new LinkedHashMap<String, Criteria>();
private final Map<String, JoinType> associationPathJoinTypesMap = new LinkedHashMap<String,JoinType>();
private final Map<String, Criterion> withClauseMap = new HashMap<String, Criterion>();
private Set<String> associations;
private Set<String> associations;
private final SessionFactoryImplementor sessionFactory;
private final SessionFactoryHelper helper;
public CriteriaQueryTranslator(
final SessionFactoryImplementor factory,
final CriteriaImpl criteria,
final String rootEntityName,
final String rootSQLAlias,
CriteriaQuery outerQuery) throws HibernateException {
final CriteriaImpl criteria,
final String rootEntityName,
final String rootSQLAlias,
CriteriaQuery outerQuery) throws HibernateException {
this( factory, criteria, rootEntityName, rootSQLAlias );
outerQueryTranslator = outerQuery;
}
public CriteriaQueryTranslator(
final SessionFactoryImplementor factory,
final CriteriaImpl criteria,
final String rootEntityName,
final String rootSQLAlias) throws HibernateException {
final CriteriaImpl criteria,
final String rootEntityName,
final String rootSQLAlias) throws HibernateException {
this.rootCriteria = criteria;
this.rootEntityName = rootEntityName;
this.sessionFactory = factory;
@ -344,17 +344,17 @@ public class CriteriaQueryTranslator implements CriteriaQuery {
final Type[] typeArray = ArrayHelper.toTypeArray( types );
return new QueryParameters(
typeArray,
valueArray,
lockOptions,
selection,
rootCriteria.isReadOnlyInitialized(),
( rootCriteria.isReadOnlyInitialized() && rootCriteria.isReadOnly() ),
rootCriteria.getCacheable(),
rootCriteria.getCacheRegion(),
rootCriteria.getComment(),
rootCriteria.getQueryHints(),
rootCriteria.isLookupByNaturalKey(),
rootCriteria.getResultTransformer()
valueArray,
lockOptions,
selection,
rootCriteria.isReadOnlyInitialized(),
( rootCriteria.isReadOnlyInitialized() && rootCriteria.isReadOnly() ),
rootCriteria.getCacheable(),
rootCriteria.getCacheRegion(),
rootCriteria.getComment(),
rootCriteria.getQueryHints(),
rootCriteria.isLookupByNaturalKey(),
rootCriteria.getResultTransformer()
);
}
@ -375,8 +375,8 @@ public class CriteriaQueryTranslator implements CriteriaQuery {
public String getSelect() {
return rootCriteria.getProjection().toSqlString(
rootCriteria.getProjectionCriteria(),
0,
this
0,
this
);
}
@ -458,7 +458,7 @@ public class CriteriaQueryTranslator implements CriteriaQuery {
@Override
public String[] getColumnsUsingProjection(
Criteria subcriteria,
String propertyName) throws HibernateException {
String propertyName) throws HibernateException {
//first look for a reference to a projection alias
final Projection projection = rootCriteria.getProjection();
@ -512,11 +512,11 @@ public class CriteriaQueryTranslator implements CriteriaQuery {
@Override
public String[] getColumns(
String propertyName,
Criteria subcriteria) throws HibernateException {
Criteria subcriteria) throws HibernateException {
return getPropertyMapping( getEntityName( subcriteria, propertyName ) )
.toColumns(
getSQLAlias( subcriteria, propertyName ),
getPropertyName( propertyName )
getPropertyName( propertyName )
);
}
@ -549,8 +549,8 @@ public class CriteriaQueryTranslator implements CriteriaQuery {
//first look for a reference to a projection alias
final Projection projection = rootCriteria.getProjection();
Type[] projectionTypes = projection == null ?
null :
projection.getTypes( propertyName, subcriteria, this );
null :
projection.getTypes( propertyName, subcriteria, this );
if ( projectionTypes == null ) {
try {

View File

@ -683,8 +683,8 @@ public abstract class CollectionType extends AbstractType implements Association
// for a null target, or a target which is the same as the original, we
// need to put the merged elements in a new collection
Object result = ( target == null ||
target == original ||
target == LazyPropertyInitializer.UNFETCHED_PROPERTY ) ?
target == original ||
target == LazyPropertyInitializer.UNFETCHED_PROPERTY ) ?
instantiateResult( original ) : target;
//for arrays, replaceElements() may return a different reference, since