org.apache.cassandra.cql3.restrictions

## Interface SingleRestriction

- All Superinterfaces:
    Restriction
  All Known Implementing Classes:
    MultiColumnRestriction, MultiColumnRestriction.EQRestriction, MultiColumnRestriction.INRestriction, MultiColumnRestriction.InRestrictionWithMarker, MultiColumnRestriction.InRestrictionWithValues, MultiColumnRestriction.NotNullRestriction, MultiColumnRestriction.SliceRestriction, SingleColumnRestriction, SingleColumnRestriction.ContainsRestriction, SingleColumnRestriction.EQRestriction, SingleColumnRestriction.INRestriction, SingleColumnRestriction.InRestrictionWithMarker, SingleColumnRestriction.InRestrictionWithValues, SingleColumnRestriction.IsNotNullRestriction, SingleColumnRestriction.LikeRestriction, SingleColumnRestriction.SliceRestriction, SingleColumnRestriction.SuperColumnKeyEQRestriction, SingleColumnRestriction.SuperColumnKeyINRestriction, SingleColumnRestriction.SuperColumnKeyINRestrictionWithMarkers, SingleColumnRestriction.SuperColumnKeyINRestrictionWithValues, SingleColumnRestriction.SuperColumnKeySliceRestriction, SingleColumnRestriction.SuperColumnMultiEQRestriction, SingleColumnRestriction.SuperColumnMultiSliceRestriction

      public interface SingleRestriction
      extends Restriction

  A single restriction/clause on one or multiple column.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `default MultiCBuilder` | `appendBoundTo(MultiCBuilder builder, Bound bound, QueryOptions options)` Appends the values of the `SingleRestriction` for the specified bound to the specified builder.
    `MultiCBuilder` | `appendTo(MultiCBuilder builder, QueryOptions options)` Appends the values of this `SingleRestriction` to the specified builder.
    `default boolean` | `hasBound(Bound b)` Checks if the specified bound is set or not.
    `default boolean` | `isContains()`
    `default boolean` | `isEQ()`
    `default boolean` | `isIN()`
    `default boolean` | `isInclusive(Bound b)` Checks if the specified bound is inclusive or not.
    `default boolean` | `isLIKE()`
    `default boolean` | `isMultiColumn()`
    `default boolean` | `isNotNull()`
    `default boolean` | `isSlice()`
    `SingleRestriction` | `mergeWith(SingleRestriction otherRestriction)` Merges this restriction with the specified one.

    - ### Methods inherited from interface org.apache.cassandra.cql3.restrictions.Restriction

      `addFunctionsTo, addRowFilterTo, getColumnDefs, getFirstColumn, getLastColumn, hasSupportingIndex, isOnToken`

- - ### Method Detail

    - #### isSlice

          default boolean isSlice()

    - #### isEQ

          default boolean isEQ()

    - #### isLIKE

          default boolean isLIKE()

    - #### isIN

          default boolean isIN()

    - #### isContains

          default boolean isContains()

    - #### isNotNull

          default boolean isNotNull()

    - #### isMultiColumn

          default boolean isMultiColumn()

    - #### hasBound

          default boolean hasBound(Bound b)

      Checks if the specified bound is set or not.
      Parameters:
        `b` - the bound type
      Returns:
        `true` if the specified bound is set, `false` otherwise

    - #### isInclusive

          default boolean isInclusive(Bound b)

      Checks if the specified bound is inclusive or not.
      Parameters:
        `b` - the bound type
      Returns:
        `true` if the specified bound is inclusive, `false` otherwise

    - #### mergeWith

          SingleRestriction mergeWith(SingleRestriction otherRestriction)

      Merges this restriction with the specified one.

      Restriction are immutable. Therefore merging two restrictions result in a new one. The reason behind this choice is that it allow a great flexibility in the way the merging can done while preventing any side effect.

      Parameters:
        `otherRestriction` - the restriction to merge into this one
      Returns:
        the restriction resulting of the merge

    - #### appendTo

          MultiCBuilder appendTo(MultiCBuilder builder,
                                 QueryOptions options)

      Appends the values of this `SingleRestriction` to the specified builder.
      Parameters:
        `builder` - the `MultiCBuilder` to append to.
        `options` - the query options
      Returns:
        the `MultiCBuilder`

    - #### appendBoundTo

          default MultiCBuilder appendBoundTo(MultiCBuilder builder,
                                              Bound bound,
                                              QueryOptions options)

      Appends the values of the `SingleRestriction` for the specified bound to the specified builder.
      Parameters:
        `builder` - the `MultiCBuilder` to append to.
        `bound` - the bound
        `options` - the query options
      Returns:
        the `MultiCBuilder`

Copyright © 2018 The Apache Software Foundation