/** * @param right * @return */ public BooleanExpression gtAll(CollectionExpression<?, ? super T> right) { return gt(ExpressionUtils.<T>all(right)); }
/** * @param right * @return */ public BooleanExpression gtAny(CollectionExpression<?, ? super T> right) { return gt(ExpressionUtils.<T>any(right)); }
/** * Create a {@code this > right} expression * * @param <A> * @param right rhs of the comparison * @return {@code this > right} * @see java.lang.Comparable#compareTo(Object) */ public final <A extends Number & Comparable<?>> BooleanExpression gt(A right) { return gt(ConstantImpl.create(cast(right))); }
@Test public void Where_3() throws Exception { query().from(an).where(an.bodyWeight.sqrt().gt(10.0)).parse(); }
@Test public void DocoExamples98_5() throws Exception { query().from(cat).where(cat.kittens.size().gt(0)).parse(); }
@Test public void Not_2() throws Exception { query().from(cat).where(cat.kittens.size().gt(1).not()).parse(); }
@Test public void Where_4() throws Exception { query().from(an).where(an.bodyWeight.sqrt().divide(2d).gt(10.0)).parse(); }
@Test public void Length() { assertEquals(6, query().from(cat).where(cat.name.length().gt(0)).count()); }
@Test @Ignore public void Sum_2() throws RecognitionException, TokenStreamException { // NOT SUPPORTED query().from(cat).where(cat.kittens.size().sum().gt(0)).list(cat); }
@Test @Ignore public void Sum_2() throws RecognitionException, TokenStreamException { // NOT SUPPORTED query().from(cat).where(cat.kittens.size().sum().gt(0)).select(cat).parse(); }
@Test public void SubQuery5() { QEmployee employee = QEmployee.employee; QEmployee employee2 = new QEmployee("e2"); query().from(employee) .where(subQuery().from(employee2) .list(employee2.id).count().gt(1)) .count(); }
@Test @Ignore public void DocoExamples910_3() throws Exception { query().from(cat).join(cat.kittens, kitten) .groupBy(cat) .having(kitten.weight.avg().gt(100.0)) .orderBy(kitten.count().asc(), kitten.weight.sum().desc()) .select(cat) .parse(); }
@Test public void DocoExamples912() throws Exception { query().from(ord, cust) .join(ord.lineItems, item).join(item.product, product) .from(catalog).join(catalog.prices, price).where( ord.paid.not().and(ord.customer.eq(cust)).and( price.product.eq(product)).and( catalog.effectiveDate.gt(DateExpression.currentDate())).and( catalog.effectiveDate.gtAny( sub().from(catalog).where( catalog.effectiveDate.lt(DateExpression.currentDate())) .list(catalog.effectiveDate)))) .groupBy(ord).having(price.amount.sum().gt(0l)) .orderBy(price.amount.sum().desc()) .select(ord.id, price.amount.sum(), item.count()); Customer c1 = new Customer(); Catalog c2 = new Catalog(); query().from(ord) .join(ord.lineItems, item).join(item.product, product) .from(catalog).join(catalog.prices, price).where( ord.paid.not().and(ord.customer.eq(c1)).and( price.product.eq(product)).and(catalog.eq(c2))) .groupBy(ord).having(price.amount.sum().gt(0l)) .orderBy(price.amount.sum().desc()) .select(ord.id, price.amount.sum(), item.count()); }