com.datastax.driver.core
Enum DataType.Name

java.lang.Object
  extended by java.lang.Enum<DataType.Name>
      extended by com.datastax.driver.core.DataType.Name
All Implemented Interfaces:
Serializable, Comparable<DataType.Name>
Enclosing class:
DataType

public static enum DataType.Name
extends Enum<DataType.Name>

The CQL type name.


Enum Constant Summary
ASCII
           
BIGINT
           
BLOB
           
BOOLEAN
           
COUNTER
           
CUSTOM
           
DECIMAL
           
DOUBLE
           
FLOAT
           
INET
           
INT
           
LIST
           
MAP
           
SET
           
TEXT
           
TIMESTAMP
           
TIMEUUID
           
UUID
           
VARCHAR
           
VARINT
           
 
Method Summary
 Class<?> asJavaClass()
          Returns the Java Class corresponding to this CQL type name.
 boolean isCollection()
          Returns whether this data type name represent the name of a collection type that is a list, set or map.
 String toString()
           
static DataType.Name valueOf(String name)
          Returns the enum constant of this type with the specified name.
static DataType.Name[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

ASCII

public static final DataType.Name ASCII

BIGINT

public static final DataType.Name BIGINT

BLOB

public static final DataType.Name BLOB

BOOLEAN

public static final DataType.Name BOOLEAN

COUNTER

public static final DataType.Name COUNTER

DECIMAL

public static final DataType.Name DECIMAL

DOUBLE

public static final DataType.Name DOUBLE

FLOAT

public static final DataType.Name FLOAT

INET

public static final DataType.Name INET

INT

public static final DataType.Name INT

TEXT

public static final DataType.Name TEXT

TIMESTAMP

public static final DataType.Name TIMESTAMP

UUID

public static final DataType.Name UUID

VARCHAR

public static final DataType.Name VARCHAR

VARINT

public static final DataType.Name VARINT

TIMEUUID

public static final DataType.Name TIMEUUID

LIST

public static final DataType.Name LIST

SET

public static final DataType.Name SET

MAP

public static final DataType.Name MAP

CUSTOM

public static final DataType.Name CUSTOM
Method Detail

values

public static DataType.Name[] 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.Name c : DataType.Name.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.Name valueOf(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:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

isCollection

public boolean isCollection()
Returns whether this data type name represent the name of a collection type that is a list, set or map.

Returns:
whether this data type name represent the name of a collection type.

asJavaClass

public Class<?> asJavaClass()
Returns the Java Class corresponding to this CQL type name. The correspondence between CQL types and java ones is as follow:
DataType (CQL)Java Class
ASCII String
BIGINT Long
BLOB ByteBuffer
BOOLEAN Boolean
COUNTER Long
CUSTOM ByteBuffer
DECIMAL BigDecimal
DOUBLE Double
FLOAT Float
INET InetAddress
INT Integer
LIST List
MAP Map
SET Set
TEXT String
TIMESTAMP Date
UUID UUID
VARCHAR String
VARINT BigInteger
TIMEUUID UUID

Returns:
the java Class corresponding to this CQL type name.

toString

public String toString()
Overrides:
toString in class Enum<DataType.Name>


Copyright © 2013. All rights reserved.