Skip to content

Commit 384ca21

Browse files
committed
DATAJDBC-318 - Formatting.
1 parent 208cee4 commit 384ca21

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/query/PartTreeJdbcQuery.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,11 @@ public PartTreeJdbcQuery(JdbcQueryMethod queryMethod, Dialect dialect, JdbcConve
6464
this.converter = converter;
6565

6666
try {
67+
6768
this.tree = new PartTree(queryMethod.getName(), queryMethod.getEntityInformation().getJavaType());
6869
JdbcQueryCreator.validate(this.tree, this.parameters);
6970
} catch (RuntimeException e) {
71+
7072
throw new IllegalArgumentException(
7173
String.format("Failed to create query for method %s! %s", queryMethod, e.getMessage()), e);
7274
}

spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/query/QueryMapper.java

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ List<OrderByField> getMappedSort(Table table, Sort sort, @Nullable RelationalPer
102102
}
103103

104104
/**
105-
* Map the {@link Expression} object to apply field name mapping using {@link RelationalPersistentEntity the type to read}.
105+
* Map the {@link Expression} object to apply field name mapping using {@link RelationalPersistentEntity the type to
106+
* read}.
106107
*
107108
* @param expression must not be {@literal null}.
108109
* @param entity related {@link RelationalPersistentEntity}, can be {@literal null}.
@@ -155,7 +156,7 @@ Expression getMappedObject(Expression expression, @Nullable RelationalPersistent
155156
* @return the mapped {@link Condition}.
156157
*/
157158
Condition getMappedObject(MapSqlParameterSource parameterSource, CriteriaDefinition criteria, Table table,
158-
@Nullable RelationalPersistentEntity<?> entity) {
159+
@Nullable RelationalPersistentEntity<?> entity) {
159160

160161
Assert.notNull(parameterSource, "MapSqlParameterSource must not be null!");
161162
Assert.notNull(criteria, "CriteriaDefinition must not be null!");
@@ -351,13 +352,13 @@ protected Object convertValue(@Nullable Object value, TypeInformation<?> typeInf
351352

352353
Pair<Object, Object> pair = (Pair<Object, Object>) value;
353354

354-
Object first = convertValue(pair.getFirst(),
355-
typeInformation.getActualType() != null ? typeInformation.getRequiredActualType()
356-
: ClassTypeInformation.OBJECT);
355+
Object first = convertValue(pair.getFirst(), typeInformation.getActualType() != null //
356+
? typeInformation.getRequiredActualType()
357+
: ClassTypeInformation.OBJECT);
357358

358-
Object second = convertValue(pair.getSecond(),
359-
typeInformation.getActualType() != null ? typeInformation.getRequiredActualType()
360-
: ClassTypeInformation.OBJECT);
359+
Object second = convertValue(pair.getSecond(), typeInformation.getActualType() != null //
360+
? typeInformation.getRequiredActualType()
361+
: ClassTypeInformation.OBJECT);
361362

362363
return Pair.of(first, second);
363364
}
@@ -367,6 +368,7 @@ protected Object convertValue(@Nullable Object value, TypeInformation<?> typeInf
367368
List<Object> mapped = new ArrayList<>();
368369

369370
for (Object o : (Iterable<?>) value) {
371+
370372
mapped.add(convertValue(o, typeInformation.getActualType() != null ? typeInformation.getRequiredActualType()
371373
: ClassTypeInformation.OBJECT));
372374
}
@@ -500,10 +502,6 @@ Field createPropertyField(@Nullable RelationalPersistentEntity<?> entity, SqlIde
500502
return entity == null ? new Field(key) : new MetadataBackedField(key, entity, mappingContext, converter);
501503
}
502504

503-
Class<?> getTypeHint(@Nullable Object mappedValue, Class<?> propertyType) {
504-
return propertyType;
505-
}
506-
507505
int getTypeHint(@Nullable Object mappedValue, Class<?> propertyType, JdbcValue settableValue) {
508506

509507
if (mappedValue == null || propertyType.equals(Object.class)) {

0 commit comments

Comments
 (0)