org.apache.cassandra.cql3.functions

## Class UDHelper

- java.lang.Object
- - org.apache.cassandra.cql3.functions.UDHelper

-     public final class UDHelper
      extends java.lang.Object

  Helper class for User Defined Functions, Types and Aggregates.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `UDHelper()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.lang.Class<?>` | `asJavaClass(com.datastax.driver.core.TypeCodec<?> codec)`
    `static com.datastax.driver.core.TypeCodec<java.lang.Object>` | `codecFor(com.datastax.driver.core.DataType dataType)`
    `static java.lang.Object` | `deserialize(com.datastax.driver.core.TypeCodec<?> codec, ProtocolVersion protocolVersion, java.nio.ByteBuffer value)`
    `static com.datastax.driver.core.DataType` | `driverType(AbstractType abstractType)` Returns the Java Driver `DataType` for the C* internal type.
    `static com.datastax.driver.core.DataType` | `driverTypeFromAbstractType(java.lang.String abstractTypeDef)`
    `static com.datastax.driver.core.DataType[]` | `driverTypes(java.util.List<AbstractType<?>> abstractTypes)` Construct an array containing the Java Driver `DataType`s for the C* internal types.
    `static boolean` | `isNullOrEmpty(AbstractType<?> type, java.nio.ByteBuffer bb)`
    `static java.nio.ByteBuffer` | `serialize(com.datastax.driver.core.TypeCodec<?> codec, ProtocolVersion protocolVersion, java.lang.Object value)`
    `static com.google.common.reflect.TypeToken<?>[]` | `typeTokens(com.datastax.driver.core.TypeCodec<java.lang.Object>[] dataTypes, boolean calledOnNullInput)` Construct an array containing the Java classes for the given Java Driver `DataType`s.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### UDHelper

          public UDHelper()

  - ### Method Detail

    - #### codecFor

          public static com.datastax.driver.core.TypeCodec<java.lang.Object> codecFor(com.datastax.driver.core.DataType dataType)

    - #### typeTokens

          public static com.google.common.reflect.TypeToken<?>[] typeTokens(com.datastax.driver.core.TypeCodec<java.lang.Object>[] dataTypes,
                                                                            boolean calledOnNullInput)

      Construct an array containing the Java classes for the given Java Driver `DataType`s.
      Parameters:
        `dataTypes` - array with UDF argument types
        `calledOnNullInput` - whether to allow `null` as an argument value
      Returns:
        array of same size with UDF arguments

    - #### driverTypes

          public static com.datastax.driver.core.DataType[] driverTypes(java.util.List<AbstractType<?>> abstractTypes)

      Construct an array containing the Java Driver `DataType`s for the C* internal types.
      Parameters:
        `abstractTypes` - list with UDF argument types
      Returns:
        array with argument types as `DataType`

    - #### driverType

          public static com.datastax.driver.core.DataType driverType(AbstractType abstractType)

      Returns the Java Driver `DataType` for the C* internal type.

    - #### driverTypeFromAbstractType

          public static com.datastax.driver.core.DataType driverTypeFromAbstractType(java.lang.String abstractTypeDef)

    - #### deserialize

          public static java.lang.Object deserialize(com.datastax.driver.core.TypeCodec<?> codec,
                                                     ProtocolVersion protocolVersion,
                                                     java.nio.ByteBuffer value)

    - #### serialize

          public static java.nio.ByteBuffer serialize(com.datastax.driver.core.TypeCodec<?> codec,
                                                      ProtocolVersion protocolVersion,
                                                      java.lang.Object value)

    - #### asJavaClass

          public static java.lang.Class<?> asJavaClass(com.datastax.driver.core.TypeCodec<?> codec)

    - #### isNullOrEmpty

          public static boolean isNullOrEmpty(AbstractType<?> type,
                                              java.nio.ByteBuffer bb)

Copyright © 2018 The Apache Software Foundation