|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cassandra.db.marshal.AbstractType<T>
public abstract class AbstractType<T>
Specifies a Comparator for a specific type of ByteBuffer. Note that empty ByteBuffer are used to represent "start at the beginning" or "stop at the end" arguments to get_slice, so the Comparator should always handle those values even if they normally do not represent a valid ByteBuffer for the type being compared.
Field Summary | |
---|---|
java.util.Comparator<IColumn> |
columnComparator
|
java.util.Comparator<IColumn> |
columnReverseComparator
|
java.util.Comparator<IndexHelper.IndexInfo> |
indexComparator
|
java.util.Comparator<IndexHelper.IndexInfo> |
indexReverseComparator
|
java.util.Comparator<java.nio.ByteBuffer> |
reverseComparator
|
Constructor Summary | |
---|---|
protected |
AbstractType()
|
Method Summary | |
---|---|
abstract T |
compose(java.nio.ByteBuffer bytes)
|
abstract java.nio.ByteBuffer |
decompose(T value)
|
java.nio.ByteBuffer |
fromString(java.lang.String source)
get a byte representation of the given string. |
java.lang.String |
getColumnsString(java.util.Collection<IColumn> columns)
|
abstract int |
getJdbcType()
|
abstract int |
getPrecision(T obj)
|
java.util.Comparator<java.nio.ByteBuffer> |
getReverseComparator()
|
abstract int |
getScale(T obj)
|
abstract java.lang.String |
getString(java.nio.ByteBuffer bytes)
get a string representation of the bytes suitable for log messages |
java.lang.String |
getString(java.util.Collection<java.nio.ByteBuffer> names)
|
abstract java.lang.Class<T> |
getType()
returns the class this AbstractType represents. |
abstract boolean |
isCaseSensitive()
|
boolean |
isCommutative()
|
abstract boolean |
isCurrency()
|
abstract boolean |
isSigned()
|
abstract boolean |
needsQuotes()
|
static AbstractType |
parseDefaultParameters(AbstractType baseType,
TypeParser parser)
|
java.lang.String |
toString()
This must be overriden by subclasses if necessary so that for any AbstractType, this == TypeParser.parse(toString()). |
abstract java.lang.String |
toString(T t)
get a string representation of a particular type. |
abstract void |
validate(java.nio.ByteBuffer bytes)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Comparator |
---|
compare, equals |
Field Detail |
---|
public final java.util.Comparator<IndexHelper.IndexInfo> indexComparator
public final java.util.Comparator<IndexHelper.IndexInfo> indexReverseComparator
public final java.util.Comparator<IColumn> columnComparator
public final java.util.Comparator<IColumn> columnReverseComparator
public final java.util.Comparator<java.nio.ByteBuffer> reverseComparator
Constructor Detail |
---|
protected AbstractType()
Method Detail |
---|
public abstract T compose(java.nio.ByteBuffer bytes)
public abstract java.nio.ByteBuffer decompose(T value)
public abstract java.lang.String toString(T t)
public abstract java.lang.String getString(java.nio.ByteBuffer bytes)
public java.nio.ByteBuffer fromString(java.lang.String source) throws MarshalException
MarshalException
public abstract void validate(java.nio.ByteBuffer bytes) throws MarshalException
MarshalException
public java.util.Comparator<java.nio.ByteBuffer> getReverseComparator()
public java.lang.String getString(java.util.Collection<java.nio.ByteBuffer> names)
public java.lang.String getColumnsString(java.util.Collection<IColumn> columns)
public boolean isCommutative()
public abstract java.lang.Class<T> getType()
public abstract boolean isSigned()
public abstract boolean isCaseSensitive()
public abstract boolean isCurrency()
public abstract int getPrecision(T obj)
public abstract int getScale(T obj)
public abstract int getJdbcType()
public abstract boolean needsQuotes()
public static AbstractType parseDefaultParameters(AbstractType baseType, TypeParser parser) throws ConfigurationException
ConfigurationException
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |