#215 - Polishing.

Formatting.

Original pull request: #397.
This commit is contained in:
Jens Schauder
2020-07-22 13:55:54 +02:00
parent 4140981159
commit b605daa0e8
4 changed files with 23 additions and 25 deletions

View File

@@ -45,7 +45,7 @@ class ReactiveDeleteOperationSupport implements ReactiveDeleteOperation {
Assert.notNull(domainType, "DomainType must not be null");
return new ReactiveDeleteSupport(this.template, domainType, Query.empty(), null);
return new ReactiveDeleteSupport(template, domainType, Query.empty(), null);
}
static class ReactiveDeleteSupport implements ReactiveDelete, TerminatingDelete {
@@ -73,7 +73,7 @@ class ReactiveDeleteOperationSupport implements ReactiveDeleteOperation {
Assert.notNull(tableName, "Table name must not be null");
return new ReactiveDeleteSupport(this.template, this.domainType, this.query, tableName);
return new ReactiveDeleteSupport(template, domainType, query, tableName);
}
/*
@@ -85,7 +85,7 @@ class ReactiveDeleteOperationSupport implements ReactiveDeleteOperation {
Assert.notNull(query, "Query must not be null");
return new ReactiveDeleteSupport(this.template, this.domainType, query, this.tableName);
return new ReactiveDeleteSupport(template, domainType, query, tableName);
}
/*
@@ -93,11 +93,11 @@ class ReactiveDeleteOperationSupport implements ReactiveDeleteOperation {
* @see org.springframework.data.r2dbc.core.ReactiveDeleteOperation.TerminatingDelete#all()
*/
public Mono<Integer> all() {
return this.template.doDelete(this.query, this.domainType, getTableName());
return template.doDelete(query, domainType, getTableName());
}
private SqlIdentifier getTableName() {
return this.tableName != null ? this.tableName : this.template.getTableName(this.domainType);
return tableName != null ? tableName : template.getTableName(domainType);
}
}
}

View File

@@ -44,7 +44,7 @@ class ReactiveInsertOperationSupport implements ReactiveInsertOperation {
Assert.notNull(domainType, "DomainType must not be null");
return new ReactiveInsertSupport<>(this.template, domainType, null);
return new ReactiveInsertSupport<>(template, domainType, null);
}
static class ReactiveInsertSupport<T> implements ReactiveInsert<T> {
@@ -69,7 +69,7 @@ class ReactiveInsertOperationSupport implements ReactiveInsertOperation {
Assert.notNull(tableName, "Table name must not be null");
return new ReactiveInsertSupport<>(this.template, this.domainType, tableName);
return new ReactiveInsertSupport<>(template, domainType, tableName);
}
/*
@@ -81,11 +81,11 @@ class ReactiveInsertOperationSupport implements ReactiveInsertOperation {
Assert.notNull(object, "Object to insert must not be null");
return this.template.doInsert(object, getTableName());
return template.doInsert(object, getTableName());
}
private SqlIdentifier getTableName() {
return this.tableName != null ? this.tableName : this.template.getTableName(this.domainType);
return tableName != null ? tableName : template.getTableName(domainType);
}
}
}

View File

@@ -76,7 +76,7 @@ class ReactiveSelectOperationSupport implements ReactiveSelectOperation {
Assert.notNull(tableName, "Table name must not be null");
return new ReactiveSelectSupport<>(this.template, this.domainType, this.returnType, this.query, tableName);
return new ReactiveSelectSupport<>(template, domainType, returnType, query, tableName);
}
/*
@@ -88,7 +88,7 @@ class ReactiveSelectOperationSupport implements ReactiveSelectOperation {
Assert.notNull(returnType, "ReturnType must not be null");
return new ReactiveSelectSupport<>(this.template, this.domainType, returnType, this.query, this.tableName);
return new ReactiveSelectSupport<>(template, domainType, returnType, query, tableName);
}
/*
@@ -100,7 +100,7 @@ class ReactiveSelectOperationSupport implements ReactiveSelectOperation {
Assert.notNull(query, "Query must not be null");
return new ReactiveSelectSupport<>(this.template, this.domainType, this.returnType, query, this.tableName);
return new ReactiveSelectSupport<>(template, domainType, returnType, query, tableName);
}
/*
@@ -109,7 +109,7 @@ class ReactiveSelectOperationSupport implements ReactiveSelectOperation {
*/
@Override
public Mono<Long> count() {
return this.template.doCount(this.query, this.domainType, getTableName());
return template.doCount(query, domainType, getTableName());
}
/*
@@ -118,7 +118,7 @@ class ReactiveSelectOperationSupport implements ReactiveSelectOperation {
*/
@Override
public Mono<Boolean> exists() {
return this.template.doExists(this.query, this.domainType, getTableName());
return template.doExists(query, domainType, getTableName());
}
/*
@@ -127,8 +127,7 @@ class ReactiveSelectOperationSupport implements ReactiveSelectOperation {
*/
@Override
public Mono<T> first() {
return this.template.doSelect(this.query.limit(1), this.domainType, getTableName(), this.returnType,
RowsFetchSpec::first);
return template.doSelect(query.limit(1), domainType, getTableName(), returnType, RowsFetchSpec::first);
}
/*
@@ -137,8 +136,7 @@ class ReactiveSelectOperationSupport implements ReactiveSelectOperation {
*/
@Override
public Mono<T> one() {
return this.template.doSelect(this.query.limit(2), this.domainType, getTableName(), this.returnType,
RowsFetchSpec::one);
return template.doSelect(query.limit(2), domainType, getTableName(), returnType, RowsFetchSpec::one);
}
/*
@@ -147,11 +145,11 @@ class ReactiveSelectOperationSupport implements ReactiveSelectOperation {
*/
@Override
public Flux<T> all() {
return this.template.doSelect(this.query, this.domainType, getTableName(), this.returnType, RowsFetchSpec::all);
return template.doSelect(query, domainType, getTableName(), returnType, RowsFetchSpec::all);
}
private SqlIdentifier getTableName() {
return this.tableName != null ? this.tableName : this.template.getTableName(this.domainType);
return tableName != null ? tableName : template.getTableName(domainType);
}
}
}

View File

@@ -46,7 +46,7 @@ class ReactiveUpdateOperationSupport implements ReactiveUpdateOperation {
Assert.notNull(domainType, "DomainType must not be null");
return new ReactiveUpdateSupport(this.template, domainType, Query.empty(), null);
return new ReactiveUpdateSupport(template, domainType, Query.empty(), null);
}
static class ReactiveUpdateSupport implements ReactiveUpdate, TerminatingUpdate {
@@ -74,7 +74,7 @@ class ReactiveUpdateOperationSupport implements ReactiveUpdateOperation {
Assert.notNull(tableName, "Table name must not be null");
return new ReactiveUpdateSupport(this.template, this.domainType, this.query, tableName);
return new ReactiveUpdateSupport(template, domainType, query, tableName);
}
/*
@@ -86,7 +86,7 @@ class ReactiveUpdateOperationSupport implements ReactiveUpdateOperation {
Assert.notNull(query, "Query must not be null");
return new ReactiveUpdateSupport(this.template, this.domainType, query, this.tableName);
return new ReactiveUpdateSupport(template, domainType, query, tableName);
}
/*
@@ -98,11 +98,11 @@ class ReactiveUpdateOperationSupport implements ReactiveUpdateOperation {
Assert.notNull(update, "Update must not be null");
return this.template.doUpdate(this.query, update, this.domainType, getTableName());
return template.doUpdate(query, update, domainType, getTableName());
}
private SqlIdentifier getTableName() {
return this.tableName != null ? this.tableName : this.template.getTableName(this.domainType);
return tableName != null ? tableName : template.getTableName(this.domainType);
}
}
}