Skip to content

Commit b605daa

Browse files
committed
#215 - Polishing.
Formatting. Original pull request: #397.
1 parent 4140981 commit b605daa

File tree

4 files changed

+23
-25
lines changed

4 files changed

+23
-25
lines changed

src/main/java/org/springframework/data/r2dbc/core/ReactiveDeleteOperationSupport.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public ReactiveDelete delete(Class<?> domainType) {
4545

4646
Assert.notNull(domainType, "DomainType must not be null");
4747

48-
return new ReactiveDeleteSupport(this.template, domainType, Query.empty(), null);
48+
return new ReactiveDeleteSupport(template, domainType, Query.empty(), null);
4949
}
5050

5151
static class ReactiveDeleteSupport implements ReactiveDelete, TerminatingDelete {
@@ -73,7 +73,7 @@ public DeleteWithQuery from(SqlIdentifier tableName) {
7373

7474
Assert.notNull(tableName, "Table name must not be null");
7575

76-
return new ReactiveDeleteSupport(this.template, this.domainType, this.query, tableName);
76+
return new ReactiveDeleteSupport(template, domainType, query, tableName);
7777
}
7878

7979
/*
@@ -85,19 +85,19 @@ public TerminatingDelete matching(Query query) {
8585

8686
Assert.notNull(query, "Query must not be null");
8787

88-
return new ReactiveDeleteSupport(this.template, this.domainType, query, this.tableName);
88+
return new ReactiveDeleteSupport(template, domainType, query, tableName);
8989
}
9090

9191
/*
9292
* (non-Javadoc)
9393
* @see org.springframework.data.r2dbc.core.ReactiveDeleteOperation.TerminatingDelete#all()
9494
*/
9595
public Mono<Integer> all() {
96-
return this.template.doDelete(this.query, this.domainType, getTableName());
96+
return template.doDelete(query, domainType, getTableName());
9797
}
9898

9999
private SqlIdentifier getTableName() {
100-
return this.tableName != null ? this.tableName : this.template.getTableName(this.domainType);
100+
return tableName != null ? tableName : template.getTableName(domainType);
101101
}
102102
}
103103
}

src/main/java/org/springframework/data/r2dbc/core/ReactiveInsertOperationSupport.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public <T> ReactiveInsert<T> insert(Class<T> domainType) {
4444

4545
Assert.notNull(domainType, "DomainType must not be null");
4646

47-
return new ReactiveInsertSupport<>(this.template, domainType, null);
47+
return new ReactiveInsertSupport<>(template, domainType, null);
4848
}
4949

5050
static class ReactiveInsertSupport<T> implements ReactiveInsert<T> {
@@ -69,7 +69,7 @@ public TerminatingInsert<T> into(SqlIdentifier tableName) {
6969

7070
Assert.notNull(tableName, "Table name must not be null");
7171

72-
return new ReactiveInsertSupport<>(this.template, this.domainType, tableName);
72+
return new ReactiveInsertSupport<>(template, domainType, tableName);
7373
}
7474

7575
/*
@@ -81,11 +81,11 @@ public Mono<T> using(T object) {
8181

8282
Assert.notNull(object, "Object to insert must not be null");
8383

84-
return this.template.doInsert(object, getTableName());
84+
return template.doInsert(object, getTableName());
8585
}
8686

8787
private SqlIdentifier getTableName() {
88-
return this.tableName != null ? this.tableName : this.template.getTableName(this.domainType);
88+
return tableName != null ? tableName : template.getTableName(domainType);
8989
}
9090
}
9191
}

src/main/java/org/springframework/data/r2dbc/core/ReactiveSelectOperationSupport.java

+9-11
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public SelectWithProjection<T> from(SqlIdentifier tableName) {
7676

7777
Assert.notNull(tableName, "Table name must not be null");
7878

79-
return new ReactiveSelectSupport<>(this.template, this.domainType, this.returnType, this.query, tableName);
79+
return new ReactiveSelectSupport<>(template, domainType, returnType, query, tableName);
8080
}
8181

8282
/*
@@ -88,7 +88,7 @@ public <R> SelectWithQuery<R> as(Class<R> returnType) {
8888

8989
Assert.notNull(returnType, "ReturnType must not be null");
9090

91-
return new ReactiveSelectSupport<>(this.template, this.domainType, returnType, this.query, this.tableName);
91+
return new ReactiveSelectSupport<>(template, domainType, returnType, query, tableName);
9292
}
9393

9494
/*
@@ -100,7 +100,7 @@ public TerminatingSelect<T> matching(Query query) {
100100

101101
Assert.notNull(query, "Query must not be null");
102102

103-
return new ReactiveSelectSupport<>(this.template, this.domainType, this.returnType, query, this.tableName);
103+
return new ReactiveSelectSupport<>(template, domainType, returnType, query, tableName);
104104
}
105105

106106
/*
@@ -109,7 +109,7 @@ public TerminatingSelect<T> matching(Query query) {
109109
*/
110110
@Override
111111
public Mono<Long> count() {
112-
return this.template.doCount(this.query, this.domainType, getTableName());
112+
return template.doCount(query, domainType, getTableName());
113113
}
114114

115115
/*
@@ -118,7 +118,7 @@ public Mono<Long> count() {
118118
*/
119119
@Override
120120
public Mono<Boolean> exists() {
121-
return this.template.doExists(this.query, this.domainType, getTableName());
121+
return template.doExists(query, domainType, getTableName());
122122
}
123123

124124
/*
@@ -127,8 +127,7 @@ public Mono<Boolean> exists() {
127127
*/
128128
@Override
129129
public Mono<T> first() {
130-
return this.template.doSelect(this.query.limit(1), this.domainType, getTableName(), this.returnType,
131-
RowsFetchSpec::first);
130+
return template.doSelect(query.limit(1), domainType, getTableName(), returnType, RowsFetchSpec::first);
132131
}
133132

134133
/*
@@ -137,8 +136,7 @@ public Mono<T> first() {
137136
*/
138137
@Override
139138
public Mono<T> one() {
140-
return this.template.doSelect(this.query.limit(2), this.domainType, getTableName(), this.returnType,
141-
RowsFetchSpec::one);
139+
return template.doSelect(query.limit(2), domainType, getTableName(), returnType, RowsFetchSpec::one);
142140
}
143141

144142
/*
@@ -147,11 +145,11 @@ public Mono<T> one() {
147145
*/
148146
@Override
149147
public Flux<T> all() {
150-
return this.template.doSelect(this.query, this.domainType, getTableName(), this.returnType, RowsFetchSpec::all);
148+
return template.doSelect(query, domainType, getTableName(), returnType, RowsFetchSpec::all);
151149
}
152150

153151
private SqlIdentifier getTableName() {
154-
return this.tableName != null ? this.tableName : this.template.getTableName(this.domainType);
152+
return tableName != null ? tableName : template.getTableName(domainType);
155153
}
156154
}
157155
}

src/main/java/org/springframework/data/r2dbc/core/ReactiveUpdateOperationSupport.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public ReactiveUpdate update(Class<?> domainType) {
4646

4747
Assert.notNull(domainType, "DomainType must not be null");
4848

49-
return new ReactiveUpdateSupport(this.template, domainType, Query.empty(), null);
49+
return new ReactiveUpdateSupport(template, domainType, Query.empty(), null);
5050
}
5151

5252
static class ReactiveUpdateSupport implements ReactiveUpdate, TerminatingUpdate {
@@ -74,7 +74,7 @@ public UpdateWithQuery inTable(SqlIdentifier tableName) {
7474

7575
Assert.notNull(tableName, "Table name must not be null");
7676

77-
return new ReactiveUpdateSupport(this.template, this.domainType, this.query, tableName);
77+
return new ReactiveUpdateSupport(template, domainType, query, tableName);
7878
}
7979

8080
/*
@@ -86,7 +86,7 @@ public TerminatingUpdate matching(Query query) {
8686

8787
Assert.notNull(query, "Query must not be null");
8888

89-
return new ReactiveUpdateSupport(this.template, this.domainType, query, this.tableName);
89+
return new ReactiveUpdateSupport(template, domainType, query, tableName);
9090
}
9191

9292
/*
@@ -98,11 +98,11 @@ public Mono<Integer> apply(Update update) {
9898

9999
Assert.notNull(update, "Update must not be null");
100100

101-
return this.template.doUpdate(this.query, update, this.domainType, getTableName());
101+
return template.doUpdate(query, update, domainType, getTableName());
102102
}
103103

104104
private SqlIdentifier getTableName() {
105-
return this.tableName != null ? this.tableName : this.template.getTableName(this.domainType);
105+
return tableName != null ? tableName : template.getTableName(this.domainType);
106106
}
107107
}
108108
}

0 commit comments

Comments
 (0)