Class AttributeEditorImpl

java.lang.Object
io.debezium.relational.AttributeEditorImpl
All Implemented Interfaces:
AttributeEditor

final class AttributeEditorImpl extends Object implements AttributeEditor
Implementation of the AttributeEditor contract.
Author:
Chris Cranford
  • Field Details

  • Constructor Details

    • AttributeEditorImpl

      protected AttributeEditorImpl()
  • Method Details

    • name

      public String name()
      Description copied from interface: AttributeEditor
      Get the name of the attribute.
      Specified by:
      name in interface AttributeEditor
      Returns:
      the attribute name; may be null if not set
    • value

      public String value()
      Description copied from interface: AttributeEditor
      Get the value of the attribute.
      Specified by:
      value in interface AttributeEditor
      Returns:
      the attribute value; may be null if not set
    • asString

      public String asString()
      Description copied from interface: AttributeEditor
      Get the attribute value as a string value.
      Specified by:
      asString in interface AttributeEditor
      Returns:
      the attribute value converted to a String, may be null
    • asInteger

      public Integer asInteger()
      Description copied from interface: AttributeEditor
      Get the attribute value as an integer value.
      Specified by:
      asInteger in interface AttributeEditor
      Returns:
      the attribute value converted to an Integer, may be null
    • asLong

      public Long asLong()
      Description copied from interface: AttributeEditor
      Get the attribute value as a long value.
      Specified by:
      asLong in interface AttributeEditor
      Returns:
      the attribute value converted to a Long, may be null
    • asBoolean

      public Boolean asBoolean()
      Description copied from interface: AttributeEditor
      Get the attribute value as a boolean value. This conversion is based on Boolean.parseBoolean(String) semantics.
      Specified by:
      asBoolean in interface AttributeEditor
      Returns:
      the attribute value converted to a Boolean, may be null
    • asBigInteger

      public BigInteger asBigInteger()
      Description copied from interface: AttributeEditor
      Get the attribute value as a big integer value.
      Specified by:
      asBigInteger in interface AttributeEditor
      Returns:
      the attribute value converted to a BigInteger, may be null
    • asBigDecimal

      public BigDecimal asBigDecimal()
      Description copied from interface: AttributeEditor
      Get the attribute value as a big decimal value.
      Specified by:
      asBigDecimal in interface AttributeEditor
      Returns:
      the attribute value converted to a BigDecimal, may be null
    • asFloat

      public Float asFloat()
      Description copied from interface: AttributeEditor
      Get the attribute value as a float value.
      Specified by:
      asFloat in interface AttributeEditor
      Returns:
      the attribute value converted to a Float, may be null
    • asDouble

      public Double asDouble()
      Description copied from interface: AttributeEditor
      Get the attribute value as a double value.
      Specified by:
      asDouble in interface AttributeEditor
      Returns:
      the attribute value converted to a Double, may be null
    • name

      public AttributeEditor name(String name)
      Description copied from interface: AttributeEditor
      Set the name of the attribute.
      Specified by:
      name in interface AttributeEditor
      Parameters:
      name - the attribute name
      Returns:
      this editor so callers can chain methods together
    • value

      public AttributeEditor value(Object value)
      Description copied from interface: AttributeEditor
      Set the value of the attribute.
      Specified by:
      value in interface AttributeEditor
      Parameters:
      value - the attribute value
      Returns:
      this editor so callers can chain methods together
    • create

      public Attribute create()
      Description copied from interface: AttributeEditor
      Obtain an immutable attribute definition representing the current state of this editor. Typically, an editor is created and used to build an attribute, and then discarded. However, this editor with its current state can be reused after this method, since the resulting attribute definition no longer refers to any of the data used in this editor.
      Specified by:
      create in interface AttributeEditor
      Returns:
      the immutable attribute definition; never null
    • toString

      public String toString()
      Overrides:
      toString in class Object