diff --git a/src/main/java/org/springframework/data/r2dbc/core/ReactiveDeleteOperationSupport.java b/src/main/java/org/springframework/data/r2dbc/core/ReactiveDeleteOperationSupport.java index e6adefea..db057ae0 100644 --- a/src/main/java/org/springframework/data/r2dbc/core/ReactiveDeleteOperationSupport.java +++ b/src/main/java/org/springframework/data/r2dbc/core/ReactiveDeleteOperationSupport.java @@ -45,7 +45,7 @@ public ReactiveDelete delete(Class domainType) { 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 @@ public DeleteWithQuery from(SqlIdentifier tableName) { 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 @@ public TerminatingDelete matching(Query query) { 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 @@ public TerminatingDelete matching(Query query) { * @see org.springframework.data.r2dbc.core.ReactiveDeleteOperation.TerminatingDelete#all() */ public Mono 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); } } } diff --git a/src/main/java/org/springframework/data/r2dbc/core/ReactiveInsertOperationSupport.java b/src/main/java/org/springframework/data/r2dbc/core/ReactiveInsertOperationSupport.java index e3082305..b6f9ae86 100644 --- a/src/main/java/org/springframework/data/r2dbc/core/ReactiveInsertOperationSupport.java +++ b/src/main/java/org/springframework/data/r2dbc/core/ReactiveInsertOperationSupport.java @@ -44,7 +44,7 @@ public ReactiveInsert insert(Class domainType) { Assert.notNull(domainType, "DomainType must not be null"); - return new ReactiveInsertSupport<>(this.template, domainType, null); + return new ReactiveInsertSupport<>(template, domainType, null); } static class ReactiveInsertSupport implements ReactiveInsert { @@ -69,7 +69,7 @@ public TerminatingInsert into(SqlIdentifier tableName) { 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 @@ public Mono using(T object) { 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); } } } diff --git a/src/main/java/org/springframework/data/r2dbc/core/ReactiveSelectOperationSupport.java b/src/main/java/org/springframework/data/r2dbc/core/ReactiveSelectOperationSupport.java index c86f33fb..1cfabb47 100644 --- a/src/main/java/org/springframework/data/r2dbc/core/ReactiveSelectOperationSupport.java +++ b/src/main/java/org/springframework/data/r2dbc/core/ReactiveSelectOperationSupport.java @@ -76,7 +76,7 @@ public SelectWithProjection from(SqlIdentifier tableName) { 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 @@ public SelectWithQuery as(Class returnType) { 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 @@ public TerminatingSelect matching(Query query) { 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 @@ public TerminatingSelect matching(Query query) { */ @Override public Mono count() { - return this.template.doCount(this.query, this.domainType, getTableName()); + return template.doCount(query, domainType, getTableName()); } /* @@ -118,7 +118,7 @@ public Mono count() { */ @Override public Mono exists() { - return this.template.doExists(this.query, this.domainType, getTableName()); + return template.doExists(query, domainType, getTableName()); } /* @@ -127,8 +127,7 @@ public Mono exists() { */ @Override public Mono 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 @@ public Mono first() { */ @Override public Mono 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 @@ public Mono one() { */ @Override public Flux 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); } } } diff --git a/src/main/java/org/springframework/data/r2dbc/core/ReactiveUpdateOperationSupport.java b/src/main/java/org/springframework/data/r2dbc/core/ReactiveUpdateOperationSupport.java index 800eb452..9f7d90e1 100644 --- a/src/main/java/org/springframework/data/r2dbc/core/ReactiveUpdateOperationSupport.java +++ b/src/main/java/org/springframework/data/r2dbc/core/ReactiveUpdateOperationSupport.java @@ -46,7 +46,7 @@ public ReactiveUpdate update(Class domainType) { 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 @@ public UpdateWithQuery inTable(SqlIdentifier tableName) { 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 @@ public TerminatingUpdate matching(Query query) { 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 @@ public Mono apply(Update update) { 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); } } }