Package io.lenses.sql.udf.value
Class Container
- java.lang.Object
-
- io.lenses.sql.udf.value.Value
-
- io.lenses.sql.udf.value.Container
-
- Direct Known Subclasses:
RepeatedValue,StructValue
public abstract class Container extends Value
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ContainerasContainer()PrimitiveasPrimitive()booleanisPrimitive()BigDecimalValuetoBigDecimalValue()Returns this value converted to a BigDecimalValue or throws an exception.BigIntValuetoBigIntValue()Returns this value converted to a BigIntValue or throws an exception.BooleanValuetoBooleanValue()Returns this value converted to a BooleanValue or throws an exception.ByteValuetoByteValue()Returns this value converted to a ByteValue or throws an exception.DoubleValuetoDoubleValue()Returns this value converted to a DoubleValue or throws an exception.FloatValuetoFloatValue()Returns this value converted to a FloatValue or throws an exception.IntValuetoIntValue()Returns this value converted to a IntValue or throws an exception.LongValuetoLongValue()Returns this value converted to a LongValue or throws an exception.StringValuetoStringValue()Returns this value converted to a StringValue or throws an exception.-
Methods inherited from class io.lenses.sql.udf.value.Value
asRepeatedValue, asStructValue, convert, get, getDataType, isContainer, toOptional
-
-
-
-
Constructor Detail
-
Container
public Container(DataType dt)
-
-
Method Detail
-
asPrimitive
public Primitive asPrimitive() throws UdfException
- Specified by:
asPrimitivein classValue- Throws:
UdfException
-
asContainer
public Container asContainer() throws UdfException
- Specified by:
asContainerin classValue- Throws:
UdfException
-
isPrimitive
public boolean isPrimitive()
- Specified by:
isPrimitivein classValue
-
toBigDecimalValue
public BigDecimalValue toBigDecimalValue() throws UdfException
Description copied from class:ValueReturns this value converted to a BigDecimalValue or throws an exception.- Specified by:
toBigDecimalValuein classValue- Returns:
- this Value converted to a BigDecimalValue
- Throws:
UdfException- if the conversion is not possible
-
toBigIntValue
public BigIntValue toBigIntValue() throws UdfException
Description copied from class:ValueReturns this value converted to a BigIntValue or throws an exception.- Specified by:
toBigIntValuein classValue- Returns:
- this Value converted to a BigIntValue
- Throws:
UdfException- if the conversion is not possible
-
toBooleanValue
public BooleanValue toBooleanValue() throws UdfException
Description copied from class:ValueReturns this value converted to a BooleanValue or throws an exception.- Specified by:
toBooleanValuein classValue- Returns:
- this Value converted to a BooleanValue
- Throws:
UdfException- if the conversion is not possible
-
toByteValue
public ByteValue toByteValue() throws UdfException
Description copied from class:ValueReturns this value converted to a ByteValue or throws an exception.- Specified by:
toByteValuein classValue- Returns:
- this Value converted to a ByteValue
- Throws:
UdfException- if the conversion is not possible
-
toDoubleValue
public DoubleValue toDoubleValue() throws UdfException
Description copied from class:ValueReturns this value converted to a DoubleValue or throws an exception.- Specified by:
toDoubleValuein classValue- Returns:
- this Value converted to a DoubleValue
- Throws:
UdfException- if the conversion is not possible
-
toFloatValue
public FloatValue toFloatValue() throws UdfException
Description copied from class:ValueReturns this value converted to a FloatValue or throws an exception.- Specified by:
toFloatValuein classValue- Returns:
- this Value converted to a FloatValue
- Throws:
UdfException- if the conversion is not possible
-
toIntValue
public IntValue toIntValue() throws UdfException
Description copied from class:ValueReturns this value converted to a IntValue or throws an exception.- Specified by:
toIntValuein classValue- Returns:
- this Value converted to a IntValue
- Throws:
UdfException- if the conversion is not possible
-
toLongValue
public LongValue toLongValue() throws UdfException
Description copied from class:ValueReturns this value converted to a LongValue or throws an exception.- Specified by:
toLongValuein classValue- Returns:
- this Value converted to a LongValue
- Throws:
UdfException- if the conversion is not possible
-
toStringValue
public StringValue toStringValue() throws UdfException
Description copied from class:ValueReturns this value converted to a StringValue or throws an exception.- Specified by:
toStringValuein classValue- Returns:
- this Value converted to a StringValue
- Throws:
UdfException- if the conversion is not possible
-
-