DataAttributesAccessor (API Reference)
Class DataAttributesAccessor
- All Implemented Interfaces:
DataAttributesBase
Accessor used for manipulating data attributes.
Note: This is a beta release of this feature, so there could be a few bugs and unexpected behavior. Related APIs may change for new releases without a deprecation process.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddOrReplace(String name, boolean value) Adds or replaces a boolean attribute.voidaddOrReplace(String name, double value) Adds or replaces a double precision floating decimal attribute.voidaddOrReplace(String name, float value) Adds or replaces a single precision floating decimal attribute.voidaddOrReplace(String name, long value) Adds or replaces a 64-bits integer attribute.voidaddOrReplace(String name, DataAttributeValue value) Adds or replaces an attribute.voidaddOrReplace(String name, String value) Adds or replaces a string attribute.getAsString(String name) Gets the value of an attribute as a string ornullif it is not contained.Returns a list of attribute names.getBoolean(String name) Gets the value of a boolean attribute ornullif it is not contained or the type doesn't match.Gets the value of a double precision floating decimal attribute ornullif it is not contained or the type doesn't match.Gets the value of a single precision floating decimal attribute ornullif it is not contained or the type doesn't match.Gets the value of a 64-bits integer attribute ornullif it is not contained or the type doesn't match.Gets the value of a string attribute ornullif it is not contained or the type doesn't match.Gets the DataAttributeValue ornullif it is not contained.getValueType(String name) Returns the value type of an attribute ornullif it is not contained.voidRemoves an attribute by name.voidRemoves all attributes.
-
Method Details
-
addOrReplace
Adds or replaces a string attribute.
- Parameters:
name-Attribute name.
value-Attribute value.
-
addOrReplace
Adds or replaces a 64-bits integer attribute.
- Parameters:
name-Attribute name.
value-Attribute value.
-
addOrReplace
Adds or replaces a single precision floating decimal attribute.
- Parameters:
name-Attribute name.
value-Attribute value.
-
addOrReplace
Adds or replaces a double precision floating decimal attribute.
- Parameters:
name-Attribute name.
value-Attribute value.
-
addOrReplace
Adds or replaces a boolean attribute.
- Parameters:
name-Attribute name.
value-Attribute value.
-
addOrReplace
Adds or replaces an attribute.
- Parameters:
name-Attribute name.
value-Attribute value.
-
remove
Removes an attribute by name.
- Parameters:
name-Attribute name.
-
removeAll
public void removeAll()Removes all attributes.
-
getAttributeNames
Returns a list of attribute names.
- Specified by:
getAttributeNamesin interfaceDataAttributesBase- Returns:
The list of attribute names.
-
getValueType
Returns the value type of an attribute or
nullif it is not contained.- Specified by:
getValueTypein interfaceDataAttributesBase- Parameters:
name-Attribute name.
- Returns:
Attribute value type or
nullif it is not contained.
-
getAsString
Gets the value of an attribute as a string or
nullif it is not contained.- Specified by:
getAsStringin interfaceDataAttributesBase- Parameters:
name-Attribute name.
- Returns:
Attribute value.
-
getString
Gets the value of a string attribute or
nullif it is not contained or the type doesn't match.- Specified by:
getStringin interfaceDataAttributesBase- Parameters:
name-Attribute name.
- Returns:
Attribute value.
-
getInt64
Gets the value of a 64-bits integer attribute or
nullif it is not contained or the type doesn't match.- Specified by:
getInt64in interfaceDataAttributesBase- Parameters:
name-Attribute name.
- Returns:
Attribute value.
-
getFloat
Gets the value of a single precision floating decimal attribute or
nullif it is not contained or the type doesn't match.- Specified by:
getFloatin interfaceDataAttributesBase- Parameters:
name-Attribute name.
- Returns:
Attribute value.
-
getDouble
Gets the value of a double precision floating decimal attribute or
nullif it is not contained or the type doesn't match.- Specified by:
getDoublein interfaceDataAttributesBase- Parameters:
name-Attribute name.
- Returns:
Attribute value.
-
getBoolean
Gets the value of a boolean attribute or
nullif it is not contained or the type doesn't match.- Specified by:
getBooleanin interfaceDataAttributesBase- Parameters:
name-Attribute name.
- Returns:
Attribute value.
-
getValue
Gets the DataAttributeValue or
nullif it is not contained.- Specified by:
getValuein interfaceDataAttributesBase- Parameters:
name-Attribute name.
- Returns:
Attribute value.
-