Class OutboundRow

java.lang.Object
org.springframework.data.r2dbc.mapping.OutboundRow
All Implemented Interfaces:
Cloneable, Map<SqlIdentifier,org.springframework.r2dbc.core.Parameter>

public class OutboundRow extends Object implements Map<SqlIdentifier,org.springframework.r2dbc.core.Parameter>, Cloneable
Representation of a Row to be written through a INSERT or UPDATE statement. Row keys are represented as SqlIdentifier. String key names are translated to unquoted identifiers when adding or querying for entries.
Author:
Mark Paluch
See Also:
  • Constructor Details

    • OutboundRow

      public OutboundRow()
      Creates an empty OutboundRow instance.
    • OutboundRow

      public OutboundRow(Map<String,org.springframework.r2dbc.core.Parameter> map)
      Creates a new OutboundRow from a Map.
      Parameters:
      map - the map used to initialize the OutboundRow.
    • OutboundRow

      public OutboundRow(String key, org.springframework.r2dbc.core.Parameter value)
      Create a OutboundRow instance initialized with the given key/value pair.
      Parameters:
      key - key.
      value - value.
      See Also:
    • OutboundRow

      public OutboundRow(SqlIdentifier key, org.springframework.r2dbc.core.Parameter value)
      Create a OutboundRow instance initialized with the given key/value pair.
      Parameters:
      key - key.
      value - value.
      Since:
      1.1
  • Method Details

    • append

      public OutboundRow append(String key, org.springframework.r2dbc.core.Parameter value)
      Put the given key/value pair into this OutboundRow and return this. Useful for chaining puts in a single expression:
       row.append("a", 1).append("b", 2)}
       
      Parameters:
      key - key.
      value - value.
      Returns:
      this
      See Also:
    • append

      public OutboundRow append(SqlIdentifier key, org.springframework.r2dbc.core.Parameter value)
      Put the given key/value pair into this OutboundRow and return this. Useful for chaining puts in a single expression:
       row.append("a", 1).append("b", 2)}
       
      Parameters:
      key - key.
      value - value.
      Returns:
      this
      Since:
      1.1
    • size

      public int size()
      Specified by:
      size in interface Map<SqlIdentifier,org.springframework.r2dbc.core.Parameter>
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface Map<SqlIdentifier,org.springframework.r2dbc.core.Parameter>
    • clone

      protected OutboundRow clone()
      Overrides:
      clone in class Object
    • containsKey

      public boolean containsKey(Object key)
      Specified by:
      containsKey in interface Map<SqlIdentifier,org.springframework.r2dbc.core.Parameter>
    • containsValue

      public boolean containsValue(Object value)
      Specified by:
      containsValue in interface Map<SqlIdentifier,org.springframework.r2dbc.core.Parameter>
    • get

      public org.springframework.r2dbc.core.Parameter get(Object key)
      Specified by:
      get in interface Map<SqlIdentifier,org.springframework.r2dbc.core.Parameter>
    • put

      public org.springframework.r2dbc.core.Parameter put(String key, org.springframework.r2dbc.core.Parameter value)
    • put

      public org.springframework.r2dbc.core.Parameter put(SqlIdentifier key, org.springframework.r2dbc.core.Parameter value)
      Specified by:
      put in interface Map<SqlIdentifier,org.springframework.r2dbc.core.Parameter>
    • remove

      public org.springframework.r2dbc.core.Parameter remove(Object key)
      Specified by:
      remove in interface Map<SqlIdentifier,org.springframework.r2dbc.core.Parameter>
    • putAll

      public void putAll(Map<? extends SqlIdentifier,? extends org.springframework.r2dbc.core.Parameter> m)
      Specified by:
      putAll in interface Map<SqlIdentifier,org.springframework.r2dbc.core.Parameter>
    • clear

      public void clear()
      Specified by:
      clear in interface Map<SqlIdentifier,org.springframework.r2dbc.core.Parameter>
    • keySet

      public Set<SqlIdentifier> keySet()
      Specified by:
      keySet in interface Map<SqlIdentifier,org.springframework.r2dbc.core.Parameter>
    • values

      public Collection<org.springframework.r2dbc.core.Parameter> values()
      Specified by:
      values in interface Map<SqlIdentifier,org.springframework.r2dbc.core.Parameter>
    • entrySet

      public Set<Map.Entry<SqlIdentifier,org.springframework.r2dbc.core.Parameter>> entrySet()
      Specified by:
      entrySet in interface Map<SqlIdentifier,org.springframework.r2dbc.core.Parameter>
    • equals

      public boolean equals(@Nullable Object o)
      Specified by:
      equals in interface Map<SqlIdentifier,org.springframework.r2dbc.core.Parameter>
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface Map<SqlIdentifier,org.springframework.r2dbc.core.Parameter>
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • forEach

      public void forEach(BiConsumer<? super SqlIdentifier,? super org.springframework.r2dbc.core.Parameter> action)
      Specified by:
      forEach in interface Map<SqlIdentifier,org.springframework.r2dbc.core.Parameter>