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 3636 * @see SqlIdentifier
3737 * @see Parameter
3838 */
39- public class OutboundRow implements Map <SqlIdentifier , Parameter > {
39+ public class OutboundRow implements Map <SqlIdentifier , Parameter >, Cloneable {
4040
4141 private final Map <SqlIdentifier , Parameter > rowAsMap ;
4242
@@ -61,6 +61,12 @@ public OutboundRow(Map<String, Parameter> map) {
6161 map .forEach ((s , Parameter ) -> this .rowAsMap .put (SqlIdentifier .unquoted (s ), Parameter ));
6262 }
6363
64+ private OutboundRow (OutboundRow map ) {
65+
66+ this .rowAsMap = new LinkedHashMap <>(map .size ());
67+ this .rowAsMap .putAll (map );
68+ }
69+
6470 /**
6571 * Create a {@link OutboundRow} instance initialized with the given key/value pair.
6672 *
@@ -137,6 +143,15 @@ public boolean isEmpty() {
137143 return this .rowAsMap .isEmpty ();
138144 }
139145
146+ /*
147+ * (non-Javadoc)
148+ * @see java.lang.Object#clone()
149+ */
150+ @ Override
151+ protected OutboundRow clone () {
152+ return new OutboundRow (this );
153+ }
154+
140155 /*
141156 * (non-Javadoc)
142157 * @see java.util.Map#containsKey(java.lang.Object)
You can’t perform that action at this time.
0 commit comments