Skip to content

Commit ea865ca

Browse files
chanhyeongmp911de
authored andcommitted
Remove duplicate declaration of document() accessor in RowDocument.
Closes #1781
1 parent 500f504 commit ea865ca

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

spring-data-relational/src/main/java/org/springframework/data/relational/core/conversion/MappingRelationalConverter.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@
8585
* @author Jens Schauder
8686
* @author Chirag Tailor
8787
* @author Vincent Galloy
88+
* @author Chanhyeong Cho
8889
* @see org.springframework.data.mapping.context.MappingContext
8990
* @see SimpleTypeHolder
9091
* @see CustomConversions
@@ -346,7 +347,7 @@ protected <S> S readAggregate(ConversionContext context, RowDocumentAccessor doc
346347
}
347348

348349
if (RowDocument.class.isAssignableFrom(rawType)) {
349-
return (S) documentAccessor.document();
350+
return (S) documentAccessor.getDocument();
350351
}
351352

352353
if (typeHint.isMap()) {
@@ -1151,7 +1152,7 @@ public boolean hasValue(RelationalPersistentProperty property) {
11511152
@Override
11521153
public Object getValue(AggregatePath path) {
11531154

1154-
Object value = accessor.document().get(path.getColumnInfo().alias().getReference());
1155+
Object value = accessor.getDocument().get(path.getColumnInfo().alias().getReference());
11551156

11561157
if (value == null) {
11571158
return null;
@@ -1162,12 +1163,12 @@ public Object getValue(AggregatePath path) {
11621163

11631164
@Override
11641165
public boolean hasValue(AggregatePath path) {
1165-
return accessor.document().get(path.getColumnInfo().alias().getReference()) != null;
1166+
return accessor.getDocument().get(path.getColumnInfo().alias().getReference()) != null;
11661167
}
11671168

11681169
@Override
11691170
public boolean hasValue(SqlIdentifier identifier) {
1170-
return accessor().document().get(identifier.getReference()) != null;
1171+
return accessor().getDocument().get(identifier.getReference()) != null;
11711172
}
11721173

11731174
@Override

spring-data-relational/src/main/java/org/springframework/data/relational/core/conversion/RowDocumentAccessor.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
* a {@link RelationalPersistentProperty} might refer to through a path expression in field names.
2929
*
3030
* @author Mark Paluch
31+
* @author Chanhyeong Cho
3132
* @since 3.2
3233
*/
3334
public class RowDocumentAccessor {
@@ -110,10 +111,6 @@ String getColumnName(RelationalPersistentProperty prop) {
110111
return prop.getColumnName().getReference();
111112
}
112113

113-
public RowDocument document() {
114-
return document;
115-
}
116-
117114
@Override
118115
public boolean equals(Object obj) {
119116
if (obj == this)

0 commit comments

Comments
 (0)