HHH-3555 - more checkstyle cleanup
This commit is contained in:
parent
b1fef6c70b
commit
e01e9b52fb
|
@ -97,7 +97,8 @@ public class EntitiesConfigurations {
|
||||||
final EntityConfiguration entCfg;
|
final EntityConfiguration entCfg;
|
||||||
if ( isVersioned( entityName ) ) {
|
if ( isVersioned( entityName ) ) {
|
||||||
entCfg = get( entityName );
|
entCfg = get( entityName );
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
entCfg = getNotVersionEntityConfiguration( entityName );
|
entCfg = getNotVersionEntityConfiguration( entityName );
|
||||||
}
|
}
|
||||||
final RelationDescription relDesc = entCfg.getRelationDescription( propertyName );
|
final RelationDescription relDesc = entCfg.getRelationDescription( propertyName );
|
||||||
|
|
|
@ -158,7 +158,8 @@ public class QueryBuilder {
|
||||||
final String effectivePropertyName = propertyName == null ? "" : ".".concat( propertyName );
|
final String effectivePropertyName = propertyName == null ? "" : ".".concat( propertyName );
|
||||||
if ( function == null ) {
|
if ( function == null ) {
|
||||||
projections.add( (distinct ? "distinct " : "") + alias + effectivePropertyName );
|
projections.add( (distinct ? "distinct " : "") + alias + effectivePropertyName );
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
projections.add(
|
projections.add(
|
||||||
function + "(" + (distinct ? "distinct " : "") + alias +
|
function + "(" + (distinct ? "distinct " : "") + alias +
|
||||||
effectivePropertyName + ")"
|
effectivePropertyName + ")"
|
||||||
|
@ -193,7 +194,8 @@ public class QueryBuilder {
|
||||||
if (first) {
|
if (first) {
|
||||||
sb.append( " where " );
|
sb.append( " where " );
|
||||||
first = false;
|
first = false;
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
sb.append( " and " );
|
sb.append( " and " );
|
||||||
}
|
}
|
||||||
params.build( sb, queryParamValues );
|
params.build( sb, queryParamValues );
|
||||||
|
|
|
@ -284,7 +284,8 @@ public abstract class AbstractAuditQuery implements AuditQueryImplementor {
|
||||||
// qr is the value of the projection itself
|
// qr is the value of the projection itself
|
||||||
final Pair<String, AuditProjection> projection = projections.get( 0 );
|
final Pair<String, AuditProjection> projection = projections.get( 0 );
|
||||||
result.add( projection.getSecond().convertQueryResult( enversService, entityInstantiator, projection.getFirst(), revision, qr ) );
|
result.add( projection.getSecond().convertQueryResult( enversService, entityInstantiator, projection.getFirst(), revision, qr ) );
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
// qr is an array where each of its components holds the value of corresponding projection
|
// qr is an array where each of its components holds the value of corresponding projection
|
||||||
Object[] qresults = (Object[]) qr;
|
Object[] qresults = (Object[]) qr;
|
||||||
Object[] tresults = new Object[qresults.length];
|
Object[] tresults = new Object[qresults.length];
|
||||||
|
@ -295,7 +296,8 @@ public abstract class AbstractAuditQuery implements AuditQueryImplementor {
|
||||||
result.add( tresults );
|
result.add( tresults );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
entityInstantiator.addInstancesFromVersionsEntities( entityName, result, queryResult, revision );
|
entityInstantiator.addInstancesFromVersionsEntities( entityName, result, queryResult, revision );
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
|
|
@ -71,11 +71,11 @@ public class EntitiesModifiedAtRevisionQuery extends AbstractAuditQuery {
|
||||||
}
|
}
|
||||||
|
|
||||||
for (final AuditAssociationQueryImpl<?> associationQuery : associationQueries) {
|
for (final AuditAssociationQueryImpl<?> associationQuery : associationQueries) {
|
||||||
associationQuery.addCriterionsToQuery(versionsReader);
|
associationQuery.addCriterionsToQuery( versionsReader );
|
||||||
}
|
}
|
||||||
|
|
||||||
Query query = buildQuery();
|
Query query = buildQuery();
|
||||||
List queryResult = query.list();
|
List queryResult = query.list();
|
||||||
return applyProjections(queryResult, revision);
|
return applyProjections( queryResult, revision );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue