/** * Returns the index operator corresponding to the specified boundary. * * @param b the boundary type * @return the index operator corresponding to the specified boundary */ public Operator getIndexOperator(Bound b) { if (b.isStart()) return boundInclusive[b.idx] ? Operator.GTE : Operator.GT; return boundInclusive[b.idx] ? Operator.LTE : Operator.LT; }
/** * Returns the index operator corresponding to the specified boundary. * * @param b the boundary type * @return the index operator corresponding to the specified boundary */ public Operator getIndexOperator(Bound b) { if (b.isStart()) return boundInclusive[b.idx] ? Operator.GTE : Operator.GT; return boundInclusive[b.idx] ? Operator.LTE : Operator.LT; }
/** * Returns the index operator corresponding to the specified boundary. * * @param b the boundary type * @return the index operator corresponding to the specified boundary */ public Operator getIndexOperator(Bound b) { if (b.isStart()) return boundInclusive[b.idx] ? Operator.GTE : Operator.GT; return boundInclusive[b.idx] ? Operator.LTE : Operator.LT; }
public Bound reverse() { return isStart() ? END : START; }
public Bound reverse() { return isStart() ? END : START; }
public Bound reverse() { return isStart() ? END : START; }
/** * Creates a new <code>TermSlice</code> with the specified boundary. * * @param bound the boundary type * @param include <code>true</code> if the boundary is inclusive * @param term the value * @return a new <code>TermSlice</code> instance */ public static TermSlice newInstance(Bound bound, boolean include, Term term) { return bound.isStart() ? new TermSlice(term, include, null, false) : new TermSlice(null, false, term, include); }
/** * Creates a new <code>TermSlice</code> with the specified boundary. * * @param bound the boundary type * @param include <code>true</code> if the boundary is inclusive * @param term the value * @return a new <code>TermSlice</code> instance */ public static TermSlice newInstance(Bound bound, boolean include, Term term) { return bound.isStart() ? new TermSlice(term, include, null, false) : new TermSlice(null, false, term, include); }
/** * Creates a new <code>TermSlice</code> with the specified boundary. * * @param bound the boundary type * @param include <code>true</code> if the boundary is inclusive * @param term the value * @return a new <code>TermSlice</code> instance */ public static TermSlice newInstance(Bound bound, boolean include, Term term) { return bound.isStart() ? new TermSlice(term, include, null, false) : new TermSlice(null, false, term, include); }
@Override public List<ByteBuffer> bounds(Bound bound, QueryOptions options) { MultiCBuilder builder = MultiCBuilder.create(comparator, hasIN()); for (SingleRestriction r : restrictions) { r.appendBoundTo(builder, bound, options); if (builder.hasMissingElements()) return Collections.emptyList(); } return toByteBuffers(builder.buildBound(bound.isStart(), true)); }
@Override public List<ByteBuffer> bounds(Bound bound, QueryOptions options) { MultiCBuilder builder = MultiCBuilder.create(comparator, hasIN()); for (SingleRestriction r : restrictions) { r.appendBoundTo(builder, bound, options); if (builder.hasMissingElements()) return Collections.emptyList(); } return toByteBuffers(builder.buildBound(bound.isStart(), true)); }
@Override public List<ByteBuffer> bounds(Bound bound, QueryOptions options) { MultiCBuilder builder = MultiCBuilder.create(comparator, hasIN()); for (SingleRestriction r : restrictions) { r.appendBoundTo(builder, bound, options); if (builder.hasMissingElements()) return Collections.emptyList(); } return toByteBuffers(builder.buildBound(bound.isStart(), true)); }
public NavigableSet<ClusteringBound> boundsAsClustering(Bound bound, QueryOptions options) throws InvalidRequestException { MultiCBuilder builder = MultiCBuilder.create(comparator, hasIN() || hasMultiColumnSlice()); int keyPosition = 0; for (SingleRestriction r : restrictions) { if (handleInFilter(r, keyPosition)) break; if (r.isSlice()) { r.appendBoundTo(builder, bound, options); return builder.buildBoundForSlice(bound.isStart(), r.isInclusive(bound), r.isInclusive(bound.reverse()), r.getColumnDefs()); } r.appendBoundTo(builder, bound, options); if (builder.hasMissingElements()) return BTreeSet.empty(comparator); keyPosition = r.getLastColumn().position() + 1; } // Everything was an equal (or there was nothing) return builder.buildBound(bound.isStart(), true); }
public NavigableSet<ClusteringBound> boundsAsClustering(Bound bound, QueryOptions options) throws InvalidRequestException { MultiCBuilder builder = MultiCBuilder.create(comparator, hasIN() || hasMultiColumnSlice()); int keyPosition = 0; for (SingleRestriction r : restrictions) { if (handleInFilter(r, keyPosition)) break; if (r.isSlice()) { r.appendBoundTo(builder, bound, options); return builder.buildBoundForSlice(bound.isStart(), r.isInclusive(bound), r.isInclusive(bound.reverse()), r.getColumnDefs()); } r.appendBoundTo(builder, bound, options); if (builder.hasMissingElements()) return BTreeSet.empty(comparator); keyPosition = r.getLastColumn().position() + 1; } // Everything was an equal (or there was nothing) return builder.buildBound(bound.isStart(), true); }
public NavigableSet<ClusteringBound> boundsAsClustering(Bound bound, QueryOptions options) throws InvalidRequestException { MultiCBuilder builder = MultiCBuilder.create(comparator, hasIN() || hasMultiColumnSlice()); int keyPosition = 0; for (SingleRestriction r : restrictions) { if (handleInFilter(r, keyPosition)) break; if (r.isSlice()) { r.appendBoundTo(builder, bound, options); return builder.buildBoundForSlice(bound.isStart(), r.isInclusive(bound), r.isInclusive(bound.reverse()), r.getColumnDefs()); } r.appendBoundTo(builder, bound, options); if (builder.hasMissingElements()) return BTreeSet.empty(comparator); keyPosition = r.getLastColumn().position() + 1; } // Everything was an equal (or there was nothing) return builder.buildBound(bound.isStart(), true); }