Skip to content

Commit dd73625

Browse files
mp911deschauder
authored andcommitted
DATAJDBC-272 - Reformat code and optimize imports.
1 parent 6a60c53 commit dd73625

File tree

46 files changed

+130
-172
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+130
-172
lines changed

spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/SelectBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ private String whereClause() {
103103
return conditions.stream() //
104104
.map(WhereCondition::toSql) //
105105
.collect(Collectors.joining("AND", " WHERE ", "") //
106-
);
106+
);
107107
}
108108

109109
private String joinClause() {

spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/SqlGeneratorSource.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
import org.springframework.data.relational.core.mapping.RelationalMappingContext;
2424

2525
/**
26-
* Provides {@link SqlGenerator}s per domain type. Instances get cached, so when asked multiple times for the same domain
27-
* type, the same generator will get returned.
26+
* Provides {@link SqlGenerator}s per domain type. Instances get cached, so when asked multiple times for the same
27+
* domain type, the same generator will get returned.
2828
*
2929
* @author Jens Schauder
3030
*/

spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/mapping/AggregateReference.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@
2424
*
2525
* @param <T> the type of the referenced aggregate root.
2626
* @param <ID> the type of the id of the referenced aggregate root.
27-
*
2827
* @author Jens Schauder
29-
*
3028
* @since 1.0
3129
*/
3230
public interface AggregateReference<T, ID> {
@@ -42,9 +40,8 @@ static <T, ID> AggregateReference<T, ID> to(ID id) {
4240
ID getId();
4341

4442
/**
45-
* An {@link AggregateReference} that only holds the id of the referenced aggregate root.
46-
*
47-
* Note that there is no check that a matching aggregate for this id actually exists.
43+
* An {@link AggregateReference} that only holds the id of the referenced aggregate root. Note that there is no check
44+
* that a matching aggregate for this id actually exists.
4845
*
4946
* @param <T>
5047
* @param <ID>

spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/package-info.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
@NonNullApi
55
package org.springframework.data.jdbc.core;
66

7-
import org.springframework.lang.NonNullApi;
7+
import org.springframework.lang.NonNullApi;

spring-data-jdbc/src/main/java/org/springframework/data/jdbc/mybatis/MyBatisContext.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ public class MyBatisContext {
3333
private final Class domainType;
3434
private final Map<String, Object> additonalValues;
3535

36-
public MyBatisContext(@Nullable Object id, @Nullable Object instance, Class domainType, Map<String, Object> additonalValues) {
36+
public MyBatisContext(@Nullable Object id, @Nullable Object instance, Class domainType,
37+
Map<String, Object> additonalValues) {
3738

3839
this.id = id;
3940
this.instance = instance;

spring-data-jdbc/src/main/java/org/springframework/data/jdbc/mybatis/MyBatisDataAccessStrategy.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,7 @@ public void setNamespaceStrategy(NamespaceStrategy namespaceStrategy) {
131131
public <T> Object insert(T instance, Class<T> domainType, Map<String, Object> additionalParameters) {
132132

133133
MyBatisContext myBatisContext = new MyBatisContext(null, instance, domainType, additionalParameters);
134-
sqlSession().insert(namespace(domainType) + ".insert",
135-
myBatisContext);
134+
sqlSession().insert(namespace(domainType) + ".insert", myBatisContext);
136135

137136
return myBatisContext.getId();
138137
}

spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/config/EnableJdbcRepositories.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@
4545

4646
/**
4747
* Alias for the {@link #basePackages()} attribute. Allows for more concise annotation declarations e.g.:
48-
* {@code @EnableJdbcRepositories("org.my.pkg")} instead of {@code @EnableJdbcRepositories(basePackages="org.my.pkg")}.
48+
* {@code @EnableJdbcRepositories("org.my.pkg")} instead of
49+
* {@code @EnableJdbcRepositories(basePackages="org.my.pkg")}.
4950
*/
5051
String[] value() default {};
5152

spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/config/JdbcConfiguration.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
import org.springframework.data.jdbc.core.convert.BasicJdbcConverter;
2424
import org.springframework.data.jdbc.core.convert.JdbcCustomConversions;
2525
import org.springframework.data.jdbc.core.mapping.JdbcMappingContext;
26-
import org.springframework.data.relational.core.conversion.BasicRelationalConverter;
2726
import org.springframework.data.relational.core.conversion.RelationalConverter;
2827
import org.springframework.data.relational.core.mapping.NamingStrategy;
2928
import org.springframework.data.relational.core.mapping.RelationalMappingContext;
@@ -49,8 +48,7 @@ public class JdbcConfiguration {
4948
@Bean
5049
protected JdbcMappingContext jdbcMappingContext(Optional<NamingStrategy> namingStrategy) {
5150

52-
JdbcMappingContext mappingContext = new JdbcMappingContext(
53-
namingStrategy.orElse(NamingStrategy.INSTANCE));
51+
JdbcMappingContext mappingContext = new JdbcMappingContext(namingStrategy.orElse(NamingStrategy.INSTANCE));
5452
mappingContext.setSimpleTypeHolder(jdbcCustomConversions().getSimpleTypeHolder());
5553

5654
return mappingContext;

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,9 @@
2525
import org.springframework.jdbc.core.RowMapper;
2626

2727
/**
28-
* Annotation to provide SQL statements that will get used for executing the method.
29-
*
30-
* The SQL statement may contain named parameters as supported by {@link org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate}.
31-
* Those parameters will get bound to the arguments of the annotated method.
28+
* Annotation to provide SQL statements that will get used for executing the method. The SQL statement may contain named
29+
* parameters as supported by {@link org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate}. Those
30+
* parameters will get bound to the arguments of the annotated method.
3231
*
3332
* @author Jens Schauder
3433
*/

spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/support/JdbcRepositoryQuery.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ class JdbcRepositoryQuery implements RepositoryQuery {
5252
private final RowMapper<?> rowMapper;
5353

5454
/**
55-
* Creates a new {@link JdbcRepositoryQuery} for the given {@link JdbcQueryMethod}, {@link RelationalMappingContext} and
56-
* {@link RowMapper}.
55+
* Creates a new {@link JdbcRepositoryQuery} for the given {@link JdbcQueryMethod}, {@link RelationalMappingContext}
56+
* and {@link RowMapper}.
5757
*
5858
* @param publisher must not be {@literal null}.
5959
* @param context must not be {@literal null}.

0 commit comments

Comments
 (0)