/** * Get a new instance of this filter with the given ExtractionFunction. * * @param extractionFunction ExtractionFunction of the new filter. * * @return a new instance of this filter with the given extraction function */ public ExtractionFilter withExtractionFunction(ExtractionFunction extractionFunction) { return new ExtractionFilter(getDimension(), value, extractionFunction); }
/** * Returns a BoundFilter with upper bound value specified. * * @param dimension The druid dimension to be filtered * @param value The bound value to be used * @param inclusive A boolean that indicates whether to include the bounds or not * * @return BoundFilter with upper bound */ public static BoundFilter buildUpperBoundFilter(Dimension dimension, String value, Boolean inclusive) { return new BoundFilter(dimension, null, value, null, !inclusive, null); }
/** * Get a new instance of this filter with the given value. * * @param value Value of the new filter. * * @return a new instance of this filter with the given value */ public SelectorFilter withValue(String value) { return new SelectorFilter(getDimension(), value, getExtractionFunction()); }
public BoundFilter withOrdering(Ordering ordering) { return new BoundFilter(getDimension(), getLower(), getUpper(), isLowerStrict(), isUpperStrict(), ordering); } //CHECKSTYLE:ON
@Override public BoundFilter withDimension(Dimension dimension) { return new BoundFilter(dimension, getLower(), getUpper(), isLowerStrict(), isUpperStrict(), getOrdering()); }
public BoundFilter withUpperBound(String upper) { return new BoundFilter(getDimension(), getLower(), upper, isLowerStrict(), isUpperStrict(), getOrdering()); }
@Override public String toString() { return "Filter{ type=" + getType() + ", dimension=" + getDimension() + ", value=" + getValues() + "}"; } }
@Override public String toString() { return "Filter{ type=" + getType() + ", dimension=" + getDimension() + ", value=" + getValue() + "}"; } }
public SearchFilter withValue(String value) { return new SearchFilter(getDimension(), getQueryType(), value); } // CHECKSTYLE:ON
/** * Get a new instance of this filter with the given value. * * @param extractionFn Extraction function to be applied on dimension * * @return a new instance of this filter with the given value */ public SelectorFilter withExtractionFn(ExtractionFunction extractionFn) { return new SelectorFilter(getDimension(), value, extractionFn); }
/** * Get a new instance of this filter with the given value. * * @param value Value of the new filter. * * @return a new instance of this filter with the given value */ public ExtractionFilter withValue(String value) { return new ExtractionFilter(getDimension(), value, getExtractionFunction()); }
/** * Get a new instance of this filter with the given pattern. * * @param pattern Pattern of the new filter * * @return a new instance of this filter with the given pattern */ public RegularExpressionFilter withPattern(Pattern pattern) { return new RegularExpressionFilter(getDimension(), pattern); }
public InFilter withValues(List<String> values) { return new InFilter(getDimension(), values); } //CHECKSTYLE:ON
@Override public OrFilter withFields(List<Filter> fields) { return new OrFilter(fields); } }
@Override public ExtractionFilter withDimension(Dimension dimension) { return new ExtractionFilter(dimension, value, getExtractionFunction()); }
/** * Get a new instance of this filter with the given field. * * @param field Field of the new filter. * * @return a new instance of this filter with the given field */ public Filter withField(Filter field) { return new NotFilter(field); }
@Override public AndFilter withFields(List<Filter> fields) { return new AndFilter(fields); } }
@Override public RegularExpressionFilter withDimension(Dimension dimension) { return new RegularExpressionFilter(dimension, pattern); }
/** * Returns a BoundFilter with lower bound value specified. * * @param dimension The druid dimension to be filtered * @param value The bound value to be used * @param inclusive A boolean that indicates whether to include the bounds or not * * @return BoundFilter with lower bound */ public static BoundFilter buildLowerBoundFilter(Dimension dimension, String value, Boolean inclusive) { return new BoundFilter(dimension, value, null, !inclusive, null, null); }