com.thinkaurelius.titan.diskstorage.keycolumnvalue

## Class SliceQuery

- java.lang.Object
- - com.thinkaurelius.titan.graphdb.query.BaseQuery
  - - com.thinkaurelius.titan.diskstorage.keycolumnvalue.SliceQuery

- All Implemented Interfaces:
    BackendQuery<SliceQuery>, Query
  Direct Known Subclasses:
    KeyRangeQuery, KeySliceQuery

      public class SliceQuery
      extends BaseQuery
      implements BackendQuery<SliceQuery>

  Queries for a slice of data identified by a start point (inclusive) and end point (exclusive). Returns all `StaticBuffer`s that lie in this range up to the given limit.

  If a SliceQuery is marked static it is expected that the result set does not change.
  Author:
    Matthias Broecheler (me@matthiasb.com)

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static boolean` | `DEFAULT_STATIC`

    - ### Fields inherited from interface com.thinkaurelius.titan.graphdb.query.Query

      `NO_LIMIT`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SliceQuery(SliceQuery query)`
    `SliceQuery(StaticBuffer sliceStart, StaticBuffer sliceEnd)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object other)`
    `StaticBuffer` | `getSliceEnd()` The end of the slice is considered to be exclusive
    `StaticBuffer` | `getSliceStart()` The start of the slice is considered to be inclusive
    `EntryList` | `getSubset(SliceQuery otherQuery, EntryList otherResult)`
    `int` | `hashCode()`
    `static StaticBuffer` | `pointRange(StaticBuffer point)`
    `SliceQuery` | `setLimit(int limit)` Sets the limit of the query if it wasn't specified in the constructor
    `boolean` | `subsumes(SliceQuery oth)`
    `SliceQuery` | `updateLimit(int newLimit)` Creates a new query identical to the current one but with the specified limit.

    - ### Methods inherited from class com.thinkaurelius.titan.graphdb.query.BaseQuery

      `getLimit, hasLimit`

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

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

    - ### Methods inherited from interface com.thinkaurelius.titan.graphdb.query.Query

      `getLimit, hasLimit`

- - ### Field Detail

    - #### DEFAULT_STATIC

          public static final boolean DEFAULT_STATIC

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### SliceQuery

          public SliceQuery(StaticBuffer sliceStart,
                    StaticBuffer sliceEnd)

    - #### SliceQuery

          public SliceQuery(SliceQuery query)

  - ### Method Detail

    - #### getSliceStart

          public StaticBuffer getSliceStart()

      The start of the slice is considered to be inclusive
      Returns:
        The StaticBuffer denoting the start of the slice

    - #### getSliceEnd

          public StaticBuffer getSliceEnd()

      The end of the slice is considered to be exclusive
      Returns:
        The StaticBuffer denoting the end of the slice

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### equals

          public boolean equals(Object other)

      Overrides:
        `equals` in class `Object`

    - #### subsumes

          public boolean subsumes(SliceQuery oth)

    - #### getSubset

          public EntryList getSubset(SliceQuery otherQuery,
                            EntryList otherResult)

    - #### pointRange

          public static StaticBuffer pointRange(StaticBuffer point)

    - #### setLimit

          public SliceQuery setLimit(int limit)

      Description copied from class: `BaseQuery`
      Sets the limit of the query if it wasn't specified in the constructor
      Overrides:
        `setLimit` in class `BaseQuery`
      Returns:

    - #### updateLimit

          public SliceQuery updateLimit(int newLimit)

      Description copied from interface: `BackendQuery`
      Creates a new query identical to the current one but with the specified limit.
      Specified by:
        `updateLimit` in interface `BackendQuery<SliceQuery>`
      Returns:

Copyright © 2012–2014. All rights reserved.