Skip to content

Commit 110e3ee

Browse files
chanhyeongmp911de
authored andcommitted
Remove duplicate declaration of document() accessor in RowDocument.
Closes #1781
1 parent a0a01a7 commit 110e3ee

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
@@ -80,6 +80,7 @@
8080
* @author Jens Schauder
8181
* @author Chirag Tailor
8282
* @author Vincent Galloy
83+
* @author Chanhyeong Cho
8384
* @see org.springframework.data.mapping.context.MappingContext
8485
* @see SimpleTypeHolder
8586
* @see CustomConversions
@@ -322,7 +323,7 @@ protected <S> S readAggregate(ConversionContext context, RowDocumentAccessor doc
322323
}
323324

324325
if (RowDocument.class.isAssignableFrom(rawType)) {
325-
return (S) documentAccessor.document();
326+
return (S) documentAccessor.getDocument();
326327
}
327328

328329
if (typeHint.isMap()) {
@@ -1127,7 +1128,7 @@ public boolean hasValue(RelationalPersistentProperty property) {
11271128
@Override
11281129
public Object getValue(AggregatePath path) {
11291130

1130-
Object value = accessor.document().get(path.getColumnInfo().alias().getReference());
1131+
Object value = accessor.getDocument().get(path.getColumnInfo().alias().getReference());
11311132

11321133
if (value == null) {
11331134
return null;
@@ -1138,12 +1139,12 @@ public Object getValue(AggregatePath path) {
11381139

11391140
@Override
11401141
public boolean hasValue(AggregatePath path) {
1141-
return accessor.document().get(path.getColumnInfo().alias().getReference()) != null;
1142+
return accessor.getDocument().get(path.getColumnInfo().alias().getReference()) != null;
11421143
}
11431144

11441145
@Override
11451146
public boolean hasValue(SqlIdentifier identifier) {
1146-
return accessor().document().get(identifier.getReference()) != null;
1147+
return accessor().getDocument().get(identifier.getReference()) != null;
11471148
}
11481149

11491150
@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)