name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
querydsl_ExpressionUtils_toExpression_rdh
/** * Converts the given object to an Expression * * <p>Casts expressions and wraps everything else into co</p> * * @param o * object to convert * @return converted argument */ public static Expression<?> toExpression(Object o) { if (o instanceof Expression) { return ((Expression<?>) (o));} else { return ConstantImpl.create(o); } }
3.26
querydsl_ExpressionUtils_any_rdh
/** * Create a {@code any col} expression * * @param col * subquery expression * @return any col */ @SuppressWarnings("unchecked") public static <T> Expression<T> any(SubQueryExpression<? extends T> col) {return new OperationImpl<T>(col.getType(), QuantOps.ANY, Collections.singletonList(col)); }
3.26
querydsl_ExpressionUtils_extract_rdh
/** * Get the potentially wrapped expression * * @param expr * expression to analyze * @return inner expression */ @SuppressWarnings("unchecked") public static <T> Expression<T> extract(Expression<T> expr) { if (expr != null) { final Class<?> clazz = expr.getClass(); if (((clazz == PathImpl.class) || (clazz == PredicateOperation.class)) || (clazz == ConstantImpl.class)) { return expr; } else { return ((Expression<T>) (expr.accept(ExtractorVisitor.DEFAULT, null))); } } else { return null; } }
3.26
querydsl_ExpressionUtils_and_rdh
/** * Create the intersection of the given arguments * * @param left * lhs of expression * @param right * rhs of expression * @return left and right */ public static Predicate and(Predicate left, Predicate right) { left = ((Predicate) (extract(left))); right = ((Predicate) (extract(right))); if (left == null) { return right; } else if (right == null) { return left; } else { return predicate(Ops.AND, left, right); } }
3.26
querydsl_ExpressionUtils_operation_rdh
/** * Create a new Operation expression * * @param type * type of expression * @param operator * operator * @param args * operation arguments * @return operation expression */ @SuppressWarnings("unchecked") public static <T> Operation<T> operation(Class<? extends T> type, Operator operator, List<Expression<?>> args) { if (type.equals(Boolean.class)) { return ((Operation<T>) (new PredicateOperation(operator, args))); } else { return new OperationImpl<T>(type, operator, args); } }
3.26
querydsl_ExpressionUtils_in_rdh
/** * Create a {@code left in right} expression * * @param <D> * element type * @param left * lhs of expression * @param right * rhs of expression * @return left in right */ public static <D> Predicate in(Expression<D> left, Collection<? extends D> right) { if (right.size() == 1) { return eqConst(left, right.iterator().next()); } else { return predicate(Ops.IN, left, ConstantImpl.create(right)); } }
3.26
querydsl_ExpressionUtils_notIn_rdh
/** * Create a {@code left not in right} expression * * @param <D> * type of expressions * @param left * lhs of expression * @param right * rhs of expression * @return left not in right */public static <D> Predicate notIn(Expression<D> left, Collection<? extends D> right) { if (right.size() == 1) { return neConst(left, right.iterator().next());} else { return predicate(Ops.NOT_IN, left, ConstantImpl.create(right)); } }
3.26
querydsl_ExpressionUtils_m2_rdh
/** * Create a {@code left in right or...} expression for each list * * @param <D> * element type * @param left * @param lists * @return a {@code left in right or...} expression */ public static <D> Predicate m2(Expression<D> left, Iterable<? extends Collection<? extends D>> lists) { BooleanBuilder rv = new BooleanBuilder(); for (Collection<? extends D> list : lists) { rv.or(in(left, list)); } return rv; } /** * Create a {@code left is null}
3.26
querydsl_ExpressionUtils_eqConst_rdh
/** * Create a {@code left == constant} expression * * @param <D> * type of expressions * @param left * lhs of expression * @param constant * rhs of expression * @return left == constant */ public static <D> Predicate eqConst(Expression<D> left, D constant) { return eq(left, ConstantImpl.create(constant)); }
3.26
querydsl_ExpressionUtils_list_rdh
/** * Create a list expression for the given arguments * * @param exprs * list elements * @return list expression */@SuppressWarnings("unchecked") public static <T> Expression<T> list(Class<T> clazz, List<? extends Expression<?>> exprs) { Expression<T> rv = ((Expression<T>) (exprs.get(0))); if (exprs.size() == 1) { rv = operation(clazz, Ops.SINGLETON, rv, exprs.get(0)); } else { for (int i = 1; i < exprs.size(); i++) { rv = operation(clazz, Ops.LIST, rv, exprs.get(i)); } } return rv; }
3.26
querydsl_ExpressionUtils_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> Path<T> path(Class<? extends T> type, PathMetadata metadata) { return new PathImpl<T>(type, metadata); }
3.26
querydsl_ExpressionUtils_allOf_rdh
/** * Create the intersection of the given arguments * * @param exprs * predicates * @return intersection */ @Nullable public static Predicate allOf(Predicate... exprs) { Predicate rv = null;for (Predicate b : exprs) {if (b != null) { rv = (rv == null) ? b : ExpressionUtils.and(rv, b);} } return rv; }
3.26
querydsl_ExpressionUtils_all_rdh
/** * Create a {@code all col} expression * * @param col * subquery expression * @return all col */ @SuppressWarnings("unchecked") public static <T> Expression<T> all(SubQueryExpression<? extends T> col) { return new OperationImpl<T>(col.getType(), QuantOps.ALL, Collections.singletonList(col)); }
3.26
querydsl_ExpressionUtils_ne_rdh
/** * Create a {@code left != right} expression * * @param <D> * type of expressions * @param left * lhs of expression * @param right * rhs of expression * @return left != right */ public static <D> Predicate ne(Expression<D> left, Expression<? super D> right) { return predicate(Ops.NE, left, right); }
3.26
querydsl_ExpressionUtils_notInAny_rdh
/** * Create a {@code left not in right and...} expression for each list * * @param <D> * @param left * @param lists * @return a {@code left not in right and...} expression */ public static <D> Predicate notInAny(Expression<D> left, Iterable<? extends Collection<? extends D>> lists) {BooleanBuilder rv = new BooleanBuilder(); for (Collection<? extends D> list : lists) { rv.and(notIn(left, list)); } return rv; }
3.26
querydsl_ArrayUtils_subarray_rdh
// copied and modified from commons-lang-2.3 // originally licensed under ASL 2.0 public static Object[] subarray(Object[] array, int startIndexInclusive, int endIndexExclusive) { int newSize = endIndexExclusive - startIndexInclusive; Class<?> type = array.getClass().getComponentType(); if (newSize <= 0) { return ((Object[]) (Array.newInstance(type, 0))); } Object[] subarray = ((Object[]) (Array.newInstance(type, newSize))); System.arraycopy(array, startIndexInclusive, subarray, 0, newSize); return subarray; }
3.26
querydsl_SQLTemplatesRegistry_getTemplates_rdh
/** * Get the SQLTemplates instance that matches best the SQL engine of the * given database metadata * * @param md * database metadata * @return templates * @throws SQLException */ public SQLTemplates getTemplates(DatabaseMetaData md) throws SQLException { return getBuilder(md).build(); }
3.26
querydsl_SQLTemplatesRegistry_getBuilder_rdh
/** * Get a SQLTemplates.Builder instance that matches best the SQL engine of the * given database metadata * * @param md * database metadata * @return templates * @throws SQLException */ public Builder getBuilder(DatabaseMetaData md) throws SQLException { String name = md.getDatabaseProductName().toLowerCase(); if (name.equals("cubrid")) { return CUBRIDTemplates.builder(); } else if (name.equals("apache derby")) { return DerbyTemplates.builder(); } else if (name.startsWith("firebird")) { return FirebirdTemplates.builder(); } else if (name.equals("h2")) { return H2Templates.builder(); } else if (name.equals("hsql")) { return HSQLDBTemplates.builder(); } else if (name.equals("mysql")) { return MySQLTemplates.builder(); } else if (name.equals("oracle")) { return OracleTemplates.builder(); } else if (name.equals("postgresql")) { return PostgreSQLTemplates.builder(); } else if (name.equals("sqlite")) { return SQLiteTemplates.builder(); } else if (name.startsWith("teradata")) { return TeradataTemplates.builder(); } else if (name.equals("microsoft sql server")) { return getMssqlSqlTemplates(md); } else { return new SQLTemplates.Builder() { @Override protected SQLTemplates build(char escape, boolean quote) { return new SQLTemplates(Keywords.DEFAULT, "\"", escape, quote, false); } }; } }
3.26
querydsl_SpatialSupport_addSupport_rdh
/** * Register spatial types to the given codegen module * * @param module * module to be customized for spatial support */ public void addSupport(AbstractModule module) { module.bindInstance(SQLCodegenModule.ENTITYPATH_TYPE, RelationalPathSpatial.class); registerTypes(module.get(Configuration.class)); }
3.26
querydsl_EnumExpression_nullif_rdh
/** * Create a {@code nullif(this, other)} expression * * @param other * @return nullif(this, other) */ @Override public EnumExpression<T> nullif(Expression<T> other) { return Expressions.enumOperation(getType(), Ops.NULLIF, mixin, other); }
3.26
querydsl_EnumExpression_m0_rdh
/** * Create a {@code nullif(this, other)} expression * * @param other * @return nullif(this, other) */ @Override public EnumExpression<T> m0(T other) { return nullif(ConstantImpl.create(other)); }
3.26
querydsl_EnumExpression_coalesce_rdh
/** * Create a {@code coalesce(this, args...)} expression * * @param args * additional arguments * @return coalesce */ @Override @SuppressWarnings({ "unchecked" }) public EnumExpression<T> coalesce(T... args) { Coalesce<T> coalesce = new Coalesce<T>(getType(), mixin); for (T arg : args) { coalesce.add(arg);} return ((EnumExpression<T>) (coalesce.asEnum())); }
3.26
querydsl_EntityType_getUncapSimpleName_rdh
/** * Use {@link #getModifiedSimpleName()} */ @Deprecated public String getUncapSimpleName() { return modifiedSimpleName; }
3.26
querydsl_QBean_as_rdh
/** * Create an alias for the expression * * @return this as alias */ public Expression<T> as(String alias) {return as(ExpressionUtils.path(getType(), alias)); }
3.26
querydsl_BooleanExpression_andAnyOf_rdh
/** * Create a {@code this && any(predicates)} expression * * <p>Returns an intersection of this and the union of the given predicates</p> * * @param predicates * union of predicates * @return this &amp;&amp; any(predicates) */ public BooleanExpression andAnyOf(Predicate... predicates) { return and(ExpressionUtils.anyOf(predicates)); } /** * Create a {@code !this}
3.26
querydsl_BooleanExpression_isTrue_rdh
/** * Create a {@code this == true} expression * * @return this == true */ public BooleanExpression isTrue() { return eq(true); }
3.26
querydsl_BooleanExpression_and_rdh
/** * Create a {@code this && right} expression * * <p>Returns an intersection of this and the given expression</p> * * @param right * right hand side of the union * @return {@code this &amp;&amp; right} */ public BooleanExpression and(@Nullable Predicate right) { right = ((Predicate) (ExpressionUtils.extract(right))); if (right != null) { return Expressions.booleanOperation(Ops.AND, mixin, right); } else { return this; } }
3.26
querydsl_BooleanExpression_coalesce_rdh
/** * Create a {@code coalesce(this, args...)} expression * * @param args * additional arguments * @return coalesce */ @Override public BooleanExpression coalesce(Boolean... args) { Coalesce<Boolean> coalesce = new Coalesce<Boolean>(getType(), mixin); for (Boolean arg : args) { coalesce.add(arg); } return coalesce.asBoolean(); }
3.26
querydsl_BooleanExpression_orAllOf_rdh
/** * Create a {@code this or all(predicates)} expression * * <p>Return a union of this and the intersection of the given predicates</p> * * @param predicates * intersection of predicates * @return this or all(predicates) */ public BooleanExpression orAllOf(Predicate... predicates) { return or(ExpressionUtils.allOf(predicates)); }
3.26
querydsl_BooleanExpression_or_rdh
/** * Create a {@code this || right} expression * * <p>Returns a union of this and the given expression</p> * * @param right * right hand side of the union * @return this || right */ public BooleanExpression or(@Nullable Predicate right) {right = ((Predicate) (ExpressionUtils.extract(right))); if (right != null) { return Expressions.booleanOperation(Ops.OR, mixin, right); } else { return this; } }
3.26
querydsl_JDOQuery_clone_rdh
/** * Clone the state of this query to a new {@link JDOQuery} instance with the given {@link PersistenceManager} * * @param persistenceManager * PersistenceManager instance to use * @return cloned query */@Override public JDOQuery<T> clone(PersistenceManager persistenceManager) { JDOQuery<T> query = new JDOQuery<T>(persistenceManager, getTemplates(), getMetadata().clone(), isDetach()); query.fetchGroups.addAll(fetchGroups); query.maxFetchDepth = maxFetchDepth; return query; }
3.26
querydsl_AbstractEvaluatorFactory_createSource_rdh
/** * * @param source * @param projectionType * @param names * @param types * @param id * @param constants * @return * @throws IOException */ protected String createSource(String source, ClassType projectionType, String[] names, Type[] types, String id, Map<String, Object> constants) throws IOException { // create source StringWriter writer = new StringWriter(); JavaWriter javaw = new JavaWriter(writer); SimpleType idType = new SimpleType(id, "", id); javaw.beginClass(idType, null); Parameter[] params = new Parameter[names.length + constants.size()]; for (int i = 0; i < names.length; i++) {params[i] = new Parameter(names[i], types[i]); } int i = names.length; for (Map.Entry<String, Object> entry : constants.entrySet()) { Type type = new ClassType(TypeCategory.SIMPLE, ClassUtils.normalize(entry.getValue().getClass())); params[i++] = new Parameter(entry.getKey(), type); } javaw.beginStaticMethod(projectionType, "eval", params); javaw.append(source); javaw.end(); javaw.end(); return writer.toString(); }
3.26
querydsl_DateTimeExpression_m0_rdh
/** * Create an expression representing the current time instant as a DateTimeExpression instance * * @return current timestamp */ public static DateTimeExpression<Date> m0() { return Constants.CURRENT_TIMESTAMP; }
3.26
querydsl_DateTimeExpression_currentDate_rdh
/** * Create an expression representing the current date as a DateTimeExpression instance * * @return current date */ public static <T extends Comparable> DateTimeExpression<T> currentDate(Class<T> cl) { return Expressions.dateTimeOperation(cl, DateTimeOps.CURRENT_DATE); }
3.26
querydsl_DateTimeExpression_dayOfWeek_rdh
/** * Create a day of week expression (range 1-7 / SUN-SAT) * <p>NOT supported in JDOQL and not in Derby</p> * * @return day of week */ public NumberExpression<Integer> dayOfWeek() { if (dayOfWeek == null) { dayOfWeek = Expressions.numberOperation(Integer.class, DateTimeOps.DAY_OF_WEEK, mixin); } return dayOfWeek; }
3.26
querydsl_DateTimeExpression_nullif_rdh
/** * Create a {@code nullif(this, other)} expression * * @param other * @return nullif(this, other) */ @Override public DateTimeExpression<T> nullif(T other) { return nullif(ConstantImpl.create(other)); }
3.26
querydsl_DateTimeExpression_dayOfMonth_rdh
/** * Create a day of month expression (range 1-31) * * @return day of month */ public NumberExpression<Integer> dayOfMonth() { if (dayOfMonth == null) {dayOfMonth = Expressions.numberOperation(Integer.class, DateTimeOps.DAY_OF_MONTH, mixin);} return dayOfMonth; }
3.26
querydsl_DateTimeExpression_dayOfYear_rdh
/** * Create a day of year expression (range 1-356) * <p>NOT supported in JDOQL and not in Derby</p> * * @return day of year */ public NumberExpression<Integer> dayOfYear() { if (dayOfYear == null) { dayOfYear = Expressions.numberOperation(Integer.class, DateTimeOps.DAY_OF_YEAR, mixin); } return dayOfYear; }
3.26
querydsl_DateTimeExpression_currentTimestamp_rdh
/** * Create an expression representing the current time instant as a DateTimeExpression instance * * @return current timestamp */ public static <T extends Comparable> DateTimeExpression<T> currentTimestamp(Class<T> cl) { return Expressions.dateTimeOperation(cl, DateTimeOps.CURRENT_TIMESTAMP); }
3.26
querydsl_DateTimeExpression_coalesce_rdh
/** * Create a {@code coalesce(this, args...)} expression * * @param args * additional arguments * @return coalesce */ @Override @SuppressWarnings("unchecked") public DateTimeExpression<T> coalesce(T... args) { Coalesce<T> coalesce = new Coalesce<T>(getType(), mixin); for (T arg : args) { coalesce.add(arg); } return coalesce.asDateTime(); }
3.26
querydsl_DateTimeExpression_milliSecond_rdh
/** * Create a milliseconds expression (range 0-999) * <p>Is always 0 in HQL and JDOQL modules</p> * * @return milli seconds */ public NumberExpression<Integer> milliSecond() { if (milliseconds == null) { milliseconds = Expressions.numberOperation(Integer.class, DateTimeOps.MILLISECOND, mixin); } return milliseconds; }
3.26
querydsl_DateTimeExpression_year_rdh
/** * Create a year expression * * @return year */public NumberExpression<Integer> year() { if (year == null) { year = Expressions.numberOperation(Integer.class, DateTimeOps.YEAR, mixin); } return year; }
3.26
querydsl_DateTimeExpression_minute_rdh
/** * Create a minutes expression (range 0-59) * * @return minute */ public NumberExpression<Integer> minute() { if (minutes == null) { minutes = Expressions.numberOperation(Integer.class, DateTimeOps.MINUTE, mixin); } return minutes; }
3.26
querydsl_DateTimeExpression_max_rdh
/** * Get the maximum value of this expression (aggregation) * * @return max(this) */ @Overridepublic DateTimeExpression<T> max() { if (max == null) { max = Expressions.dateTimeOperation(getType(), AggOps.MAX_AGG, mixin); } return max; }
3.26
querydsl_DateTimeExpression_min_rdh
/** * Get the minimum value of this expression (aggregation) * * @return min(this) */ @Override public DateTimeExpression<T> min() { if (min == null) { min = Expressions.dateTimeOperation(getType(), AggOps.MIN_AGG, mixin); } return min; }
3.26
querydsl_DateTimeExpression_month_rdh
/** * Create a month expression (range 1-12 / JAN-DEC) * * @return month */ public NumberExpression<Integer> month() { if (month == null) { month = Expressions.numberOperation(Integer.class, DateTimeOps.MONTH, mixin); } return month; }
3.26
querydsl_DateTimeExpression_yearMonth_rdh
/** * Create a year / month expression * * @return year month */ public NumberExpression<Integer> yearMonth() { if (yearMonth == null) { yearMonth = Expressions.numberOperation(Integer.class, DateTimeOps.YEAR_MONTH, mixin); } return yearMonth; }
3.26
querydsl_DateTimeExpression_second_rdh
/** * Create a seconds expression (range 0-59) * * @return second */ public NumberExpression<Integer> second() { if (seconds == null) { seconds = Expressions.numberOperation(Integer.class, DateTimeOps.SECOND, mixin); } return seconds; }
3.26
querydsl_DateTimeExpression_week_rdh
/** * Create a week expression * * @return week */ public NumberExpression<Integer> week() { if (week == null) { week = Expressions.numberOperation(Integer.class, DateTimeOps.WEEK, mixin); } return week; }
3.26
querydsl_DateTimeExpression_yearWeek_rdh
/** * Create a ISO yearweek expression * * @return year week */ public NumberExpression<Integer> yearWeek() { if (yearWeek == null) { yearWeek = Expressions.numberOperation(Integer.class, DateTimeOps.YEAR_WEEK, mixin); } return yearWeek; }
3.26
querydsl_MathExpressions_random_rdh
/** * Return a random number expression with the given seed * * @param seed * seed * @return random(seed) */ public static NumberExpression<Double> random(int seed) { return Expressions.numberOperation(Double.class, MathOps.RANDOM2, ConstantImpl.create(seed)); }
3.26
querydsl_MathExpressions_radians_rdh
/** * Create a {@code rad(num)} expression * * <p>Converts degrees to radians</p> * * @param num * numeric expression * @return rad(num) */ public static <A extends Number & Comparable<?>> NumberExpression<Double> radians(Expression<A> num) { return Expressions.numberOperation(Double.class, MathOps.RAD, num); }
3.26
querydsl_MathExpressions_acos_rdh
/** * Create a {@code acos(num)} expression * * <p>Returns the principal value of the arc cosine of num, expressed in radians.</p> * * @param num * numeric expression * @return acos(num) */public static <A extends Number & Comparable<?>> NumberExpression<Double> acos(Expression<A> num) { return Expressions.numberOperation(Double.class, MathOps.ACOS, num); }
3.26
querydsl_MathExpressions_min_rdh
/** * Create a {@code min(left, right)} expression * * <p>Return the smaller of the given values</p> * * @return min(left, right) */ public static <A extends Number & Comparable<?>> NumberExpression<A> min(Expression<A> left, Expression<A> right) { return NumberExpression.min(left, right); }
3.26
querydsl_MathExpressions_cos_rdh
/** * Create a {@code cos(num)} expression * * <p>Returns the cosine of an angle of num radians.</p> * * @param num * numeric expression * @return cos(num) */ public static <A extends Number & Comparable<?>> NumberExpression<Double> cos(Expression<A> num) { return Expressions.numberOperation(Double.class, MathOps.COS, num); }
3.26
querydsl_MathExpressions_round_rdh
/** * Round to s decimal places * * @param num * numeric expression * @param s * decimal places * @return round(num, s) */ public static <A extends Number & Comparable<?>> NumberExpression<A> round(Expression<A> num, int s) { return Expressions.numberOperation(num.getType(), MathOps.ROUND2, num, ConstantImpl.create(s)); }
3.26
querydsl_MathExpressions_sin_rdh
/** * Create a {@code sin(num)} expression * * <p>Returns the sine of an angle of num radians.</p> * * @param num * numeric expression * @return sin(num) */ public static <A extends Number & Comparable<?>> NumberExpression<Double> sin(Expression<A> num) { return Expressions.numberOperation(Double.class, MathOps.SIN, num); }
3.26
querydsl_MathExpressions_log_rdh
/** * Create a {@code log(num, base)} expression * * @param num * numeric expression * @param base * base * @return log(num, base) */ public static <A extends Number & Comparable<?>> NumberExpression<Double> log(Expression<A> num, int base) { return Expressions.numberOperation(Double.class, MathOps.LOG, num, ConstantImpl.create(base)); }
3.26
querydsl_MathExpressions_atan_rdh
/** * Create a {@code atan(num)} expression * * <p>Returns the principal value of the arc tangent of num, expressed in radians.</p> * * @param num * numeric expression * @return atan(num) */ public static <A extends Number & Comparable<?>> NumberExpression<Double> atan(Expression<A> num) { return Expressions.numberOperation(Double.class, MathOps.ATAN, num); }
3.26
querydsl_MathExpressions_m2_rdh
/** * Returns the random expression * * @return random() */ public static NumberExpression<Double> m2() { return NumberExpression.random(); }
3.26
querydsl_MathExpressions_tan_rdh
/** * Create a {@code tan(num)} expression * * <p>Returns the tangent of an angle of num radians.</p> * * @param num * numeric expression * @return tan(num) */ public static <A extends Number & Comparable<?>> NumberExpression<Double> tan(Expression<A> num) {return Expressions.numberOperation(Double.class, MathOps.TAN, num);}
3.26
querydsl_MathExpressions_exp_rdh
/** * Create a {@code exp(num)} expression * * <p>Returns the base-e exponential function of num, which is e raised to the power num.</p> * * @param num * numeric expression * @return exp(num) */ public static <A extends Number & Comparable<?>> NumberExpression<Double> exp(Expression<A> num) { return Expressions.numberOperation(Double.class, MathOps.EXP, num); }
3.26
querydsl_MathExpressions_m0_rdh
/** * Create a {@code asin(num)} expression * * <p>Returns the principal value of the arc sine of num, expressed in radians.</p> * * @param num * numeric expression * @return asin(num) */ public static <A extends Number & Comparable<?>> NumberExpression<Double> m0(Expression<A> num) { return Expressions.numberOperation(Double.class, MathOps.ASIN, num); }
3.26
querydsl_MathExpressions_sinh_rdh
/** * Create a {@code sinh(num)} expression * * <p>Returns the hyperbolic sine of num radians.</p> * * @param num * numeric expression * @return sinh(num) */ public static <A extends Number & Comparable<?>> NumberExpression<Double> sinh(Expression<A> num) { return Expressions.numberOperation(Double.class, MathOps.SINH, num); }
3.26
querydsl_MathExpressions_cot_rdh
/** * Create a {@code cot(num)} expression * * <p>Returns the cotangent of num.</p> * * @param num * numeric expression * @return cot(num) */ public static <A extends Number & Comparable<?>> NumberExpression<Double> cot(Expression<A> num) { return Expressions.numberOperation(Double.class, MathOps.COT, num);}
3.26
querydsl_MathExpressions_tanh_rdh
/** * Create a {@code tanh(num)} expression * * <p>Returns the hyperbolic tangent of num radians.</p> * * @param num * numeric expression * @return tanh(num) */ public static <A extends Number & Comparable<?>> NumberExpression<Double> tanh(Expression<A> num) { return Expressions.numberOperation(Double.class, MathOps.TANH, num); }
3.26
querydsl_MathExpressions_coth_rdh
/** * Create a {@code coth(num)} expression * * <p>Returns the hyperbolic cotangent of num.</p> * * @param num * numeric expression * @return coth(num) */ public static <A extends Number & Comparable<?>> NumberExpression<Double> coth(Expression<A> num) { return Expressions.numberOperation(Double.class, MathOps.COTH, num); }
3.26
querydsl_MathExpressions_ln_rdh
/** * Create a {@code ln(num)} expression * * <p>Returns the natural logarithm of num.</p> * * @param num * numeric expression * @return ln(num) */ public static <A extends Number & Comparable<?>> NumberExpression<Double> ln(Expression<A> num) { return Expressions.numberOperation(Double.class, MathOps.LN, num); }
3.26
querydsl_MathExpressions_power_rdh
/** * Create a {@code power(num, exponent)} expression * * <p>Returns num raised to the power exponent</p> * * @param num * numeric expression * @param exponent * exponent * @return power(num, exponent) */ public static <A extends Number & Comparable<?>> NumberExpression<Double> power(Expression<A> num, int exponent) { return Expressions.numberOperation(Double.class, MathOps.POWER, num, ConstantImpl.create(exponent)); }
3.26
querydsl_MathExpressions_degrees_rdh
/** * Create a {@code deg(num)} expression * * <p>Convert radians to degrees.</p> * * @param num * numeric expression * @return deg(num) */ public static <A extends Number & Comparable<?>> NumberExpression<Double> degrees(Expression<A> num) { return Expressions.numberOperation(Double.class, MathOps.DEG, num); }
3.26
querydsl_MathExpressions_sign_rdh
/** * Create a {@code sign(num)} expression * * <p>Returns the positive (+1), zero (0), or negative (-1) sign of num.</p> * * @param num * numeric expression * @return sign(num) */ public static <A extends Number & Comparable<?>> NumberExpression<Integer> sign(Expression<A> num) { return Expressions.numberOperation(Integer.class, MathOps.SIGN, num);}
3.26
querydsl_MathExpressions_m1_rdh
/** * Create a {@code cosh(num)} expression * * <p>Returns the hyperbolic cosine of num radians.</p> * * @param num * numeric expression * @return cosh(num) */public static <A extends Number & Comparable<?>> NumberExpression<Double> m1(Expression<A> num) { return Expressions.numberOperation(Double.class, MathOps.COSH, num); }
3.26
querydsl_AbstractPostgreSQLQuery_of_rdh
/** * FOR UPDATE / FOR SHARE OF tables * * @param paths * tables * @return the current object */ public C of(RelationalPath<?>... paths) {StringBuilder builder = new StringBuilder(" of "); for (RelationalPath<?> path : paths) { if (builder.length() > 4) { builder.append(", "); } builder.append(getConfiguration().getTemplates().quoteIdentifier(path.getTableName())); } return addFlag(Position.END, builder.toString()); }
3.26
querydsl_AbstractPostgreSQLQuery_forShare_rdh
/** * FOR SHARE causes the rows retrieved by the SELECT statement to be locked as though for update. * * @return the current object */ public C forShare() { // global forShare support was added later, delegating to super implementation return super.forShare(); }
3.26
querydsl_AbstractPostgreSQLQuery_distinctOn_rdh
/** * adds a DISTINCT ON clause * * @param exprs * @return */ public C distinctOn(Expression<?>... exprs) { return addFlag(Position.AFTER_SELECT, Expressions.template(Object.class, "distinct on({0}) ", ExpressionUtils.list(Object.class, exprs))); }
3.26
querydsl_PathBuilderFactory_create_rdh
/** * Create a new PathBuilder instance for the given type * * @param type * type of expression * @return new PathBuilder instance */ @SuppressWarnings("unchecked") public <T> PathBuilder<T> create(Class<T> type) { PathBuilder<T> rv = ((PathBuilder<T>) (paths.get(type))); if (rv == null) { rv = new PathBuilder<T>(type, variableName(type)); paths.put(type, rv); } return rv; }
3.26
querydsl_StringExpressions_rpad_rdh
/** * Create a {@code rpad(in, length, c)} expression * * <p>Returns in right-padded to length characters with c</p> * * @param in * string to be padded * @param length * target length * @param c * padding char * @return rpad(in, length, c) */ public static StringExpression rpad(Expression<String> in, int length, char c) { return Expressions.stringOperation(StringOps.RPAD2, in, ConstantImpl.create(length), ConstantImpl.create(c)); }
3.26
querydsl_StringExpressions_lpad_rdh
/** * Create a {@code lpad(in, length, c)} expression * * <p>Returns in left-padded to length characters with c</p> * * @param in * string to be padded * @param length * target length * @param c * padding char * @return lpad(in, length, c) */ public static StringExpression lpad(Expression<String> in, NumberExpression<Integer> length, char c) { return Expressions.stringOperation(StringOps.LPAD2, in, length, ConstantImpl.create(c)); } /** * Create a {@code lpad(in, length, c)}
3.26
querydsl_StringExpressions_rtrim_rdh
/** * Create a {@code rtrim(str)} expression * * <p>Returns a character string after truncating all trailing blanks.</p> * * @param str * string * @return rtrim(str) */public static StringExpression rtrim(Expression<String> str) { return Expressions.stringOperation(StringOps.RTRIM, str); }
3.26
querydsl_StringExpressions_ltrim_rdh
/** * Create a {@code ltrim(str)} expression * * <p>Returns a character expression after it removes leading blanks.</p> * * @param str * string * @return ltrim(str) */ public static StringExpression ltrim(Expression<String> str) { return Expressions.stringOperation(StringOps.LTRIM, str); }
3.26
querydsl_PathMetadataFactory_forArrayAccess_rdh
/** * Create a new PathMetadata instance for indexed array access * * @param parent * parent path * @param index * index of element * @return array access path */ public static PathMetadata forArrayAccess(Path<?> parent, @Range(from = 0, to = Integer.MAX_VALUE) int index) { return new PathMetadata(parent, index, PathType.ARRAYVALUE_CONSTANT); }
3.26
querydsl_PathMetadataFactory_forDelegate_rdh
/** * Create a new PathMetadata instance for delegate access * * @param delegate * delegate path * @return wrapped path */ public static <T> PathMetadata forDelegate(Path<T> delegate) { return new PathMetadata(delegate, delegate, PathType.DELEGATE); }
3.26
querydsl_PathMetadataFactory_forMapAccess_rdh
/** * Create a new PathMetadata instance for key based map access * * @param parent * parent path * @param key * key for map access * @return map access path */ public static <KT> PathMetadata forMapAccess(Path<?> parent, Expression<KT> key) { return new PathMetadata(parent, key, PathType.MAPVALUE); }
3.26
querydsl_PathMetadataFactory_m0_rdh
/** * Create a new PathMetadata instance for for key based map access * * @param parent * parent path * @param key * key for map access * @return map access path */ public static <KT> PathMetadata m0(Path<?> parent, KT key) { return new PathMetadata(parent, key, PathType.MAPVALUE_CONSTANT); }
3.26
querydsl_PathMetadataFactory_forVariable_rdh
/** * Create a new PathMetadata instance for a variable * * @param variable * variable name * @return variable path */ public static PathMetadata forVariable(String variable) { return new PathMetadata(null, variable, PathType.VARIABLE); }
3.26
querydsl_PathMetadataFactory_forCollectionAny_rdh
/** * Create a new PathMetadata instance for collection any access * * @param parent * parent path * @return collection any path */ public static PathMetadata forCollectionAny(Path<?> parent) { return new PathMetadata(parent, "", PathType.COLLECTION_ANY); }
3.26
querydsl_PathMetadataFactory_forProperty_rdh
/** * Create a new PathMetadata instance for property access * * @param parent * parent path * @param property * property name * @return property path */ public static PathMetadata forProperty(Path<?> parent, String property) { return new PathMetadata(parent, property, PathType.PROPERTY); }
3.26
querydsl_PathMetadataFactory_forListAccess_rdh
/** * Create a new PathMetadata instance for indexed list access * * @param parent * parent path * @param index * index of element * @return list access path */ public static PathMetadata forListAccess(Path<?> parent, @Range(from = 0, to = Integer.MAX_VALUE) int index) { return new PathMetadata(parent, index, PathType.LISTVALUE_CONSTANT); }
3.26
querydsl_SQLTemplates_serializeInsert_rdh
/** * template method for INSERT serialization * * @param metadata * @param batches * @param context */ public void serializeInsert(QueryMetadata metadata, RelationalPath<?> entity, List<SQLInsertBatch> batches, SQLSerializer context) { context.serializeForInsert(metadata, entity, batches);if (!metadata.getFlags().isEmpty()) { context.serialize(Position.END, metadata.getFlags()); } }
3.26
querydsl_SQLTemplates_serializeModifiers_rdh
/** * template method for LIMIT and OFFSET serialization * * @param metadata * @param context */ protected void serializeModifiers(QueryMetadata metadata, SQLSerializer context) { QueryModifiers mod = metadata.getModifiers(); if (mod.getLimit() != null) { context.handle(limitTemplate, mod.getLimit()); } else if (f2) {context.handle(limitTemplate, maxLimit); } if (mod.getOffset() != null) { context.handle(offsetTemplate, mod.getOffset());} }
3.26
querydsl_SQLTemplates_serializeMerge_rdh
/** * template method for MERGE serialization * * @param metadata * @param entity * @param keys * @param columns * @param values * @param subQuery * @param context */ public void serializeMerge(QueryMetadata metadata, RelationalPath<?> entity, List<Path<?>> keys, List<Path<?>> columns, List<Expression<?>> values, SubQueryExpression<?> subQuery, SQLSerializer context) { context.serializeForMerge(metadata, entity, keys, columns, values, subQuery);if (!metadata.getFlags().isEmpty()) { context.serialize(Position.END, metadata.getFlags()); } }
3.26
querydsl_SQLTemplates_serializeUpdate_rdh
/** * template method for UPDATE serialization * * @param metadata * @param entity * @param updates * @param context */ public void serializeUpdate(QueryMetadata metadata, RelationalPath<?> entity, Map<Path<?>, Expression<?>> updates, SQLSerializer context) { context.serializeForUpdate(metadata, entity, updates); // limit if (metadata.getModifiers().isRestricting()) { serializeModifiers(metadata, context); } if (!metadata.getFlags().isEmpty()) { context.serialize(Position.END, metadata.getFlags()); } }
3.26
querydsl_SQLTemplates_serialize_rdh
/** * template method for SELECT serialization * * @param metadata * @param forCountRow * @param context */ public void serialize(QueryMetadata metadata, boolean forCountRow, SQLSerializer context) { context.serializeForQuery(metadata, forCountRow); if (!metadata.getFlags().isEmpty()) { context.serialize(Position.END, metadata.getFlags()); } }
3.26
querydsl_JDOExpressions_selectFrom_rdh
/** * Create a new detached {@link JDOQuery} instance with the given projection * * @param expr * projection and source * @param <T> * @return select(expr).from(expr) */ public static <T> JDOQuery<T> selectFrom(EntityPath<T> expr) { return select(expr).from(expr); }
3.26
querydsl_JDOExpressions_selectOne_rdh
/** * Create a new detached {@link JDOQuery} instance with the projection 1 * * @return select(1) */ public static JDOQuery<Integer> selectOne() { return select(Expressions.ONE); }
3.26
querydsl_JDOExpressions_select_rdh
/** * Create a new detached {@link JDOQuery} instance with the given projection * * @param exprs * projection * @return select(exprs) */ public static JDOQuery<Tuple> select(Expression<?>... exprs) {return new JDOQuery<Void>().select(exprs); }
3.26
querydsl_JDOExpressions_selectDistinct_rdh
/** * Create a new detached {@link JDOQuery} instance with the given projection * * @param exprs * projection * @return select(distinct exprs) */ public static JDOQuery<Tuple> selectDistinct(Expression<?>... exprs) { return select(exprs).distinct(); }
3.26
querydsl_AbstractHibernateQuery_setFlushMode_rdh
/** * Override the current session flush mode, just for this query. * * @return the current object */ @SuppressWarnings("unchecked") public Q setFlushMode(FlushMode flushMode) { this.flushMode = flushMode; return ((Q) (this)); }
3.26
querydsl_AbstractHibernateQuery_setLockMode_rdh
/** * Set the lock mode for the given path. * * @return the current object */ @SuppressWarnings("unchecked") public Q setLockMode(Path<?> path, LockMode lockMode) { lockModes.put(path, lockMode); return ((Q) (this)); }
3.26
querydsl_AbstractHibernateQuery_createQuery_rdh
/** * Expose the original Hibernate query for the given projection * * @return query */ public Query createQuery() { return createQuery(getMetadata().getModifiers(), false); }
3.26