|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.datastax.driver.core.DataType
public class DataType
Data types supported by cassandra.
Nested Class Summary | |
---|---|
static class |
DataType.Name
The CQL type name. |
Method Summary | |
---|---|
static Set<DataType> |
allPrimitiveTypes()
Returns a set of all the primitive types, where primitive types are defined as the types that don't have type arguments (i.e. |
static DataType |
ascii()
The ASCII type. |
Class<?> |
asJavaClass()
The java Class corresponding to this type. |
static DataType |
bigint()
The BIGINT type. |
static DataType |
blob()
The BLOB type. |
static DataType |
cboolean()
The BOOLEAN type. |
static DataType |
cdouble()
The DOUBLE type. |
static DataType |
cfloat()
The FLOAT type. |
static DataType |
cint()
The INT type. |
static DataType |
counter()
The COUNTER type. |
static DataType |
decimal()
The DECIMAL type. |
boolean |
equals(Object o)
|
DataType.Name |
getName()
The name of that type. |
List<DataType> |
getTypeArguments()
The type arguments of this type. |
int |
hashCode()
|
static DataType |
inet()
The INET type. |
boolean |
isCollection()
Returns whether this type is a collection one, i.e. |
static DataType |
list(DataType elementType)
The type of lists of elementType elements. |
static DataType |
map(DataType keyType,
DataType valueType)
The type of maps of keyType to valueType elements. |
ByteBuffer |
parse(String value)
Parse a string value for the type this object represent, returning its Cassandra binary representation. |
static DataType |
set(DataType elementType)
The type of sets of elementType elements. |
static DataType |
text()
The TEXT type. |
static DataType |
timestamp()
The TIMESTAMP type. |
static DataType |
timeuuid()
The TIMEUUID type. |
String |
toString()
|
static DataType |
uuid()
The UUID type. |
static DataType |
varchar()
The VARCHAR type. |
static DataType |
varint()
The VARINT type. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public static DataType ascii()
public static DataType bigint()
public static DataType blob()
public static DataType cboolean()
public static DataType counter()
public static DataType decimal()
public static DataType cdouble()
public static DataType cfloat()
public static DataType inet()
public static DataType cint()
public static DataType text()
public static DataType timestamp()
public static DataType uuid()
public static DataType varchar()
public static DataType varint()
public static DataType timeuuid()
public static DataType list(DataType elementType)
elementType
elements.
elementType
- the type of the list elements.
elementType
elements.public static DataType set(DataType elementType)
elementType
elements.
elementType
- the type of the set elements.
elementType
elements.public static DataType map(DataType keyType, DataType valueType)
keyType
to valueType
elements.
keyType
- the type of the map keys.valueType
- the type of the map values.
keyType
to valueType
elements.public DataType.Name getName()
public List<DataType> getTypeArguments()
Note that only the collection types (LIST, MAP, SET) have type arguments. For the other types, this will return an empty list.
For the collection types:
public ByteBuffer parse(String value)
value
- the value to parse.
value
.
InvalidTypeException
- if value
is not a valid string
representation for this type.public boolean isCollection()
public Class<?> asJavaClass()
getName().asJavaClass()
.
DataType.Name.asJavaClass()
public static Set<DataType> allPrimitiveTypes()
public final int hashCode()
hashCode
in class Object
public final boolean equals(Object o)
equals
in class Object
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |