private boolean hasMultiColumnSlice() { for (SingleRestriction restriction : restrictions) { if (restriction.isMultiColumn() && restriction.isSlice()) return true; } return false; }
private boolean hasMultiColumnSlice() { for (SingleRestriction restriction : restrictions) { if (restriction.isMultiColumn() && restriction.isSlice()) return true; } return false; }
private boolean hasMultiColumnSlice() { for (SingleRestriction restriction : restrictions) { if (restriction.isMultiColumn() && restriction.isSlice()) return true; } return false; }
/** * Adds the specified restriction to this set of restrictions. * * @param restriction the restriction to add * @return the new set of restrictions */ public RestrictionSet addRestriction(SingleRestriction restriction) { // RestrictionSet is immutable so we need to clone the restrictions map. TreeMap<ColumnDefinition, SingleRestriction> newRestrictions = new TreeMap<>(this.restrictions); return new RestrictionSet(mergeRestrictions(newRestrictions, restriction), hasMultiColumnRestrictions || restriction.isMultiColumn()); }
/** * Adds the specified restriction to this set of restrictions. * * @param restriction the restriction to add * @return the new set of restrictions */ public RestrictionSet addRestriction(SingleRestriction restriction) { // RestrictionSet is immutable so we need to clone the restrictions map. TreeMap<ColumnDefinition, SingleRestriction> newRestrictions = new TreeMap<>(this.restrictions); return new RestrictionSet(mergeRestrictions(newRestrictions, restriction), hasMultiColumnRestrictions || restriction.isMultiColumn()); }
/** * Adds the specified restriction to this set of restrictions. * * @param restriction the restriction to add * @return the new set of restrictions */ public RestrictionSet addRestriction(SingleRestriction restriction) { // RestrictionSet is immutable so we need to clone the restrictions map. TreeMap<ColumnDefinition, SingleRestriction> newRestrictions = new TreeMap<>(this.restrictions); return new RestrictionSet(mergeRestrictions(newRestrictions, restriction), hasMultiColumnRestrictions || restriction.isMultiColumn()); }
@Override public final SingleRestriction mergeWith(SingleRestriction otherRestriction) { // We want to allow query like: b > ? AND (b,c) < (?, ?) if (otherRestriction.isMultiColumn() && canBeConvertedToMultiColumnRestriction()) { return toMultiColumnRestriction().mergeWith(otherRestriction); } return doMergeWith(otherRestriction); }
@Override public final SingleRestriction mergeWith(SingleRestriction otherRestriction) { // We want to allow query like: b > ? AND (b,c) < (?, ?) if (otherRestriction.isMultiColumn() && canBeConvertedToMultiColumnRestriction()) { return toMultiColumnRestriction().mergeWith(otherRestriction); } return doMergeWith(otherRestriction); }
@Override public final SingleRestriction mergeWith(SingleRestriction otherRestriction) { // We want to allow query like: (b,c) > (?, ?) AND b < ? if (!otherRestriction.isMultiColumn() && ((SingleColumnRestriction) otherRestriction).canBeConvertedToMultiColumnRestriction()) { return doMergeWith(((SingleColumnRestriction) otherRestriction).toMultiColumnRestriction()); } return doMergeWith(otherRestriction); }
@Override public final SingleRestriction mergeWith(SingleRestriction otherRestriction) { // We want to allow query like: b > ? AND (b,c) < (?, ?) if (otherRestriction.isMultiColumn() && canBeConvertedToMultiColumnRestriction()) { return toMultiColumnRestriction().mergeWith(otherRestriction); } return doMergeWith(otherRestriction); }
@Override public final SingleRestriction mergeWith(SingleRestriction otherRestriction) { // We want to allow query like: (b,c) > (?, ?) AND b < ? if (!otherRestriction.isMultiColumn() && ((SingleColumnRestriction) otherRestriction).canBeConvertedToMultiColumnRestriction()) { return doMergeWith(((SingleColumnRestriction) otherRestriction).toMultiColumnRestriction()); } return doMergeWith(otherRestriction); }
@Override public final SingleRestriction mergeWith(SingleRestriction otherRestriction) { // We want to allow query like: (b,c) > (?, ?) AND b < ? if (!otherRestriction.isMultiColumn() && ((SingleColumnRestriction) otherRestriction).canBeConvertedToMultiColumnRestriction()) { return doMergeWith(((SingleColumnRestriction) otherRestriction).toMultiColumnRestriction()); } return doMergeWith(otherRestriction); }