Class OutboundRow

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

public class OutboundRow extends Object implements Map<org.springframework.data.relational.core.sql.SqlIdentifier,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,Parameter> map)
      Creates a new OutboundRow from a Map.
      Parameters:
      map - the map used to initialize the OutboundRow.
    • OutboundRow

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

      public OutboundRow(org.springframework.data.relational.core.sql.SqlIdentifier key, 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, 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:
      • SqlIdentifier.unquoted(String)
    • append

      public OutboundRow append(org.springframework.data.relational.core.sql.SqlIdentifier key, 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<org.springframework.data.relational.core.sql.SqlIdentifier,Parameter>
    • isEmpty

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

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

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

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

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

      public Parameter put(String key, Parameter value)
    • put

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

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

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

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

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

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

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

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

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

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

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