Package net.sf.jkniv.whinstone.types
Enum CassandraType
- java.lang.Object
-
- java.lang.Enum<CassandraType>
-
- net.sf.jkniv.whinstone.types.CassandraType
-
- All Implemented Interfaces:
Serializable,Comparable<CassandraType>,ColumnType
public enum CassandraType extends Enum<CassandraType> implements ColumnType
Data types supported by cassandra.- Since:
- 0.6.0
- Author:
- Alisson Gomes
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisBinary()booleanisBlob()booleanisClob()booleanisDate()booleanisTime()booleanisTimestamp()intvalue()static ColumnTypevalueOf(int typeValue)Returns the enum constant of this type with the specified name.static CassandraTypevalueOf(String name)Returns the enum constant of this type with the specified name.static CassandraType[]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, toString, valueOf
-
Methods inherited from interface net.sf.jkniv.whinstone.types.ColumnType
name
-
-
-
-
Enum Constant Detail
-
CUSTOM
public static final CassandraType CUSTOM
-
ASCII
public static final CassandraType ASCII
-
BIGINT
public static final CassandraType BIGINT
-
BLOB
public static final CassandraType BLOB
-
BOOLEAN
public static final CassandraType BOOLEAN
-
COUNTER
public static final CassandraType COUNTER
-
DECIMAL
public static final CassandraType DECIMAL
-
DOUBLE
public static final CassandraType DOUBLE
-
FLOAT
public static final CassandraType FLOAT
-
INT
public static final CassandraType INT
-
TEXT
public static final CassandraType TEXT
-
TIMESTAMP
public static final CassandraType TIMESTAMP
-
UUID
public static final CassandraType UUID
-
VARCHAR
public static final CassandraType VARCHAR
-
VARINT
public static final CassandraType VARINT
-
TIMEUUID
public static final CassandraType TIMEUUID
-
INET
public static final CassandraType INET
-
DATE
public static final CassandraType DATE
-
TIME
public static final CassandraType TIME
-
SMALLINT
public static final CassandraType SMALLINT
-
TINYINT
public static final CassandraType TINYINT
-
DURATION
public static final CassandraType DURATION
-
LIST
public static final CassandraType LIST
-
MAP
public static final CassandraType MAP
-
SET
public static final CassandraType SET
-
UDT
public static final CassandraType UDT
-
TUPLE
public static final CassandraType TUPLE
-
-
Method Detail
-
values
public static CassandraType[] 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 (CassandraType c : CassandraType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CassandraType 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 nameNullPointerException- if the argument is null
-
value
public int value()
- Specified by:
valuein interfaceColumnType
-
isBinary
public boolean isBinary()
- Specified by:
isBinaryin interfaceColumnType
-
isBlob
public boolean isBlob()
- Specified by:
isBlobin interfaceColumnType
-
isClob
public boolean isClob()
- Specified by:
isClobin interfaceColumnType
-
isDate
public boolean isDate()
- Specified by:
isDatein interfaceColumnType
-
isTimestamp
public boolean isTimestamp()
- Specified by:
isTimestampin interfaceColumnType
-
isTime
public boolean isTime()
- Specified by:
isTimein interfaceColumnType
-
valueOf
public static ColumnType valueOf(int typeValue)
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:
typeValue- 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 nameNullPointerException- if the argument is null
-
-