Class StringItem

All Implemented Interfaces:
Serializable, Item

public class StringItem extends AbstractAtomicItem
See Also:
  • Constructor Details

    • StringItem

      public StringItem(String value)
  • Method Details

    • copy

      public Item copy(boolean mutable)
      Description copied from interface: Item
      Makes a copy.
      Parameters:
      mutable - whether the copy should be mutable (if supported by the item).
      Returns:
      a copy
    • getStringValue

      public String getStringValue()
      Description copied from interface: Item
      Returns the string value of the item, if it is an atomic item.
      Returns:
      the string value.
    • getVariantValue

      public Object getVariantValue()
      Description copied from interface: Item
      Returns the Object containing the converted value of the item for a DataFrame. For use to build Variant columns.
      Returns:
      Object representing the converted value of the item.
    • castToDoubleValue

      public double castToDoubleValue()
      Description copied from interface: Item
      Casts the item to a double value (must be a numeric).
      Returns:
      the double value.
    • castToFloatValue

      public float castToFloatValue()
      Description copied from interface: Item
      Casts the item to a float value (must be a numeric).
      Returns:
      the float value.
    • castToDecimalValue

      public BigDecimal castToDecimalValue()
      Description copied from interface: Item
      Casts the item to a decimal value (must be a numeric).
      Returns:
      the BigDecimal value.
    • castToIntegerValue

      public BigInteger castToIntegerValue()
      Description copied from interface: Item
      Casts the item to a big integer value (must be a numeric).
      Returns:
      the BigInteger value.
    • castToIntValue

      public int castToIntValue()
      Description copied from interface: Item
      Casts the item to an integer value (must be a numeric).
      Returns:
      the int value.
    • isString

      public boolean isString()
      Description copied from interface: Item
      Tests whether the item is an atomic item of type string.
      Returns:
      true if it is an atomic item of type string, false otherwise.
    • getEffectiveBooleanValue

      public boolean getEffectiveBooleanValue()
      Description copied from interface: Item
      Returns the effective boolean value of the item, if atomic.
      Returns:
      the effective boolean value.
    • getDynamicType

      public ItemType getDynamicType()
      Description copied from interface: Item
      Returns the dynamic type of the item (only for error message purposes).
      Returns:
      the dynamic type as an item type.
    • generateNativeQuery

      public NativeClauseContext generateNativeQuery(NativeClauseContext context)
      Description copied from interface: Item
      Get sparkSql string for the item
      Parameters:
      context - input context
      Returns:
      String representing the item in a sparksql query or null if it is not supported for the item
    • isAtomic

      public boolean isAtomic()
      Description copied from interface: Item
      Tests whether the item is an atomic item.
      Returns:
      true if it is an atomic item, false otherwise.
    • getSparkSQLValue

      public String getSparkSQLValue()
      Description copied from interface: Item
      Returns the SparkSQL value of the item for use in a query.
      Returns:
      String representing the SparkSQL value of the item.
    • getSparkSQLValue

      public String getSparkSQLValue(ItemType itemType)
      Description copied from interface: Item
      Returns the SparkSQL value of the item for use in a query.
      Returns:
      String representing the SparkSQL value of the item.
    • getSparkSQLType

      public String getSparkSQLType()
      Description copied from interface: Item
      Returns the SparkSQL type of the item for use in a query.
      Returns:
      String representing the SparkSQL type of the item.