public class CompositeType extends AbstractCompositeType
Modifier and Type | Class and Description |
---|---|
static class |
CompositeType.Builder |
AbstractCompositeType.CompositeComponent, AbstractCompositeType.ParsedComparator
Modifier and Type | Field and Description |
---|---|
java.util.List<AbstractType<?>> |
types |
reverseComparator
Modifier | Constructor and Description |
---|---|
protected |
CompositeType(java.util.List<AbstractType<?>> types) |
Modifier and Type | Method and Description |
---|---|
static java.nio.ByteBuffer |
build(java.nio.ByteBuffer... buffers) |
CompositeType.Builder |
builder() |
int |
componentsCount()
The number of subcomponents this type has.
|
java.nio.ByteBuffer |
decompose(java.lang.Object... objects) |
static java.nio.ByteBuffer |
extractComponent(java.nio.ByteBuffer bb,
int idx) |
java.nio.ByteBuffer |
extractLastComponent(java.nio.ByteBuffer bb) |
protected AbstractType<?> |
getAndAppendComparator(int i,
java.nio.ByteBuffer bb,
java.lang.StringBuilder sb)
Adds type information from @param bb to @param sb.
|
protected AbstractType<?> |
getComparator(int i,
java.nio.ByteBuffer bb) |
protected AbstractType<?> |
getComparator(int i,
java.nio.ByteBuffer bb1,
java.nio.ByteBuffer bb2)
Adds DynamicCompositeType type information from @param bb1 to @param bb2.
|
java.util.List<AbstractType<?>> |
getComponents()
Return a list of the "subcomponents" this type has.
|
static CompositeType |
getInstance(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.
|
boolean |
isValueCompatibleWith(AbstractType<?> previous)
Returns true if values of the previous AbstracType can be read by the this
AbsractType.
|
protected AbstractCompositeType.ParsedComparator |
parseComparator(int i,
java.lang.String part)
Used by fromString
|
java.nio.ByteBuffer[] |
split(java.nio.ByteBuffer name)
Split a composite column names into it's components.
|
java.lang.String |
toString()
This must be overriden by subclasses if necessary so that for any
AbstractType, this == TypeParser.parse(toString()).
|
protected AbstractType<?> |
validateComparator(int i,
java.nio.ByteBuffer bb)
Like getComparator, but validates that @param i does not exceed the defined range
|
compare, deconstruct, escape, fromString, getBytes, getSerializer, getShortLength, getString, getWithShortLength, putShortLength, validate
asCQL3Type, compareCollectionMembers, compose, decompose, fromStringCQL2, getString, isCollection, isCounter, parseDefaultParameters, validateCollectionMember
public 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(AbstractType... types)
public static CompositeType getInstance(java.util.List<AbstractType<?>> types)
protected AbstractType<?> getComparator(int i, java.nio.ByteBuffer bb)
getComparator
in class AbstractCompositeType
i
- DynamicCompositeType will read the type information from @param bbbb
- name of type definitionprotected AbstractType<?> getComparator(int i, java.nio.ByteBuffer bb1, java.nio.ByteBuffer bb2)
AbstractCompositeType
getComparator
in class AbstractCompositeType
i
- is ignored.protected AbstractType<?> getAndAppendComparator(int i, java.nio.ByteBuffer bb, java.lang.StringBuilder sb)
AbstractCompositeType
getAndAppendComparator
in class AbstractCompositeType
protected AbstractCompositeType.ParsedComparator parseComparator(int i, java.lang.String part)
AbstractCompositeType
parseComparator
in class AbstractCompositeType
protected AbstractType<?> validateComparator(int i, java.nio.ByteBuffer bb) throws MarshalException
AbstractCompositeType
validateComparator
in class AbstractCompositeType
MarshalException
public java.nio.ByteBuffer decompose(java.lang.Object... objects)
decompose
in class AbstractCompositeType
public java.nio.ByteBuffer[] split(java.nio.ByteBuffer name)
AbstractCompositeType
split
in class AbstractCompositeType
public static java.nio.ByteBuffer extractComponent(java.nio.ByteBuffer bb, int idx)
public java.nio.ByteBuffer extractLastComponent(java.nio.ByteBuffer bb)
public int componentsCount()
AbstractType
componentsCount
in class AbstractType<java.nio.ByteBuffer>
public java.util.List<AbstractType<?>> getComponents()
AbstractType
getComponents
in class AbstractType<java.nio.ByteBuffer>
public boolean isCompatibleWith(AbstractType<?> previous)
AbstractType
isCompatibleWith
in class AbstractType<java.nio.ByteBuffer>
public boolean isValueCompatibleWith(AbstractType<?> previous)
AbstractType
isValueCompatibleWith
in class AbstractType<java.nio.ByteBuffer>
public java.lang.String toString()
AbstractType
toString
in class AbstractType<java.nio.ByteBuffer>
public CompositeType.Builder builder()
public static java.nio.ByteBuffer build(java.nio.ByteBuffer... buffers)
Copyright © 2014 The Apache Software Foundation