/** * Set the given parameter to the given value * * @param <P> * @param param * @param value * @return */ public <P> Q set(ParamExpression<P> param, P value) { return queryMixin.set(param, value); }
private NumberExpression<Long> convertToNumber(final StringPath value) { return Expressions.numberTemplate(Long.class, "TO_NUMBER({0})", value); } }
@SuppressWarnings("unchecked") public AbstractSQLQuery(QueryMetadata metadata) { super(new QueryMixin<T>(metadata)); this.queryMixin.setSelf((T)this); }
/** * @return */ @Override public QueryMetadata getMetadata() { return queryMixin.getMetadata(); }
/** * Add the given filter condition * * <p>Skips null arguments</p> * * @param o filter conditions to be added * @return */ public Q where(Predicate o) { return queryMixin.where(o); }
public final T orderBy(OrderSpecifier<?>... o) { for (OrderSpecifier<?> spec : o) { orderBy(spec); } return self; }
/** * Defines the sources of the subquery * * @param o * @return */ public BeanSubQuery from(EntityPath<?>... o) { return queryMixin.from(o); }
/** * Defines the offset for the query results * * @param offset * @return */ public Q offset(long offset) { return queryMixin.offset(offset); }
/** * Add a single filter for aggregation * * @param e * @return */ public Q having(Predicate e) { return queryMixin.having(e); }
/** * Set the Query to return distinct results * * @return */ public Q distinct() { return queryMixin.distinct(); }
/** * Add grouping/aggregation expressions * * @param o * @return */ public Q groupBy(Expression<?>... o) { return queryMixin.groupBy(o); }
private Expression<?>[] convert(Object... args) { final Expression<?>[] exprs = new Expression[args.length]; for (int i = 0; i < exprs.length; i++) { exprs[i] = convert(args[i]); } return exprs; }
/** * Combine the given expressions into a list expression * * @param exprs * @return */ public static SimpleExpression<Tuple> list(SimpleExpression<?>... exprs) { return list(Tuple.class, exprs); }
@SuppressWarnings("unchecked") public AbstractSQLQuery(QueryMetadata metadata, Configuration conf, PersistenceManager persistenceManager, boolean detach) { super(new QueryMixin<T>(metadata, false), conf); this.queryMixin = super.queryMixin; this.queryMixin.setSelf((T)this); this.persistenceManager = persistenceManager; this.detach = detach; }
/** * Defines the filter conditions of the subquery * * @param o * multiple mandatory filters * @return */ public BeanSubQuery where(Predicate... o) { return queryMixin.where(o); }
/** * Defines the order of the subquery * * @param o * @return */ public BeanSubQuery orderBy(OrderSpecifier<?>... o) { return queryMixin.orderBy(o); }
/** * Add filters for aggregation * * @param o * @return */ public Q having(Predicate... o) { return queryMixin.having(o); }
/** * Add the given filter conditions * * <p>Skips null arguments</p> * * @param o filter conditions to be added * @return */ public Q where(Predicate... o) { return queryMixin.where(o); }
/** * Add a single order expression * * @param o * @return */ public Q orderBy(OrderSpecifier<?> o) { return queryMixin.orderBy(o); }