public abstract class AbstractCompositeType extends AbstractType<java.nio.ByteBuffer>
Modifier and Type | Class and Description |
---|---|
protected static interface |
AbstractCompositeType.ParsedComparator |
AbstractType.ComparisonType
AssignmentTestable.TestResult
comparatorSet, comparisonType, isByteOrderComparable, reverseComparator
Modifier | Constructor and Description |
---|---|
protected |
AbstractCompositeType() |
Modifier and Type | Method and Description |
---|---|
<VL,VR> int |
compareCustom(VL left,
ValueAccessor<VL> accessorL,
VR right,
ValueAccessor<VR> accessorR)
Implement IFF ComparisonType is CUSTOM
Compares the byte representation of two instances of this class,
for types where this cannot be done by simple in-order comparison of the
unsigned bytes
Standard Java compare semantics
|
abstract java.nio.ByteBuffer |
decompose(java.lang.Object... objects) |
static java.lang.String |
escape(java.lang.String input) |
Term |
fromJSONObject(java.lang.Object parsed)
Given a parsed JSON string, return a byte representation of the object.
|
java.nio.ByteBuffer |
fromString(java.lang.String source)
get a byte representation of the given string.
|
protected abstract <V> AbstractType<?> |
getAndAppendComparator(int i,
V value,
ValueAccessor<V> accessor,
java.lang.StringBuilder sb,
int offset)
Adds type information from @param bb to @param sb.
|
protected abstract <VL,VR> AbstractType<?> |
getComparator(int i,
VL left,
ValueAccessor<VL> accessorL,
VR right,
ValueAccessor<VR> accessorR,
int offsetL,
int offsetR)
Adds DynamicCompositeType type information from @param bb1 to @param bb2.
|
protected abstract <V> AbstractType<?> |
getComparator(int i,
V value,
ValueAccessor<V> accessor,
int offset) |
protected abstract <V> int |
getComparatorSize(int i,
V value,
ValueAccessor<V> accessor,
int offset) |
TypeSerializer<java.nio.ByteBuffer> |
getSerializer() |
<V> java.lang.String |
getString(V input,
ValueAccessor<V> accessor)
get a string representation of the bytes used for various identifier (NOT just for log messages)
|
protected abstract AbstractCompositeType.ParsedComparator |
parseComparator(int i,
java.lang.String part)
Used by fromString
|
protected abstract <V> boolean |
readIsStatic(V value,
ValueAccessor<V> accessor) |
java.nio.ByteBuffer[] |
split(java.nio.ByteBuffer bb)
Split a composite column names into it's components.
|
protected abstract int |
startingOffset(boolean isStatic) |
java.lang.String |
toJSONString(java.nio.ByteBuffer buffer,
ProtocolVersion protocolVersion)
Converts the specified value into its JSON representation.
|
void |
validate(java.nio.ByteBuffer bb) |
<V> void |
validate(V input,
ValueAccessor<V> accessor) |
protected abstract <V> AbstractType<?> |
validateComparator(int i,
V value,
ValueAccessor<V> accessor,
int offset)
Like getComparator, but validates that @param i does not exceed the defined range
|
asCQL3Type, asCQLTypeStringList, checkComparable, compare, compare, compareCollectionMembers, compareForCQL, compose, compose, decompose, expandUserTypes, freeze, freezeNestedMulticellTypes, getComponents, getString, getString, isCollection, isCompatibleWith, isCounter, isEmptyValueMeaningless, isFreezable, isFrozenCollection, isMultiCell, isReversed, isTuple, isUDT, isValueCompatibleWith, isValueCompatibleWithInternal, parseDefaultParameters, read, readArray, readBuffer, readBuffer, referencesDuration, referencesUserType, referencesUserType, skipValue, subTypes, testAssignment, testAssignment, toJSONString, toString, toString, validateCellValue, validateCollectionMember, valueLengthIfFixed, withUpdatedUserType, writeValue, writeValue, writtenLength, writtenLength
public <VL,VR> int compareCustom(VL left, ValueAccessor<VL> accessorL, VR right, ValueAccessor<VR> accessorR)
AbstractType
compareCustom
in class AbstractType<java.nio.ByteBuffer>
protected abstract <V> boolean readIsStatic(V value, ValueAccessor<V> accessor)
protected abstract int startingOffset(boolean isStatic)
public java.nio.ByteBuffer[] split(java.nio.ByteBuffer bb)
public static java.lang.String escape(java.lang.String input)
public <V> java.lang.String getString(V input, ValueAccessor<V> accessor)
AbstractType
getString
in class AbstractType<java.nio.ByteBuffer>
public java.nio.ByteBuffer fromString(java.lang.String source)
AbstractType
fromString
in class AbstractType<java.nio.ByteBuffer>
public Term fromJSONObject(java.lang.Object parsed)
AbstractType
fromJSONObject
in class AbstractType<java.nio.ByteBuffer>
parsed
- the result of parsing a json stringpublic java.lang.String toJSONString(java.nio.ByteBuffer buffer, ProtocolVersion protocolVersion)
AbstractType
The buffer position will stay the same.
toJSONString
in class AbstractType<java.nio.ByteBuffer>
buffer
- the value to convertprotocolVersion
- the protocol version to use for the conversionpublic void validate(java.nio.ByteBuffer bb) throws MarshalException
validate
in class AbstractType<java.nio.ByteBuffer>
MarshalException
public <V> void validate(V input, ValueAccessor<V> accessor)
validate
in class AbstractType<java.nio.ByteBuffer>
public abstract java.nio.ByteBuffer decompose(java.lang.Object... objects)
public TypeSerializer<java.nio.ByteBuffer> getSerializer()
getSerializer
in class AbstractType<java.nio.ByteBuffer>
protected abstract <V> int getComparatorSize(int i, V value, ValueAccessor<V> accessor, int offset)
protected abstract <V> AbstractType<?> getComparator(int i, V value, ValueAccessor<V> accessor, int offset)
i
- DynamicCompositeType will read the type information from @param bbvalue
- name of type definitionprotected abstract <VL,VR> AbstractType<?> getComparator(int i, VL left, ValueAccessor<VL> accessorL, VR right, ValueAccessor<VR> accessorR, int offsetL, int offsetR)
i
- is ignored.protected abstract <V> AbstractType<?> getAndAppendComparator(int i, V value, ValueAccessor<V> accessor, java.lang.StringBuilder sb, int offset)
protected abstract <V> AbstractType<?> validateComparator(int i, V value, ValueAccessor<V> accessor, int offset) throws MarshalException
MarshalException
protected abstract AbstractCompositeType.ParsedComparator parseComparator(int i, java.lang.String part)
Copyright © 2009-2022 The Apache Software Foundation