name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
querydsl_SQLExpressions_regrR2_rdh
/** * REGR_R2 returns the coefficient of determination (also called R-squared or goodness of fit) for the regression. * * @param arg1 * first arg * @param arg2 * second arg * @return regr_r2(arg1, arg2) */ public static WindowOver<Double> regrR2(Expression<? extends Number> arg1, Expression<? extends Number> arg2) { return new WindowOver<Double>(Double.class, SQLOps.REGR_R2, arg1, arg2); }
3.26
querydsl_SQLExpressions_datediff_rdh
/** * Get a datediff(unit, start, end) expression * * @param unit * date part * @param start * start * @param end * end * @return difference in units */ public static <D extends Comparable> NumberExpression<Integer> datediff(DatePart unit, DateTimeExpression<D> start, D end) { return Expressions.numberOperation(Integer.class, DATE_DIFF_OPS.get(unit), start, ConstantImpl.create(end)); }
3.26
querydsl_SQLExpressions_covarSamp_rdh
/** * CORR returns the coefficient of correlation of a set of number pairs. * * @param expr1 * first arg * @param expr2 * second arg * @return corr(expr1, expr2) */ public static WindowOver<Double> covarSamp(Expression<? extends Number> expr1, Expression<? extends Number> expr2) { return new WindowOver<Double>(Double.class, SQLOps.COVARSAMP, expr1, expr2); }
3.26
querydsl_SQLExpressions_regrSxy_rdh
/** * REGR_SXY makes the following computation after the elimination of null (arg1, arg2) pairs: * * <p>REGR_COUNT(arg1, arg2) * COVAR_POP(arg1, arg2)</p> * * @param arg1 * first arg * @param arg2 * second arg * @return regr_sxy(arg1, arg2) */ public static WindowOver<Double> regrSxy(Expression<? extends Number> arg1, Expression<? extends Number> arg2) { return new WindowOver<Double>(Double.class, SQLOps.REGR_SXY, arg1, arg2); }
3.26
querydsl_SQLExpressions_stddev_rdh
/** * returns the sample standard deviation of expr, a set of numbers. * * @param expr * argument * @return stddev(expr) */ public static <T extends Number> WindowOver<T> stddev(Expression<T> expr) { return new WindowOver<T>(expr.getType(), SQLOps.STDDEV, expr); }
3.26
querydsl_SQLExpressions_corr_rdh
/** * CORR returns the coefficient of correlation of a set of number pairs. * * @param expr1 * first arg * @param expr2 * second arg * @return corr(expr1, expr2) */ public static WindowOver<Double> corr(Expression<? extends Number> expr1, Expression<? extends Number> expr2) { return new WindowOver<Double>(Double.class, SQLOps.CORR, expr1, expr2); }
3.26
querydsl_SQLExpressions_stddevDistinct_rdh
/** * returns the sample standard deviation of expr, a set of numbers. * * @param expr * argument * @return stddev(distinct expr) */ public static <T extends Number> WindowOver<T> stddevDistinct(Expression<T> expr) { return new WindowOver<T>(expr.getType(), SQLOps.STDDEV_DISTINCT, expr); }
3.26
querydsl_SQLExpressions_rank_rdh
/** * As an aggregate function, RANK calculates the rank of a hypothetical row identified by the * arguments of the function with respect to a given sort specification. The arguments of the * function must all evaluate to constant expressions within each aggregate group, because they * identify a single row within each group. The constant argument expressions and the expressions * in the ORDER BY clause of the aggregate match by position. Therefore, the number of arguments * must be the same and their types must be compatible. * * @param args * arguments * @return rank(args) */ public static WithinGroup<Long> rank(Expression<?>... args) { return new WithinGroup<Long>(Long.class, SQLOps.RANK2, args); }
3.26
querydsl_SQLExpressions_regrIntercept_rdh
/** * REGR_INTERCEPT returns the y-intercept of the regression line. * * @param arg1 * first arg * @param arg2 * second arg * @return regr_intercept(arg1, arg2) */ public static WindowOver<Double> regrIntercept(Expression<? extends Number> arg1, Expression<? extends Number> arg2) { return new WindowOver<Double>(Double.class, SQLOps.REGR_INTERCEPT, arg1, arg2); }
3.26
querydsl_SQLExpressions_nextval_rdh
/** * Create a nextval(sequence) expression of the given type * * <p>Returns the next value from the given sequence</p> * * @param type * type of call * @param sequence * sequence name * @return nextval(sequence) */ public static <T extends Number> SimpleExpression<T> nextval(Class<T> type, String sequence) { return Expressions.operation(type, SQLOps.NEXTVAL, ConstantImpl.create(sequence)); }
3.26
querydsl_SQLExpressions_percentileCont_rdh
/** * Calculates a percentile based on a continuous distribution of the column value * * @param arg * argument * @return percentile_cont(arg) */public static <T extends Number> WithinGroup<T> percentileCont(Expression<T> arg) {return new WithinGroup<T>(arg.getType(), SQLOps.PERCENTILECONT, arg); }
3.26
querydsl_SQLExpressions_regrSyy_rdh
/** * REGR_SYY makes the following computation after the elimination of null (arg1, arg2) pairs: * * <p>{@code REGR_COUNT(arg1, arg2) * VAR_POP(arg1)}</p> * * @param arg1 * first arg * @param arg2 * second arg * @return regr_syy(arg1, arg2) */ public static WindowOver<Double> regrSyy(Expression<? extends Number> arg1, Expression<? extends Number> arg2) { return new WindowOver<Double>(Double.class, SQLOps.REGR_SYY, arg1, arg2);}
3.26
querydsl_SQLExpressions_lag_rdh
/** * expr evaluated at the row that is one row before the current row within the partition * * @param expr * expression * @return lag(expr) */ public static <T> WindowOver<T> lag(Expression<T> expr) { return new WindowOver<T>(expr.getType(), SQLOps.LAG, expr); }
3.26
querydsl_SQLExpressions_count_rdh
/** * Start a window function expression * * @param expr * expression * @return count(expr) */ public static WindowOver<Long> count(Expression<?> expr) { return new WindowOver<Long>(Long.class, AggOps.COUNT_AGG, expr); }
3.26
querydsl_SQLExpressions_varSamp_rdh
/** * returns the sample variance of a set of numbers after discarding the nulls in this set. * * @param expr * argument * @return var_samp(expr) */ public static <T extends Number> WindowOver<T> varSamp(Expression<T> expr) { return new WindowOver<T>(expr.getType(), SQLOps.VARSAMP, expr); }
3.26
querydsl_SQLExpressions_stddevPop_rdh
/** * returns the population standard deviation and returns the square root of the population variance. * * @param expr * argument * @return stddev_pop(expr) */ public static <T extends Number> WindowOver<T> stddevPop(Expression<T> expr) { return new WindowOver<T>(expr.getType(), SQLOps.STDDEVPOP, expr); }
3.26
querydsl_SQLExpressions_ntile_rdh
/** * divides an ordered data set into a number of buckets indicated by expr and assigns the * appropriate bucket number to each row * * @param num * bucket size * @return ntile(num) */ @SuppressWarnings("unchecked") public static <T extends Number & Comparable> WindowOver<T> ntile(T num) { return new WindowOver<T>(((Class<T>) (num.getClass())), SQLOps.NTILE, ConstantImpl.create(num)); }
3.26
querydsl_SQLExpressions_max_rdh
/** * Start a window function expression * * @param expr * expression * @return max(expr) */ public static <T extends Comparable> WindowOver<T> max(Expression<T> expr) { return new WindowOver<T>(expr.getType(), AggOps.MAX_AGG, expr); }
3.26
querydsl_SQLExpressions_min_rdh
/** * Start a window function expression * * @param expr * expression * @return min(expr) */ public static <T extends Comparable> WindowOver<T> min(Expression<T> expr) { return new WindowOver<T>(expr.getType(), AggOps.MIN_AGG, expr); }
3.26
querydsl_SQLExpressions_dateadd_rdh
/** * Create a dateadd(unit, date, amount) expression * * @param unit * date part * @param date * date * @param amount * amount * @return converted date */ public static <D extends Comparable> DateExpression<D> dateadd(DatePart unit, DateExpression<D> date, int amount) { return Expressions.dateOperation(date.getType(), DATE_ADD_OPS.get(unit), date, ConstantImpl.create(amount)); }
3.26
querydsl_SQLExpressions_lastValue_rdh
/** * returns value evaluated at the row that is the last row of the window frame * * @param expr * argument * @return last_value(expr) */ public static <T> WindowOver<T> lastValue(Expression<T> expr) { return new WindowOver<T>(expr.getType(), SQLOps.LASTVALUE, expr); }
3.26
querydsl_SQLExpressions_covarPop_rdh
/** * CORR returns the coefficient of correlation of a set of number pairs. * * @param expr1 * first arg * @param expr2 * second arg * @return corr(expr1, expr2) */ public static WindowOver<Double> covarPop(Expression<? extends Number> expr1, Expression<? extends Number> expr2) { return new WindowOver<Double>(Double.class, SQLOps.COVARPOP, expr1, expr2);}
3.26
querydsl_SQLExpressions_left_rdh
/** * Get the rhs leftmost characters of lhs * * @param lhs * string * @param rhs * character amount * @return rhs leftmost characters */ public static StringExpression left(Expression<String> lhs, Expression<Integer> rhs) { return Expressions.stringOperation(StringOps.LEFT, lhs, rhs); }
3.26
querydsl_SQLExpressions_select_rdh
/** * Create a new detached SQLQuery instance with the given projection * * @param exprs * projection * @return select(exprs) */ public static SQLQuery<Tuple> select(Expression<?>... exprs) { return new SQLQuery<Void>().select(exprs); }
3.26
querydsl_SQLExpressions_set_rdh
/** * Create an assignment expression * * @param target * target expression * @param value * value to be set * @param <T> * @return target = value */ public static <T> Expression<T> set(Path<T> target, T value) { if (value != null) {return Expressions.operation(target.getType(), SQLOps.SET_LITERAL, target, Expressions.constant(value)); } else { return Expressions.operation(target.getType(), SQLOps.SET_LITERAL, target, Expressions.nullExpression()); } }
3.26
querydsl_SQLExpressions_regrAvgy_rdh
/** * REGR_AVGY evaluates the average of the dependent variable (arg1) of the regression line. * * @param arg1 * first arg * @param arg2 * second arg * @return regr_avgy(arg1, arg2) */ public static WindowOver<Double> regrAvgy(Expression<? extends Number> arg1, Expression<? extends Number> arg2) { return new WindowOver<Double>(Double.class, SQLOps.REGR_AVGY, arg1, arg2); }
3.26
querydsl_SQLExpressions_denseRank_rdh
/** * As an aggregate function, DENSE_RANK calculates the dense rank of a hypothetical row identified * by the arguments of the function with respect to a given sort specification. The arguments of * the function must all evaluate to constant expressions within each aggregate group, because they * identify a single row within each group. The constant argument expressions and the expressions * in the order_by_clause of the aggregate match by position. Therefore, the number of arguments * must be the same and types must be compatible. * * @param args * arguments * @return dense_rank(args) */public static WithinGroup<Long> denseRank(Expression<?>... args) { return new WithinGroup<Long>(Long.class, SQLOps.DENSERANK2, args); }
3.26
querydsl_SQLExpressions_percentRank_rdh
/** * As an aggregate function, PERCENT_RANK calculates, for a hypothetical row r identified by the * arguments of the function and a corresponding sort specification, the rank of row r minus 1 * divided by the number of rows in the aggregate group. This calculation is made as if the * hypothetical row r were inserted into the group of rows over which Oracle Database is to aggregate. * The arguments of the function identify a single hypothetical row within each aggregate group. * Therefore, they must all evaluate to constant expressions within each aggregate group. The * constant argument expressions and the expressions in the ORDER BY clause of the aggregate match * by position. Therefore the number of arguments must be the same and their types must be compatible. * * @param args * arguments * @return percent_rank(args) */ public static WithinGroup<Double> percentRank(Expression<?>... args) { return new WithinGroup<Double>(Double.class, SQLOps.PERCENTRANK2, args); }
3.26
querydsl_SQLExpressions_datetrunc_rdh
/** * Truncate the given datetime expression * * @param unit * datepart to truncate to * @param expr * truncated datetime */ public static <D extends Comparable> DateTimeExpression<D> datetrunc(DatePart unit, DateTimeExpression<D> expr) { return Expressions.dateTimeOperation(expr.getType(), DATE_TRUNC_OPS.get(unit), expr); }
3.26
querydsl_SQLExpressions_addDays_rdh
/** * Add the given amount of days to the date * * @param date * date * @param days * days to add * @return converted date */ public static <D extends Comparable> DateExpression<D> addDays(DateExpression<D> date, int days) { return Expressions.dateOperation(date.getType(), DateTimeOps.ADD_DAYS, date, ConstantImpl.create(days)); }
3.26
querydsl_SQLExpressions_stddevSamp_rdh
/** * returns the cumulative sample standard deviation and returns the square root of the sample variance. * * @param expr * argument * @return stddev_samp(expr) */ public static <T extends Number> WindowOver<T> stddevSamp(Expression<T> expr) { return new WindowOver<T>(expr.getType(), SQLOps.STDDEVSAMP, expr); }
3.26
querydsl_SQLExpressions_variance_rdh
/** * returns the variance of expr * * @param expr * argument * @return variance(expr) */ public static <T extends Number> WindowOver<T> variance(Expression<T> expr) { return new WindowOver<T>(expr.getType(), SQLOps.VARIANCE, expr); }
3.26
querydsl_SQLExpressions_any_rdh
/** * Get an aggregate any expression for the given boolean expression */ public static BooleanExpression any(BooleanExpression expr) { return Expressions.booleanOperation(AggOps.BOOLEAN_ANY, expr); }
3.26
querydsl_SQLExpressions_m0_rdh
/** * Get a group_concat(expr, separator) expression * * @param expr * expression to be aggregated * @param separator * separator string * @return group_concat(expr, separator) */ public static StringExpression m0(Expression<String> expr, String separator) { return Expressions.stringOperation(SQLOps.GROUP_CONCAT2, expr, Expressions.constant(separator)); }
3.26
querydsl_SQLExpressions_ratioToReport_rdh
/** * computes the ratio of a value to the sum of a set of values. If expr evaluates to null, * then the ratio-to-report value also evaluates to null. * * @return ratio_to_report(expr) */ public static <T> WindowOver<T> ratioToReport(Expression<T> expr) { return new WindowOver<T>(expr.getType(), SQLOps.RATIOTOREPORT, expr); }
3.26
querydsl_SQLExpressions_regrSlope_rdh
/** * REGR_SLOPE returns the slope of the line * * @param arg1 * first arg * @param arg2 * second arg * @return regr_slope(arg1, arg2) */ public static WindowOver<Double> regrSlope(Expression<? extends Number> arg1, Expression<? extends Number> arg2) { return new WindowOver<Double>(Double.class, SQLOps.REGR_SLOPE, arg1, arg2); }
3.26
querydsl_SQLExpressions_relationalFunctionCall_rdh
/** * Create a new RelationalFunctionCall for the given function and arguments * * @param type * type * @param function * function name * @param args * arguments * @param <T> * @return relational function call */ public static <T> RelationalFunctionCall<T> relationalFunctionCall(Class<? extends T> type, String function, Object... args) { return new RelationalFunctionCall<T>(type, function, args); }
3.26
querydsl_SQLExpressions_addWeeks_rdh
/** * Add the given amount of weeks to the date * * @param date * date * @param weeks * weeks to add * @return converted date */ public static <D extends Comparable> DateExpression<D> addWeeks(DateExpression<D> date, int weeks) { return Expressions.dateOperation(date.getType(), DateTimeOps.ADD_WEEKS, date, ConstantImpl.create(weeks)); }
3.26
querydsl_SQLExpressions_addHours_rdh
/** * Add the given amount of hours to the date * * @param date * datetime * @param hours * hours to add * @return converted datetime */ public static <D extends Comparable> DateTimeExpression<D> addHours(DateTimeExpression<D> date, int hours) { return Expressions.dateTimeOperation(date.getType(), DateTimeOps.ADD_HOURS, date, ConstantImpl.create(hours)); }
3.26
querydsl_SQLExpressions_percentileDisc_rdh
/** * PERCENTILE_DISC is an inverse distribution function that assumes a discrete distribution model. * It takes a percentile value and a sort specification and returns an element from the set. * Nulls are ignored in the calculation. * * <p>This function takes as an argument any numeric datatype or any nonnumeric datatype that can be * implicitly converted to a numeric datatype. The function returns the same datatype as the numeric * datatype of the argument.</p> * * @param arg * argument * @return percentile_disc(arg) */ public static <T extends Number> WithinGroup<T> percentileDisc(Expression<T> arg) { return new WithinGroup<T>(arg.getType(), SQLOps.PERCENTILEDISC, arg); }
3.26
querydsl_SQLExpressions_union_rdh
/** * Create a new UNION clause * * @param sq * subqueries * @param <T> * @return union */ public static <T> Union<T> union(SubQueryExpression<T>... sq) { return new SQLQuery<Void>().union(sq); }
3.26
querydsl_SQLExpressions_all_rdh
/** * Get an aggregate all expression for the given boolean expression */ public static BooleanExpression all(BooleanExpression expr) { return Expressions.booleanOperation(AggOps.BOOLEAN_ALL, expr); }
3.26
querydsl_SQLExpressions_selectFrom_rdh
/** * Create a new detached SQLQuery instance with the given projection * * @param expr * query source and projection * @param <T> * @return select(expr).from(expr) */ public static <T> SQLQuery<T> selectFrom(RelationalPath<T> expr) { return select(expr).from(expr); }
3.26
querydsl_SQLExpressions_addSeconds_rdh
/** * Add the given amount of seconds to the date * * @param date * datetime * @param seconds * seconds to add * @return converted datetime */ public static <D extends Comparable> DateTimeExpression<D> addSeconds(DateTimeExpression<D> date, int seconds) { return Expressions.dateTimeOperation(date.getType(), DateTimeOps.ADD_SECONDS, date, ConstantImpl.create(seconds)); }
3.26
querydsl_SQLExpressions_addMonths_rdh
/** * Add the given amount of months to the date * * @param date * date * @param months * months to add * @return converted date */ public static <D extends Comparable> DateExpression<D> addMonths(DateExpression<D> date, int months) { return Expressions.dateOperation(date.getType(), DateTimeOps.ADD_MONTHS, date, ConstantImpl.create(months)); }
3.26
querydsl_SQLExpressions_addYears_rdh
/** * Add the given amount of years to the date * * @param date * date * @param years * years to add * @return converted date */ public static <D extends Comparable> DateExpression<D> addYears(DateExpression<D> date, int years) { return Expressions.dateOperation(date.getType(), DateTimeOps.ADD_YEARS, date, ConstantImpl.create(years)); }
3.26
querydsl_SQLExpressions_right_rdh
/** * Get the rhs leftmost characters of lhs * * @param lhs * string * @param rhs * character amount * @return rhs rightmost characters */ public static StringExpression right(Expression<String> lhs, Expression<Integer> rhs) { return Expressions.stringOperation(StringOps.RIGHT, lhs, rhs); }
3.26
querydsl_SQLExpressions_listagg_rdh
/** * LISTAGG orders data within each group specified in the ORDER BY clause and then concatenates * the values of the measure column. * * @param expr * measure column * @param delimiter * delimiter * @return listagg(expr, delimiter) */public static WithinGroup<String> listagg(Expression<?> expr, String delimiter) { return new WithinGroup<String>(String.class, SQLOps.LISTAGG, expr, ConstantImpl.create(delimiter)); }
3.26
querydsl_SQLExpressions_countDistinct_rdh
/** * Start a window function expression * * @param expr * expression * @return count(distinct expr) */ public static WindowOver<Long> countDistinct(Expression<?> expr) { return new WindowOver<Long>(Long.class, AggOps.COUNT_DISTINCT_AGG, expr); }
3.26
querydsl_SQLExpressions_cumeDist_rdh
/** * As an aggregate function, CUME_DIST calculates, for a hypothetical row r identified by the * arguments of the function and a corresponding sort specification, the relative position of row * r among the rows in the aggregation group. Oracle makes this calculation as if the hypothetical * row r were inserted into the group of rows to be aggregated over. The arguments of the function * identify a single hypothetical row within each aggregate group. Therefore, they must all * evaluate to constant expressions within each aggregate group. The constant argument expressions * and the expressions in the ORDER BY clause of the aggregate match by position. Therefore, * the number of arguments must be the same and their types must be compatible. * * @param args * arguments * @return cume_dist(args) */ public static WithinGroup<Double> cumeDist(Expression<?>... args) { return new WithinGroup<Double>(Double.class, SQLOps.CUMEDIST2, args); }
3.26
querydsl_SQLExpressions_regrAvgx_rdh
/** * REGR_AVGX evaluates the average of the independent variable (arg2) of the regression line. * * @param arg1 * first arg * @param arg2 * second arg * @return regr_avgx(arg1, arg2) */ public static WindowOver<Double> regrAvgx(Expression<? extends Number> arg1, Expression<? extends Number> arg2) {return new WindowOver<Double>(Double.class, SQLOps.REGR_AVGX, arg1, arg2); }
3.26
querydsl_Alias_alias_rdh
/** * Create a new alias proxy of the given type for the given variable * * @param cl * type of the alias * @param var * variable name for the underlying expression * @return alias instance */ public static <A> A alias(Class<A> cl, String var) { return aliasFactory.createAliasForVariable(cl, var); }
3.26
querydsl_Alias_resetAlias_rdh
/** * Reset the alias */ public static void resetAlias() { aliasFactory.reset(); }
3.26
querydsl_Alias_var_rdh
/** * Create a new variable path * * @param arg * alias * @return expression */ public static StringPath var(String arg) { return Expressions.stringPath(arg.replace(' ', '_')); }
3.26
querydsl_Alias_getAny_rdh
/** * Convert the given alias to an expression * * @param <D> * @param arg * alias instance * @return underlying expression */ @SuppressWarnings("unchecked") public static <D> Expression<D> getAny(D arg) { Object current = aliasFactory.getCurrentAndReset();if (arg instanceof ManagedObject) { return ((Expression<D>) (((ManagedObject) (arg)).__mappedPath())); } else if (current != null) { return ((Expression<D>) (current)); } else { throw new IllegalArgumentException("No path mapped to " + arg); } }
3.26
querydsl_Alias_$_rdh
/** * Convert the given alias to an expression * * @param arg * alias * @param <D> * @return expression */ @SuppressWarnings("unchecked") @Nullable public static <D> EntityPathBase<D> $(D arg) { final Object current = aliasFactory.getCurrentAndReset(); if (arg instanceof EntityPath<?>) {return ((EntityPathBase<D>) (arg));// NOSONAR } else if (arg instanceof ManagedObject) { return ((EntityPathBase<D>) (((ManagedObject) (arg)).__mappedPath())); } else { return ((EntityPathBase<D>) (current)); } }
3.26
querydsl_AbstractLuceneQuery_load_rdh
/** * Set the given FieldSelector to the query * * @param fieldSelector * field selector * @return the current object */ @SuppressWarnings("unchecked") public Q load(FieldSelector fieldSelector) { this.fieldSelector = fieldSelector; return ((Q) (this)); }
3.26
querydsl_AbstractLuceneQuery_distinct_rdh
/** * Add a DuplicateFilter for the field of the given property path * * @param property * distinct property * @return the current object */public Q distinct(Path<?> property) { return filter(new DuplicateFilter(serializer.toField(property)));}
3.26
querydsl_AbstractLuceneQuery_filter_rdh
/** * Apply the given Lucene filter to the search results * * @param filter * filter * @return the current object */ @SuppressWarnings("unchecked") public Q filter(Filter filter) { if (filters.isEmpty()) { this.filter = filter; filters = Collections.singletonList(filter); } else { this.filter = null; if (filters.size() == 1) { filters = new ArrayList<Filter>(); } filters.add(filter); } return ((Q) (this)); }
3.26
querydsl_ComparableExpressionBase_asc_rdh
/** * Create an OrderSpecifier for ascending order of this expression * * @return ascending order by this */ public OrderSpecifier<T> asc() {if (asc == null) { asc = new OrderSpecifier<T>(Order.ASC, mixin); } return asc; }
3.26
querydsl_ComparableExpressionBase_coalesce_rdh
/** * Create a {@code coalesce(this, args...)} expression * * @param args * additional arguments * @return coalesce */ @SuppressWarnings("unchecked") public ComparableExpressionBase<T> coalesce(T... args) { Coalesce<T> coalesce = new Coalesce<T>(getType(), mixin); for (T arg : args) { coalesce.add(arg); } return coalesce.getValue(); }
3.26
querydsl_ComparableExpressionBase_max_rdh
/** * Create a {@code max(this)} expression * * <p>Get the maximum value of this expression (aggregation)</p> * * @return max(this) */ public ComparableExpressionBase<T> max() { return Expressions.comparableOperation(getType(), AggOps.MAX_AGG, mixin); }
3.26
querydsl_ComparableExpressionBase_min_rdh
/** * Create a {@code min(this)} expression * * <p>Get the minimum value of this expression (aggregation)</p> * * @return min(this) */ public ComparableExpressionBase<T> min() { return Expressions.comparableOperation(getType(), AggOps.MIN_AGG, mixin); }
3.26
querydsl_DefaultEvaluatorFactory_create_rdh
/** * Create an Evaluator for the given query sources and projection * * @param <T> * @param metadata * query metadata * @param sources * sources of the query * @param projection * projection of the query * @return evaluator */ public <T> Evaluator<T> create(QueryMetadata metadata, List<? extends Expression<?>> sources, Expression<T> projection) { final CollQuerySerializer serializer = new CollQuerySerializer(templates); serializer.append("return ");if (projection instanceof FactoryExpression<?>) { serializer.append("("); serializer.append(ClassUtils.getName(projection.getType())); serializer.append(")("); serializer.handle(projection); serializer.append(")"); } else {serializer.handle(projection); } serializer.append(";"); Map<Object, String> v2 = serializer.getConstantToLabel(); Map<String, Object> constants = getConstants(metadata, v2); Class<?>[] types = new Class<?>[sources.size()]; String[] v5 = new String[sources.size()]; for (int i = 0; i < sources.size(); i++) { types[i] = sources.get(i).getType(); v5[i] = sources.get(i).toString(); } // normalize types for (int i = 0; i < types.length; i++) { if (PrimitiveUtils.isWrapperType(types[i])) { types[i] = PrimitiveUtils.unwrap(types[i]); } } return factory.createEvaluator(serializer.toString(), projection.getType(), v5, types, constants); }
3.26
querydsl_DefaultEvaluatorFactory_createEvaluator_rdh
/** * Create an Evaluator for the given sources and the given optional filter * * @param metadata * query metadata * @param joins * joins * @param filter * where condition * @return evaluator */ public Evaluator<List<Object[]>> createEvaluator(QueryMetadata metadata, List<JoinExpression> joins, @Nullable Predicate filter) { List<String> sourceNames = new ArrayList<String>(); List<Type> sourceTypes = new ArrayList<Type>(); List<Class<?>> sourceClasses = new ArrayList<Class<?>>(); StringBuilder vars = new StringBuilder(); CollQuerySerializer ser = new CollQuerySerializer(templates); ser.append("java.util.List<Object[]> rv = new java.util.ArrayList<Object[]>();\n"); List<String> anyJoinMatchers = new ArrayList<String>(); // creating context for (JoinExpression join : joins) { Expression<?> target = join.getTarget(); String typeName = support.ClassUtils.getName(target.getType()); if (vars.length() > 0) { vars.append(","); } switch (join.getType()) {case DEFAULT : ser.append(((((("for (" + typeName) + " ") + target) + " : ") + target) + "_) {\n"); vars.append(target); sourceNames.add(target + "_"); sourceTypes.add(new SimpleType(Types.ITERABLE, new ClassType(TypeCategory.SIMPLE, target.getType()))); sourceClasses.add(Iterable.class); break; case INNERJOIN : case LEFTJOIN : Operation<?> alias = ((Operation<?>) (join.getTarget()));boolean colAnyJoin = (join.getCondition() != null) && join.getCondition().toString().equals("any"); boolean leftJoin = join.getType() == JoinType.LEFTJOIN; String matcher = null; if (colAnyJoin) { matcher = alias.getArg(1).toString() + "_matched"; ser.append(("boolean " + matcher) + " = false;\n"); anyJoinMatchers.add(matcher); } ser.append(((("for (" + typeName) + " ") + alias.getArg(1)) + " : "); if (leftJoin) { ser.append(CollQueryFunctions.class.getName() + ".leftJoin("); } if (colAnyJoin) { Context context = new Context(); Expression<?> replacement = alias.getArg(0).accept(collectionAnyVisitor, context); ser.handle(replacement); } else { ser.handle(alias.getArg(0)); } if (alias.getArg(0).getType().equals(Map.class)) { ser.append(".values()"); } if (leftJoin) { ser.append(")"); } ser.append(") {\n"); if (matcher != null) { ser.append(("if (!" + matcher) + ") {\n"); } vars.append(alias.getArg(1)); break; default : throw new IllegalArgumentException("Illegal join expression " + join); } } // filter if (filter != null) { ser.append("try {\n"); ser.append("if ("); ser.handle(filter).append(") {\n"); for (String matcher : anyJoinMatchers) { ser.append((" " + matcher) + " = true;\n"); } ser.append((" rv.add(new Object[]{" + vars) + "});\n"); ser.append("}\n"); ser.append("} catch (NullPointerException npe) { }\n"); } else { ser.append(("rv.add(new Object[]{" + vars) + "});\n"); } // closing context int amount = joins.size() + anyJoinMatchers.size(); for (int i = 0; i < amount; i++) { ser.append("}
3.26
querydsl_Expressions_asTime_rdh
/** * Create a new TimeExpression * * @param value * the time * @return new TimeExpression */ public static <T extends Comparable<?>> TimeExpression<T> asTime(T value) { return asTime(constant(value)); }
3.26
querydsl_Expressions_asDateTime_rdh
/** * Create a new DateTimeExpression * * @param value * the date time * @return new DateTimeExpression */ public static <T extends Comparable<?>> DateTimeExpression<T> asDateTime(T value) { return asDateTime(constant(value)); }
3.26
querydsl_Expressions_list_rdh
/** * Combine the given expressions into a list expression * * @param exprs * list elements * @return list expression */ public static Expression<Tuple> list(Expression<?>... exprs) { return list(Tuple.class, exprs); }
3.26
querydsl_Expressions_timePath_rdh
/** * Create a new Path expression * * @param type * type of expression * @param metadata * path metadata * @param <T> * type of expression * @return path expression */ public static <T extends Comparable<?>> TimePath<T> timePath(Class<? extends T> type, PathMetadata metadata) { return new TimePath<T>(type, metadata); }
3.26
querydsl_Expressions_simplePath_rdh
/** * Create a new Path expression * * @param type * type of expression * @param metadata * path metadata * @param <T> * type of expression * @return path expression */ public static <T> SimplePath<T> simplePath(Class<? extends T> type, PathMetadata metadata) { return new SimplePath<T>(type, metadata); }
3.26
querydsl_Expressions_path_rdh
/** * Create a new Path expression * * @param type * type of expression * @param metadata * path metadata * @param <T> * type of expression * @return path expression */ public static <T> SimplePath<T> path(Class<? extends T> type, PathMetadata metadata) { return simplePath(type, metadata); }
3.26
querydsl_Expressions_collectionPath_rdh
/** * Create a new Path expression * * @param type * element type * @param queryType * element expression type * @param metadata * path metadata * @param <E> * element type * @param <Q> * element expression type * @return path expression */ public static <E, Q extends SimpleExpression<? super E>> CollectionPath<E, Q> collectionPath(Class<E> type, Class<Q> queryType, PathMetadata metadata) { return new CollectionPath<E, Q>(type, queryType, metadata); }
3.26
querydsl_Expressions_comparableTemplate_rdh
/** * Create a new Template expression * * @param cl * type of expression * @param template * template * @param args * template parameters * @return template expression */ public static <T extends Comparable<?>> ComparableTemplate<T> comparableTemplate(Class<? extends T> cl, Template template, List<?> args) { return new ComparableTemplate<T>(cl, template, args); }
3.26
querydsl_Expressions_dateTimePath_rdh
/** * Create a new Path expression * * @param type * type of expression * @param metadata * path metadata * @param <T> * type of expression * @return path expression */ public static <T extends Comparable<?>> DateTimePath<T> dateTimePath(Class<? extends T> type, PathMetadata metadata) { return new DateTimePath<T>(type, metadata); }
3.26
querydsl_Expressions_stringOperation_rdh
/** * Create a new Operation expression * * @param operator * operator * @param args * operation arguments * @return operation expression */ public static StringOperation stringOperation(Operator operator, Expression<?>... args) { return new StringOperation(operator, args); }
3.26
querydsl_Expressions_timeTemplate_rdh
/** * Create a new Template expression * * @param cl * type of expression * @param template * template * @param args * template parameters * @return template expression */ public static <T extends Comparable<?>> TimeTemplate<T> timeTemplate(Class<? extends T> cl, Template template, List<?> args) { return new TimeTemplate<T>(cl, template, args); }
3.26
querydsl_Expressions_asNumber_rdh
/** * Create a new NumberExpression * * @param value * Number * @return new NumberExpression */ public static <T extends Number & Comparable<?>> NumberExpression<T> asNumber(T value) { return asNumber(constant(value)); }
3.26
querydsl_Expressions_m3_rdh
/** * Create a new Path expression * * @param type * type of expression * @param metadata * path metadata * @param <T> * type of expression * @return new path instance */public static <T extends Comparable<?>> DatePath<T> m3(Class<? extends T> type, PathMetadata metadata) { return new DatePath<T>(type, metadata); }
3.26
querydsl_Expressions_stringPath_rdh
/** * Create a new Path expression * * @param parent * parent path * @param property * property name * @return property path */ public static StringPath stringPath(Path<?> parent, String property) { return new StringPath(PathMetadataFactory.forProperty(parent, property)); }
3.26
querydsl_Expressions_asBoolean_rdh
/** * Create a new BooleanExpression * * @param value * boolean * @return new BooleanExpression */ public static BooleanExpression asBoolean(boolean value) { return asBoolean(constant(value)); }
3.26
querydsl_Expressions_m6_rdh
/** * Create a new SimpleExpression * * @param expr * expression * @return new SimpleExpression */ public static <T> SimpleExpression<T> m6(Expression<T> expr) { Expression<T> underlyingMixin = ExpressionUtils.extract(expr);if (underlyingMixin instanceof PathImpl) { return new SimplePath<T>(((PathImpl<T>) (underlyingMixin))); } else if (underlyingMixin instanceof OperationImpl) { return new SimpleOperation<T>(((OperationImpl<T>) (underlyingMixin))); } else if (underlyingMixin instanceof TemplateExpressionImpl) { return new SimpleTemplate<T>(((TemplateExpressionImpl<T>) (underlyingMixin))); } else { return new SimpleExpression<T>(underlyingMixin) { private static final long serialVersionUID = -8712299418891960222L; @Override public <R, C> R accept(Visitor<R, C> v, C context) { return this.mixin.accept(v, context); } }; } }
3.26
querydsl_Expressions_dslTemplate_rdh
/** * Create a new Template expression * * @param cl * type of expression * @param template * template * @param args * template parameters * @return template expression */ public static <T> DslTemplate<T> dslTemplate(Class<? extends T> cl, Template template, List<?> args) { return new DslTemplate<T>(cl, template, args); }
3.26
querydsl_Expressions_collectionOperation_rdh
/** * Create a new Collection operation expression * * @param elementType * element type * @param operator * operator * @param args * operation arguments * @param <T> * type of expression * @return operation expression */ public static <T> CollectionExpression<Collection<T>, T> collectionOperation(Class<T> elementType, Operator operator, Expression<?>... args) { return new CollectionOperation<T>(elementType, operator, args); }
3.26
querydsl_Expressions_predicate_rdh
/** * Create a new Predicate operation * * @param operator * operator * @param args * operation arguments * @return operation expression */ public static BooleanOperation predicate(Operator operator, Expression<?>... args) { return new BooleanOperation(operator, args); }
3.26
querydsl_Expressions_m2_rdh
/** * Create a new Path expression * * @param type * type of expression * @param variable * variable name * @return path expression */ public static <T extends Comparable<?>> ComparablePath<T> m2(Class<? extends T> type, String variable) { return new ComparablePath<T>(type, PathMetadataFactory.forVariable(variable)); }
3.26
querydsl_Expressions_enumOperation_rdh
/** * Create a new Enum operation expression * * @param type * type of expression * @param operator * operator * @param args * operation arguments * @param <T> * type of expression * @return operation expression */ public static <T extends Enum<T>> EnumOperation<T> enumOperation(Class<? extends T> type, Operator operator, Expression<?>... args) { return new EnumOperation<T>(type, operator, args); }
3.26
querydsl_Expressions_numberOperation_rdh
/** * Create a new Operation expression * * @param type * type of expression * @param operator * operator * @param args * operation arguments * @return operation expression */ public static <T extends Number & Comparable<?>> NumberOperation<T> numberOperation(Class<? extends T> type, Operator operator, Expression<?>... args) { return new NumberOperation<T>(type, operator, args); }
3.26
querydsl_Expressions_asComparable_rdh
/** * Create a new ComparableExpression * * @param value * Comparable * @return new ComparableExpression */ public static <T extends Comparable<?>> ComparableExpression<T> asComparable(T value) { return asComparable(constant(value)); }
3.26
querydsl_Expressions_constantAs_rdh
/** * Create a {@code source as alias} expression * * @param source * source * @param alias * alias * @return source as alias */ @SuppressWarnings({ "unchecked", "rawtypes" }) public static <D> SimpleExpression<D> constantAs(D source, Path<D> alias) { if (source == null) { return as(((Expression) (nullExpression())), alias);} else {return as(ConstantImpl.create(source), alias); } }
3.26
querydsl_Expressions_anyOf_rdh
/** * Get the union of the given Boolean expressions * * @param exprs * predicates * @return union of predicates */ public static BooleanExpression anyOf(BooleanExpression... exprs) { BooleanExpression rv = null; for (BooleanExpression b : exprs) { rv = (rv == null) ? b : rv.or(b); } return rv; }
3.26
querydsl_Expressions_comparableEntityPath_rdh
/** * Create a new Path expression * * @param type * type of expression * @param metadata * path metadata * @param <T> * type of expression * @return path expression */ public static <T extends Comparable<?>> ComparableEntityPath<T> comparableEntityPath(Class<? extends T> type, PathMetadata metadata) { return new ComparableEntityPath<T>(type, metadata); }
3.26
querydsl_Expressions_booleanOperation_rdh
/** * Create a new Boolean operation * * @param operator * operator * @param args * operation arguments * @return operation expression */ public static BooleanOperation booleanOperation(Operator operator, Expression<?>... args) { return predicate(operator, args); }
3.26
querydsl_Expressions_listPath_rdh
/** * Create a new Path expression * * @param type * element type * @param queryType * element expression type * @param metadata * path metadata * @param <E> * element type * @param <Q> * element expression type * @return path expression */ public static <E, Q extends SimpleExpression<? super E>> ListPath<E, Q> listPath(Class<E> type, Class<Q> queryType, PathMetadata metadata) { return new ListPath<E, Q>(type, queryType, metadata); }
3.26
querydsl_Expressions_allOf_rdh
/** * Get the intersection of the given Boolean expressions * * @param exprs * predicates * @return intersection of predicates */ public static BooleanExpression allOf(BooleanExpression... exprs) { BooleanExpression rv = null; for (BooleanExpression b : exprs) { rv = (rv == null) ? b : rv.and(b); } return rv; }
3.26
querydsl_Expressions_setPath_rdh
/** * Create a new Path expression * * @param type * element type * @param queryType * element expression type * @param metadata * path metadata * @param <E> * element type * @param <Q> * element expression type * @return path expression */ public static <E, Q extends SimpleExpression<? super E>> SetPath<E, Q> setPath(Class<E> type, Class<Q> queryType, PathMetadata metadata) { return new SetPath<E, Q>(type, queryType, metadata); }
3.26
querydsl_Expressions_dslPath_rdh
/** * Create a new Path expression * * @param type * type of expression * @param metadata * path metadata * @param <T> * type of expression * @return path expression */ public static <T> DslPath<T> dslPath(Class<? extends T> type, PathMetadata metadata) { return new DslPath<T>(type, metadata); }
3.26
querydsl_Expressions_dateTemplate_rdh
/** * Create a new Template expression * * @param cl * type of expression * @param template * template * @param args * template parameters * @return template expression */ public static <T extends Comparable<?>> DateTemplate<T> dateTemplate(Class<? extends T> cl, Template template, List<?> args) { return new DateTemplate<T>(cl, template, args); }
3.26
querydsl_Expressions_m0_rdh
/** * Create a new Template expression * * @param cl * type of expression * @param template * template * @param args * template parameters * @return template expression */ public static <T extends Comparable<?>> DateTemplate<T> m0(Class<? extends T> cl, Template template, Object... args) { return m0(cl, template, Arrays.asList(args)); }
3.26
querydsl_Expressions_dateTimeTemplate_rdh
/** * Create a new Template expression * * @param cl * type of expression * @param template * template * @param args * template parameters * @return template expression */ public static <T extends Comparable<?>> DateTimeTemplate<T> dateTimeTemplate(Class<? extends T> cl, Template template, List<?> args) { return new DateTimeTemplate<T>(cl, template, args); }
3.26
querydsl_Expressions_asString_rdh
/** * Create a new StringExpression * * @param value * String * @return new StringExpression */ public static StringExpression asString(String value) { return asString(constant(value)); }
3.26