org.apache.cassandra.cql3.restrictions

## Class MultiColumnRestriction.Slice

- java.lang.Object
- - org.apache.cassandra.cql3.restrictions.MultiColumnRestriction
  - - org.apache.cassandra.cql3.restrictions.MultiColumnRestriction.Slice

- All Implemented Interfaces:
    Restriction
  Enclosing class:
    MultiColumnRestriction

      public static class MultiColumnRestriction.Slice
      extends MultiColumnRestriction

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.cassandra.cql3.restrictions.MultiColumnRestriction

      `MultiColumnRestriction.EQ, MultiColumnRestriction.IN, MultiColumnRestriction.InWithMarker, MultiColumnRestriction.InWithValues, MultiColumnRestriction.Slice`

  - ### Field Summary

    - ### Fields inherited from class org.apache.cassandra.cql3.restrictions.MultiColumnRestriction

      `columnDefs`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Slice(java.util.List<ColumnDefinition> columnDefs, Bound bound, boolean inclusive, Term term)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addIndexExpressionTo(java.util.List<IndexExpression> expressions, SecondaryIndexManager indexManager, QueryOptions options)` Adds to the specified list the `IndexExpression`s corresponding to this `Restriction`.
    `CompositesBuilder` | `appendBoundTo(CFMetaData cfm, CompositesBuilder builder, Bound bound, QueryOptions options)` Appends the values of the `Restriction` for the specified bound to the specified builder.
    `CompositesBuilder` | `appendTo(CFMetaData cfm, CompositesBuilder builder, QueryOptions options)` Appends the values of this `Restriction` to the specified builder.
    `Restriction` | `doMergeWith(Restriction otherRestriction)`
    `java.lang.Iterable<Function>` | `getFunctions()` Return an Iterable over all of the functions (both native and user-defined) used by any component of the restriction
    `boolean` | `hasBound(Bound bound)` Checks if the specified bound is set or not.
    `boolean` | `isContains()`
    `boolean` | `isEQ()`
    `boolean` | `isIN()`
    `boolean` | `isInclusive(Bound bound)` Checks if the specified bound is inclusive or not.
    `boolean` | `isNotReturningAnyRows(CFMetaData cfm, QueryOptions options)` Checks if this restriction will prevent the query to return any rows.
    `boolean` | `isOnToken()`
    `boolean` | `isSlice()`
    `protected boolean` | `isSupportedBy(SecondaryIndex index)` Check if this type of restriction is supported for by the specified index.
    `protected static Bound` | `reverseBoundIfNeeded(ColumnDefinition columnDefinition, Bound bound)` Reverses the specified bound if the column type is a reversed one.
    `java.lang.String` | `toString()`
    `protected static java.nio.ByteBuffer` | `validateIndexedValue(ColumnSpecification columnSpec, java.nio.ByteBuffer value)`

    - ### Methods inherited from class org.apache.cassandra.cql3.restrictions.MultiColumnRestriction

      `getColumnDefs, getColumnsInCommons, getFirstColumn, getLastColumn, hasSupportingIndex, isMultiColumn, mergeWith`

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

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

- - ### Constructor Detail

    - #### Slice

          public Slice(java.util.List<ColumnDefinition> columnDefs,
                       Bound bound,
                       boolean inclusive,
                       Term term)

  - ### Method Detail

    - #### isSlice

          public boolean isSlice()

      Specified by:
        `isSlice` in interface `Restriction`

    - #### appendTo

          public CompositesBuilder appendTo(CFMetaData cfm,
                                            CompositesBuilder builder,
                                            QueryOptions options)

      Description copied from interface: `Restriction`
      Appends the values of this `Restriction` to the specified builder.
      Parameters:
        `cfm` - the table metadata
        `builder` - the `CompositesBuilder` to append to.
        `options` - the query options
      Returns:
        the `CompositesBuilder`

    - #### appendBoundTo

          public CompositesBuilder appendBoundTo(CFMetaData cfm,
                                                 CompositesBuilder builder,
                                                 Bound bound,
                                                 QueryOptions options)

      Description copied from interface: `Restriction`
      Appends the values of the `Restriction` for the specified bound to the specified builder.
      Specified by:
        `appendBoundTo` in interface `Restriction`
      Parameters:
        `cfm` - the table metadata
        `builder` - the `CompositesBuilder` to append to.
        `bound` - the bound
        `options` - the query options
      Returns:
        the `CompositesBuilder`

    - #### isSupportedBy

          protected boolean isSupportedBy(SecondaryIndex index)

      Description copied from class: `MultiColumnRestriction`
      Check if this type of restriction is supported for by the specified index.
      Specified by:
        `isSupportedBy` in class `MultiColumnRestriction`
      Parameters:
        `index` - the Secondary index
      Returns:
        `true` this type of restriction is supported by the specified index, `false` otherwise.

    - #### hasBound

          public boolean hasBound(Bound bound)

      Description copied from interface: `Restriction`
      Checks if the specified bound is set or not.
      Specified by:
        `hasBound` in interface `Restriction`
      Parameters:
        `bound` - the bound type
      Returns:
        `true` if the specified bound is set, `false` otherwise

    - #### getFunctions

          public java.lang.Iterable<Function> getFunctions()

      Description copied from interface: `Restriction`
      Return an Iterable over all of the functions (both native and user-defined) used by any component of the restriction
      Returns:
        functions all functions found (may contain duplicates)

    - #### isInclusive

          public boolean isInclusive(Bound bound)

      Description copied from interface: `Restriction`
      Checks if the specified bound is inclusive or not.
      Specified by:
        `isInclusive` in interface `Restriction`
      Parameters:
        `bound` - the bound type
      Returns:
        `true` if the specified bound is inclusive, `false` otherwise

    - #### doMergeWith

          public Restriction doMergeWith(Restriction otherRestriction)
                                  throws InvalidRequestException

      Specified by:
        `doMergeWith` in class `MultiColumnRestriction`
      Throws:
        `InvalidRequestException`

    - #### addIndexExpressionTo

          public final void addIndexExpressionTo(java.util.List<IndexExpression> expressions,
                                                 SecondaryIndexManager indexManager,
                                                 QueryOptions options)
                                          throws InvalidRequestException

      Description copied from interface: `Restriction`
      Adds to the specified list the `IndexExpression`s corresponding to this `Restriction`.
      Parameters:
        `expressions` - the list to add the `IndexExpression`s to
        `indexManager` - the secondary index manager
        `options` - the query options
      Throws:
        `InvalidRequestException` - if this `Restriction` cannot be converted into `IndexExpression`s

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### isNotReturningAnyRows

          public boolean isNotReturningAnyRows(CFMetaData cfm,
                                               QueryOptions options)

      Description copied from interface: `Restriction`
      Checks if this restriction will prevent the query to return any rows.
      Specified by:
        `isNotReturningAnyRows` in interface `Restriction`
      Parameters:
        `cfm` - the table metadata
        `options` - the query options
      Returns:
        `true` if this restriction will prevent the query to return any rows, otherwise

    - #### isOnToken

          public boolean isOnToken()

      Specified by:
        `isOnToken` in interface `Restriction`

    - #### isEQ

          public boolean isEQ()

      Specified by:
        `isEQ` in interface `Restriction`

    - #### isIN

          public boolean isIN()

      Specified by:
        `isIN` in interface `Restriction`

    - #### isContains

          public boolean isContains()

      Specified by:
        `isContains` in interface `Restriction`

    - #### validateIndexedValue

          protected static java.nio.ByteBuffer validateIndexedValue(ColumnSpecification columnSpec,
                                                                    java.nio.ByteBuffer value)
                                                             throws InvalidRequestException

      Throws:
        `InvalidRequestException`

    - #### reverseBoundIfNeeded

          protected static Bound reverseBoundIfNeeded(ColumnDefinition columnDefinition,
                                                      Bound bound)

      Reverses the specified bound if the column type is a reversed one.
      Parameters:
        `columnDefinition` - the column definition
        `bound` - the bound
      Returns:
        the bound reversed if the column type was a reversed one or the original bound

Copyright © 2018 The Apache Software Foundation