CompoundCType (apache-cassandra API)
Date: 2014-10-21

org.apache.cassandra.db.composites

## Class CompoundCType

- java.lang.Object
- - org.apache.cassandra.db.composites.AbstractCType
  - - org.apache.cassandra.db.composites.CompoundCType

- All Implemented Interfaces:
    java.util.Comparator<Composite>, CType

      public class CompoundCType
      extends AbstractCType

  A truly-composite CType.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `CompoundCType.CompoundCBuilder`

  - ### Field Summary

    - ### Fields inherited from class org.apache.cassandra.db.composites.AbstractCType

      `isByteOrderComparable`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CompoundCType(java.util.List<AbstractType<?>> types)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `AbstractType<?>` | `asAbstractType()` Returns a AbstractType corresponding to this CType for thrift/cql2 sake.
    `CBuilder` | `builder()` A builder of Composite.
    `Composite` | `fromByteBuffer(java.nio.ByteBuffer bytes)` Deserialize a Composite from a ByteBuffer.
    `boolean` | `isCompound()` Returns whether this is a "truly-composite" underneath.
    `CompoundCType` | `setSubtype(int position, AbstractType<?> newType)` Returns a new CType that is equivalent to this CType but with one of the subtype replaced by the provided new type.
    `int` | `size()` The number of subtypes for this CType.
    `AbstractType<?>` | `subtype(int i)` Gets a subtype of this CType.

    - ### Methods inherited from class org.apache.cassandra.db.composites.AbstractCType

      `checkRemaining, compare, deletionInfoSerializer, equals, getByteOrderAsymmetricColumnComparator, getByteOrderColumnComparator, getString, hashCode, indexComparator, indexReverseComparator, indexSerializer, isByteOrderComparable, isCompatibleWith, make, rangeTombstoneSerializer, reverseComparator, rowIndexEntrySerializer, serializer, sliceBytes, sliceQueryFilterSerializer, sliceSerializer, toString, validate`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### CompoundCType

          public CompoundCType(java.util.List<AbstractType<?>> types)

  - ### Method Detail

    - #### isCompound

          public boolean isCompound()

      Description copied from interface: `CType`
      Returns whether this is a "truly-composite" underneath.

    - #### size

          public int size()

      Description copied from interface: `CType`
      The number of subtypes for this CType.

    - #### subtype

          public AbstractType<?> subtype(int i)

      Description copied from interface: `CType`
      Gets a subtype of this CType.

    - #### fromByteBuffer

          public Composite fromByteBuffer(java.nio.ByteBuffer bytes)

      Description copied from interface: `CType`
      Deserialize a Composite from a ByteBuffer. This is meant for thrift/cql2 to convert the fully serialized buffer we get from the clients to composites.

    - #### builder

          public CBuilder builder()

      Description copied from interface: `CType`
      A builder of Composite.

    - #### setSubtype

          public CompoundCType setSubtype(int position,
                                 AbstractType<?> newType)

      Description copied from interface: `CType`
      Returns a new CType that is equivalent to this CType but with one of the subtype replaced by the provided new type.

    - #### asAbstractType

          public AbstractType<?> asAbstractType()

      Description copied from interface: `CType`
      Returns a AbstractType corresponding to this CType for thrift/cql2 sake. If the CType is a "simple" one, this just return the wrapped type, otherwise it returns the corresponding org.apache.cassandra.db.marshal.CompositeType. This is only meant to be use for backward compatibility (particularly for thrift/cql2) but it's not meant to be used internally.

Copyright © 2014 The Apache Software Foundation