public class CompositeType extends AbstractCompositeType
AbstractCompositeType.ParsedComparatorAbstractType.ComparisonTypeAssignmentTestable.TestResult| Modifier and Type | Field and Description |
|---|---|
java.util.List<AbstractType<?>> |
types |
comparatorSet, comparisonType, isByteOrderComparable, reverseComparator| Modifier | Constructor and Description |
|---|---|
protected |
CompositeType(java.util.List<AbstractType<?>> types) |
| Modifier and Type | Method and Description |
|---|---|
static <V> V |
build(ValueAccessor<V> accessor,
boolean isStatic,
V... values) |
static <V> V |
build(ValueAccessor<V> accessor,
V... values) |
java.nio.ByteBuffer |
decompose(java.lang.Object... objects) |
AbstractType<?> |
expandUserTypes()
Replace any instances of UserType with equivalent TupleType-s.
|
static java.nio.ByteBuffer |
extractComponent(java.nio.ByteBuffer bb,
int idx) |
protected <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 <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 <V> AbstractType<?> |
getComparator(int i,
V value,
ValueAccessor<V> accessor,
int offset) |
protected <V> int |
getComparatorSize(int i,
V value,
ValueAccessor<V> accessor,
int offset) |
java.util.List<AbstractType<?>> |
getComponents()
Return a list of the "subcomponents" this type has.
|
static CompositeType |
getInstance(AbstractType... types) |
static CompositeType |
getInstance(java.lang.Iterable<AbstractType<?>> types) |
static CompositeType |
getInstance(java.util.List<AbstractType<?>> types) |
static CompositeType |
getInstance(TypeParser parser) |
boolean |
isCompatibleWith(AbstractType<?> previous)
Returns true if this comparator is compatible with the provided
previous comparator, that is if previous can safely be replaced by this.
|
static <V> boolean |
isStaticName(V value,
ValueAccessor<V> accessor) |
boolean |
isValueCompatibleWithInternal(AbstractType<?> otherType)
Needed to handle ReversedType in value-compatibility checks.
|
protected AbstractCompositeType.ParsedComparator |
parseComparator(int i,
java.lang.String part)
Used by fromString
|
protected <V> boolean |
readIsStatic(V value,
ValueAccessor<V> accessor) |
protected static <V> boolean |
readIsStaticInternal(V value,
ValueAccessor<V> accessor) |
<V> boolean |
referencesUserType(V name,
ValueAccessor<V> accessor) |
java.nio.ByteBuffer[] |
split(java.nio.ByteBuffer name)
Split a composite column names into it's components.
|
static <V> java.util.List<V> |
splitName(V name,
ValueAccessor<V> accessor) |
protected int |
startingOffset(boolean isStatic) |
protected static int |
startingOffsetInternal(boolean isStatic) |
java.lang.String |
toString()
This must be overriden by subclasses if necessary so that for any
AbstractType, this == TypeParser.parse(toString()).
|
protected <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
|
CompositeType |
withUpdatedUserType(UserType udt)
Returns an instance of this type with all references to the provided user type recursively replaced with its new
definition.
|
compareCustom, escape, fromJSONObject, fromString, getSerializer, getString, toJSONString, validate, validateasCQL3Type, asCQLTypeStringList, checkComparable, compare, compare, compareCollectionMembers, compareForCQL, compose, compose, decompose, freeze, freezeNestedMulticellTypes, getString, getString, isCollection, isCounter, isEmptyValueMeaningless, isFreezable, isFrozenCollection, isMultiCell, isReversed, isTuple, isUDT, isValueCompatibleWith, parseDefaultParameters, read, readArray, readBuffer, readBuffer, referencesDuration, referencesUserType, skipValue, subTypes, testAssignment, testAssignment, toJSONString, toString, validateCellValue, validateCollectionMember, valueLengthIfFixed, writeValue, writeValue, writtenLength, writtenLengthpublic final java.util.List<AbstractType<?>> types
protected CompositeType(java.util.List<AbstractType<?>> types)
public static CompositeType getInstance(TypeParser parser) throws ConfigurationException, SyntaxException
public static CompositeType getInstance(java.lang.Iterable<AbstractType<?>> types)
public static CompositeType getInstance(AbstractType... types)
protected static int startingOffsetInternal(boolean isStatic)
protected int startingOffset(boolean isStatic)
startingOffset in class AbstractCompositeTypeprotected static <V> boolean readIsStaticInternal(V value,
ValueAccessor<V> accessor)
protected <V> boolean readIsStatic(V value,
ValueAccessor<V> accessor)
readIsStatic in class AbstractCompositeTypepublic static CompositeType getInstance(java.util.List<AbstractType<?>> types)
protected <V> AbstractType<?> getComparator(int i, V value, ValueAccessor<V> accessor, int offset)
getComparator in class AbstractCompositeTypei - DynamicCompositeType will read the type information from @param bbvalue - name of type definitionprotected <VL,VR> AbstractType<?> getComparator(int i, VL left, ValueAccessor<VL> accessorL, VR right, ValueAccessor<VR> accessorR, int offsetL, int offsetR)
AbstractCompositeTypegetComparator in class AbstractCompositeTypei - is ignored.protected <V> AbstractType<?> getAndAppendComparator(int i, V value, ValueAccessor<V> accessor, java.lang.StringBuilder sb, int offset)
AbstractCompositeTypegetAndAppendComparator in class AbstractCompositeTypeprotected AbstractCompositeType.ParsedComparator parseComparator(int i, java.lang.String part)
AbstractCompositeTypeparseComparator in class AbstractCompositeTypeprotected <V> AbstractType<?> validateComparator(int i, V value, ValueAccessor<V> accessor, int offset) throws MarshalException
AbstractCompositeTypevalidateComparator in class AbstractCompositeTypeMarshalExceptionprotected <V> int getComparatorSize(int i,
V value,
ValueAccessor<V> accessor,
int offset)
getComparatorSize in class AbstractCompositeTypepublic java.nio.ByteBuffer decompose(java.lang.Object... objects)
decompose in class AbstractCompositeTypepublic java.nio.ByteBuffer[] split(java.nio.ByteBuffer name)
AbstractCompositeTypesplit in class AbstractCompositeTypepublic static <V> java.util.List<V> splitName(V name,
ValueAccessor<V> accessor)
public static java.nio.ByteBuffer extractComponent(java.nio.ByteBuffer bb,
int idx)
public static <V> boolean isStaticName(V value,
ValueAccessor<V> accessor)
public java.util.List<AbstractType<?>> getComponents()
AbstractTypegetComponents in class AbstractType<java.nio.ByteBuffer>public boolean isCompatibleWith(AbstractType<?> previous)
AbstractTypeisCompatibleWith in class AbstractType<java.nio.ByteBuffer>public boolean isValueCompatibleWithInternal(AbstractType<?> otherType)
AbstractTypeisValueCompatibleWithInternal in class AbstractType<java.nio.ByteBuffer>public <V> boolean referencesUserType(V name,
ValueAccessor<V> accessor)
referencesUserType in class AbstractType<java.nio.ByteBuffer>public CompositeType withUpdatedUserType(UserType udt)
AbstractTypewithUpdatedUserType in class AbstractType<java.nio.ByteBuffer>public AbstractType<?> expandUserTypes()
AbstractTypeexpandUserTypes in class AbstractType<java.nio.ByteBuffer>public java.lang.String toString()
AbstractTypetoString in class AbstractType<java.nio.ByteBuffer>@SafeVarargs public static <V> V build(ValueAccessor<V> accessor, V... values)
@SafeVarargs public static <V> V build(ValueAccessor<V> accessor, boolean isStatic, V... values)
Copyright © 2009-2020 The Apache Software Foundation