Package io.debezium.relational
Interface AttributeEditor
- All Known Implementing Classes:
AttributeEditorImpl
An editor for
Attribute
instances.- Author:
- Chris Cranford
-
Method Summary
Modifier and TypeMethodDescriptionGet the attribute value as a big decimal value.Get the attribute value as a big integer value.Get the attribute value as a boolean value.asDouble()
Get the attribute value as a double value.asFloat()
Get the attribute value as a float value.Get the attribute value as an integer value.asLong()
Get the attribute value as a long value.asString()
Get the attribute value as a string value.create()
Obtain an immutable attribute definition representing the current state of this editor.name()
Get the name of the attribute.Set the name of the attribute.value()
Get the value of the attribute.Set the value of the attribute.
-
Method Details
-
name
String name()Get the name of the attribute.- Returns:
- the attribute name; may be null if not set
-
value
String value()Get the value of the attribute.- Returns:
- the attribute value; may be null if not set
-
asString
String asString()Get the attribute value as a string value.- Returns:
- the attribute value converted to a
String
, may be null
-
asInteger
Integer asInteger()Get the attribute value as an integer value.- Returns:
- the attribute value converted to an
Integer
, may be null
-
asLong
Long asLong()Get the attribute value as a long value.- Returns:
- the attribute value converted to a
Long
, may be null
-
asBoolean
Boolean asBoolean()Get the attribute value as a boolean value. This conversion is based onBoolean.parseBoolean(String)
semantics.- Returns:
- the attribute value converted to a
Boolean
, may be null
-
asBigInteger
BigInteger asBigInteger()Get the attribute value as a big integer value.- Returns:
- the attribute value converted to a
BigInteger
, may be null
-
asBigDecimal
BigDecimal asBigDecimal()Get the attribute value as a big decimal value.- Returns:
- the attribute value converted to a
BigDecimal
, may be null
-
asFloat
Float asFloat()Get the attribute value as a float value.- Returns:
- the attribute value converted to a
Float
, may be null
-
asDouble
Double asDouble()Get the attribute value as a double value.- Returns:
- the attribute value converted to a
Double
, may be null
-
name
Set the name of the attribute.- Parameters:
name
- the attribute name- Returns:
- this editor so callers can chain methods together
-
value
Set the value of the attribute.- Parameters:
value
- the attribute value- Returns:
- this editor so callers can chain methods together
-
create
Attribute create()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.- Returns:
- the immutable attribute definition; never null
-