File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
src/main/java/org/springframework/data/r2dbc/mapping Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change 36
36
* @see SqlIdentifier
37
37
* @see Parameter
38
38
*/
39
- public class OutboundRow implements Map <SqlIdentifier , Parameter > {
39
+ public class OutboundRow implements Map <SqlIdentifier , Parameter >, Cloneable {
40
40
41
41
private final Map <SqlIdentifier , Parameter > rowAsMap ;
42
42
@@ -61,6 +61,12 @@ public OutboundRow(Map<String, Parameter> map) {
61
61
map .forEach ((s , Parameter ) -> this .rowAsMap .put (SqlIdentifier .unquoted (s ), Parameter ));
62
62
}
63
63
64
+ private OutboundRow (OutboundRow map ) {
65
+
66
+ this .rowAsMap = new LinkedHashMap <>(map .size ());
67
+ this .rowAsMap .putAll (map );
68
+ }
69
+
64
70
/**
65
71
* Create a {@link OutboundRow} instance initialized with the given key/value pair.
66
72
*
@@ -137,6 +143,15 @@ public boolean isEmpty() {
137
143
return this .rowAsMap .isEmpty ();
138
144
}
139
145
146
+ /*
147
+ * (non-Javadoc)
148
+ * @see java.lang.Object#clone()
149
+ */
150
+ @ Override
151
+ protected OutboundRow clone () {
152
+ return new OutboundRow (this );
153
+ }
154
+
140
155
/*
141
156
* (non-Javadoc)
142
157
* @see java.util.Map#containsKey(java.lang.Object)
You can’t perform that action at this time.
0 commit comments