DataType (apache-cassandra API)
Date: 2018-02-12

org.apache.cassandra.transport

## Enum DataType

- java.lang.Object
- - java.lang.Enum<DataType>
  - - org.apache.cassandra.transport.DataType

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<DataType>, OptionCodec.Codecable<DataType>

      public enum DataType
      extends java.lang.Enum<DataType>
      implements OptionCodec.Codecable<DataType>

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `ASCII`
    `BIGINT`
    `BLOB`
    `BOOLEAN`
    `BYTE`
    `COUNTER`
    `CUSTOM`
    `DATE`
    `DECIMAL`
    `DOUBLE`
    `FLOAT`
    `INET`
    `INT`
    `LIST`
    `MAP`
    `SET`
    `SMALLINT`
    `TEXT`
    `TIME`
    `TIMESTAMP`
    `TIMEUUID`
    `TUPLE`
    `UDT`
    `UUID`
    `VARCHAR`
    `VARINT`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static OptionCodec<DataType>` | `codec`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Pair<DataType,java.lang.Object>` | `fromType(AbstractType type, int version)`
    `int` | `getId(int version)`
    `int` | `getProtocolVersion()`
    `java.lang.Object` | `readValue(io.netty.buffer.ByteBuf cb, int version)`
    `int` | `serializedValueSize(java.lang.Object value, int version)`
    `static AbstractType` | `toType(Pair<DataType,java.lang.Object> entry)`
    `static DataType` | `valueOf(java.lang.String name)` Returns the enum constant of this type with the specified name.
    `static DataType[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.
    `void` | `writeValue(java.lang.Object value, io.netty.buffer.ByteBuf cb, int version)`

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

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

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

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### CUSTOM

          public static final DataType CUSTOM

    - #### ASCII

          public static final DataType ASCII

    - #### BIGINT

          public static final DataType BIGINT

    - #### BLOB

          public static final DataType BLOB

    - #### BOOLEAN

          public static final DataType BOOLEAN

    - #### COUNTER

          public static final DataType COUNTER

    - #### DECIMAL

          public static final DataType DECIMAL

    - #### DOUBLE

          public static final DataType DOUBLE

    - #### FLOAT

          public static final DataType FLOAT

    - #### INT

          public static final DataType INT

    - #### TEXT

          public static final DataType TEXT

    - #### TIMESTAMP

          public static final DataType TIMESTAMP

    - #### UUID

          public static final DataType UUID

    - #### VARCHAR

          public static final DataType VARCHAR

    - #### VARINT

          public static final DataType VARINT

    - #### TIMEUUID

          public static final DataType TIMEUUID

    - #### INET

          public static final DataType INET

    - #### DATE

          public static final DataType DATE

    - #### TIME

          public static final DataType TIME

    - #### SMALLINT

          public static final DataType SMALLINT

    - #### BYTE

          public static final DataType BYTE

    - #### LIST

          public static final DataType LIST

    - #### MAP

          public static final DataType MAP

    - #### SET

          public static final DataType SET

    - #### UDT

          public static final DataType UDT

    - #### TUPLE

          public static final DataType TUPLE

  - ### Field Detail

    - #### codec

          public static final OptionCodec<DataType> codec

  - ### Method Detail

    - #### values

          public static DataType[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (DataType c : DataType.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static DataType valueOf(java.lang.String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
        `name` - the name of the enum constant to be returned.
      Returns:
        the enum constant with the specified name
      Throws:
        `java.lang.IllegalArgumentException` - if this enum type has no constant with the specified name
        `java.lang.NullPointerException` - if the argument is null

    - #### getId

          public int getId(int version)

      Specified by:
        `getId` in interface `OptionCodec.Codecable<DataType>`

    - #### readValue

          public java.lang.Object readValue(io.netty.buffer.ByteBuf cb,
                                            int version)

      Specified by:
        `readValue` in interface `OptionCodec.Codecable<DataType>`

    - #### writeValue

          public void writeValue(java.lang.Object value,
                                 io.netty.buffer.ByteBuf cb,
                                 int version)

      Specified by:
        `writeValue` in interface `OptionCodec.Codecable<DataType>`

    - #### serializedValueSize

          public int serializedValueSize(java.lang.Object value,
                                         int version)

      Specified by:
        `serializedValueSize` in interface `OptionCodec.Codecable<DataType>`

    - #### fromType

          public static Pair<DataType,java.lang.Object> fromType(AbstractType type,
                                                                 int version)

    - #### toType

          public static AbstractType toType(Pair<DataType,java.lang.Object> entry)

    - #### getProtocolVersion

          public int getProtocolVersion()

Copyright © 2018 The Apache Software Foundation