From b605daa0e81c056297fe8ed1d80c483828cdfac9 Mon Sep 17 00:00:00 2001 From: Jens Schauder Date: Wed, 22 Jul 2020 13:55:54 +0200 Subject: [PATCH] #215 - Polishing. Formatting. Original pull request: #397. --- .../core/ReactiveDeleteOperationSupport.java | 10 +++++----- .../core/ReactiveInsertOperationSupport.java | 8 ++++---- .../core/ReactiveSelectOperationSupport.java | 20 +++++++++---------- .../core/ReactiveUpdateOperationSupport.java | 10 +++++----- 4 files changed, 23 insertions(+), 25 deletions(-) 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 e6adefe..db057ae 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 @@ 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 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 e308230..b6f9ae8 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 @@ 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 implements ReactiveInsert { @@ -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); } } } 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 c86f33f..1cfabb4 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 @@ 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 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 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 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 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 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 800eb45..9f7d90e 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 @@ 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); } } }