Skip to content

Commit 046cdc4

Browse files
committed
#64 - Last cleanups.
1 parent dcc46de commit 046cdc4

File tree

8 files changed

+24
-30
lines changed

8 files changed

+24
-30
lines changed

src/main/java/org/springframework/data/r2dbc/function/DatabaseClient.java

+5-6
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,7 @@ interface UpdateTableSpec {
315315
* Specify the target table to update to using the {@link Class entity class}.
316316
*
317317
* @param table must not be {@literal null}.
318-
* @return a {@link GenericUpdateSpec} for further configuration of the update. Guaranteed to be not
319-
* {@literal null}.
318+
* @return a {@link TypedUpdateSpec} for further configuration of the update. Guaranteed to be not {@literal null}.
320319
*/
321320
<T> TypedUpdateSpec<T> table(Class<T> table);
322321
}
@@ -330,7 +329,7 @@ interface DeleteFromSpec {
330329
* Specify the source {@literal table} to delete from.
331330
*
332331
* @param table must not be {@literal null} or empty.
333-
* @return a {@link GenericSelectSpec} for further configuration of the delete. Guaranteed to be not
332+
* @return a {@link DeleteMatchingSpec} for further configuration of the delete. Guaranteed to be not
334333
* {@literal null}.
335334
*/
336335
DeleteMatchingSpec from(String table);
@@ -339,7 +338,7 @@ interface DeleteFromSpec {
339338
* Specify the source table to delete from to using the {@link Class entity class}.
340339
*
341340
* @param table must not be {@literal null}.
342-
* @return a {@link DeleteSpec} for further configuration of the delete. Guaranteed to be not {@literal null}.
341+
* @return a {@link TypedDeleteSpec} for further configuration of the delete. Guaranteed to be not {@literal null}.
343342
*/
344343
<T> TypedDeleteSpec<T> from(Class<T> table);
345344
}
@@ -549,7 +548,7 @@ interface InsertSpec<T> {
549548
interface GenericUpdateSpec {
550549

551550
/**
552-
* Specify an {@link Update} object containing the assignments.
551+
* Specify an {@link Update} object containing assignments.
553552
*
554553
* @param update must not be {@literal null}.
555554
*/
@@ -619,7 +618,7 @@ interface TypedDeleteSpec<T> extends DeleteSpec {
619618
* Use the given {@code tableName} as delete target.
620619
*
621620
* @param tableName must not be {@literal null} or empty.
622-
* @return a {@link TypedUpdateSpec} for further configuration of the delete. Guaranteed to be not {@literal null}.
621+
* @return a {@link TypedDeleteSpec} for further configuration of the delete. Guaranteed to be not {@literal null}.
623622
*/
624623
TypedDeleteSpec<T> table(String tableName);
625624

src/main/java/org/springframework/data/r2dbc/function/DefaultDatabaseClient.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -1325,8 +1325,7 @@ private UpdatedRowsFetchSpec exchangeUpdate(PreparedOperation<?> operation) {
13251325

13261326
private static Mono<Integer> sumRowsUpdated(Function<Connection, Flux<Result>> resultFunction, Connection it) {
13271327

1328-
return resultFunction //
1329-
.apply(it) //
1328+
return resultFunction.apply(it) //
13301329
.flatMap(Result::getRowsUpdated) //
13311330
.collect(Collectors.summingInt(Integer::intValue));
13321331
}

src/main/java/org/springframework/data/r2dbc/function/DefaultStatementMapper.java

-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ private PreparedOperation<Select> getMappedObject(SelectSpec selectSpec,
126126
} else {
127127
limit = OptionalLong.empty();
128128
offset = OptionalLong.empty();
129-
130129
}
131130

132131
Select select = selectBuilder.build();

src/main/java/org/springframework/data/r2dbc/function/StatementMapper.java

+3-5
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,10 @@ public interface StatementMapper {
8686
*
8787
* @param <T>
8888
*/
89-
interface TypedStatementMapper<T> extends StatementMapper {
90-
91-
}
89+
interface TypedStatementMapper<T> extends StatementMapper {}
9290

9391
/**
94-
* Create an {@code SELECT} specification for {@code table}.
92+
* Create a {@code SELECT} specification for {@code table}.
9593
*
9694
* @param table
9795
* @return the {@link SelectSpec}.
@@ -121,7 +119,7 @@ default UpdateSpec createUpdate(String table, Update update) {
121119
}
122120

123121
/**
124-
* Create an {@code DELETE} specification for {@code table}.
122+
* Create a {@code DELETE} specification for {@code table}.
125123
*
126124
* @param table
127125
* @return the {@link DeleteSpec}.

src/main/java/org/springframework/data/r2dbc/function/query/BoundAssignments.java

+3-4
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,10 @@
1919

2020
import org.springframework.data.r2dbc.function.operation.Bindings;
2121
import org.springframework.data.relational.core.sql.Assignment;
22-
import org.springframework.data.relational.core.sql.Condition;
2322
import org.springframework.util.Assert;
2423

2524
/**
26-
* Value object representing a {@link Condition} with its {@link Bindings}.
25+
* Value object representing {@link Assignment}s with their {@link Bindings}.
2726
*
2827
* @author Mark Paluch
2928
*/
@@ -35,8 +34,8 @@ public class BoundAssignments {
3534

3635
public BoundAssignments(Bindings bindings, List<Assignment> assignments) {
3736

38-
Assert.notNull(bindings, "Bindings must not be null");
39-
Assert.notNull(assignments, "Assignments must not be null");
37+
Assert.notNull(bindings, "Bindings must not be null!");
38+
Assert.notNull(assignments, "Assignments must not be null!");
4039

4140
this.bindings = bindings;
4241
this.assignments = assignments;

src/main/java/org/springframework/data/r2dbc/function/query/BoundCondition.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ public class BoundCondition {
3232

3333
public BoundCondition(Bindings bindings, Condition condition) {
3434

35-
Assert.notNull(bindings, "Bindings must not be null");
36-
Assert.notNull(condition, "Condition must not be null");
35+
Assert.notNull(bindings, "Bindings must not be null!");
36+
Assert.notNull(condition, "Condition must not be null!");
3737

3838
this.bindings = bindings;
3939
this.condition = condition;

src/main/java/org/springframework/data/r2dbc/function/query/Criteria.java

+7-7
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ static class DefaultCriteriaStep implements CriteriaStep {
280280
@Override
281281
public Criteria is(Object value) {
282282

283-
Assert.notNull(value, "Value must not be null");
283+
Assert.notNull(value, "Value must not be null!");
284284

285285
return createCriteria(Comparator.EQ, value);
286286
}
@@ -292,7 +292,7 @@ public Criteria is(Object value) {
292292
@Override
293293
public Criteria not(Object value) {
294294

295-
Assert.notNull(value, "Value must not be null");
295+
Assert.notNull(value, "Value must not be null!");
296296

297297
return createCriteria(Comparator.NEQ, value);
298298
}
@@ -362,7 +362,7 @@ public Criteria notIn(Collection<?> values) {
362362
@Override
363363
public Criteria lessThan(Object value) {
364364

365-
Assert.notNull(value, "Value must not be null");
365+
Assert.notNull(value, "Value must not be null!");
366366

367367
return createCriteria(Comparator.LT, value);
368368
}
@@ -374,7 +374,7 @@ public Criteria lessThan(Object value) {
374374
@Override
375375
public Criteria lessThanOrEquals(Object value) {
376376

377-
Assert.notNull(value, "Value must not be null");
377+
Assert.notNull(value, "Value must not be null!");
378378

379379
return createCriteria(Comparator.LTE, value);
380380
}
@@ -386,7 +386,7 @@ public Criteria lessThanOrEquals(Object value) {
386386
@Override
387387
public Criteria greaterThan(Object value) {
388388

389-
Assert.notNull(value, "Value must not be null");
389+
Assert.notNull(value, "Value must not be null!");
390390

391391
return createCriteria(Comparator.GT, value);
392392
}
@@ -398,7 +398,7 @@ public Criteria greaterThan(Object value) {
398398
@Override
399399
public Criteria greaterThanOrEquals(Object value) {
400400

401-
Assert.notNull(value, "Value must not be null");
401+
Assert.notNull(value, "Value must not be null!");
402402

403403
return createCriteria(Comparator.GTE, value);
404404
}
@@ -410,7 +410,7 @@ public Criteria greaterThanOrEquals(Object value) {
410410
@Override
411411
public Criteria like(Object value) {
412412

413-
Assert.notNull(value, "Value must not be null");
413+
Assert.notNull(value, "Value must not be null!");
414414

415415
return createCriteria(Comparator.LIKE, value);
416416
}

src/main/java/org/springframework/data/r2dbc/function/query/UpdateMapper.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ public BoundAssignments getMappedObject(BindMarkers markers, Update update, Tabl
7878
public BoundAssignments getMappedObject(BindMarkers markers, Map<String, ? extends Object> assignments, Table table,
7979
@Nullable RelationalPersistentEntity<?> entity) {
8080

81-
Assert.notNull(markers, "BindMarkers must not be null");
82-
Assert.notNull(assignments, "Assignments must not be null");
83-
Assert.notNull(table, "Table must not be null");
81+
Assert.notNull(markers, "BindMarkers must not be null!");
82+
Assert.notNull(assignments, "Assignments must not be null!");
83+
Assert.notNull(table, "Table must not be null!");
8484

8585
MutableBindings bindings = new MutableBindings(markers);
8686
List<Assignment> result = new ArrayList<>();

0 commit comments

Comments
 (0)