Package jaque.expressions

Examples of jaque.expressions.Expression


  @SuppressWarnings("unchecked")
  public static <T, Key extends Comparable<? super Key>> T min(
      final Function<Key, ? super T> selector, final Queryable<T> source) {
    LambdaExpression<?> lambda = LambdaExpression.parse(selector);
    Expression e = invoke(null, _min2, quote(lambda), source
        .getExpression());
    return (T) source.getFactory().createQueryable(Number.class, e)
        .single();
  }
View Full Code Here


  @SuppressWarnings("unchecked")
  public static <T, Key> T min(final Function<Key, ? super T> selector,
      final java.util.Comparator<? super Key> comparator,
      final Queryable<T> source) {
    LambdaExpression<?> lambda = LambdaExpression.parse(selector);
    Expression e = invoke(null, _min3, quote(lambda), constant(comparator),
        source.getExpression());
    return (T) source.getFactory().createQueryable(Number.class, e)
        .single();
  }
View Full Code Here

  }

  @SuppressWarnings("unchecked")
  public static <T> T single(final Queryable<T> source) {

    Expression e = invoke(null, _single1, source.getExpression());
    return (T) source.getFactory().createQueryable(Object.class, e)
        .single();
  }
View Full Code Here

  @SuppressWarnings("unchecked")
  public static <T> T single(final Function<Boolean, ? super T> predicate,
      final Queryable<T> source) {
    LambdaExpression<?> lambda = LambdaExpression.parse(predicate);

    Expression e = invoke(null, _single2, quote(lambda), source
        .getExpression());
    return (T) source.getFactory().createQueryable(Object.class, e)
        .single();
  }
View Full Code Here

  }

  @SuppressWarnings("unchecked")
  public static <T> T singleOrNull(final Queryable<T> source) {

    Expression e = invoke(null, _singleOrNull1, source.getExpression());
    return (T) source.getFactory().createQueryable(Object.class, e)
        .single();
  }
View Full Code Here

  public static <T> T singleOrNull(
      final Function<Boolean, ? super T> predicate,
      final Queryable<T> source) {
    LambdaExpression<?> lambda = LambdaExpression.parse(predicate);

    Expression e = invoke(null, _singleOrNull2, quote(lambda), source
        .getExpression());
    return (T) source.getFactory().createQueryable(Object.class, e)
        .single();
  }
View Full Code Here

  @SuppressWarnings("unchecked")
  public static <T, Result extends Number> Result sum(
      final Queryable<T> source) {

    Expression e = invoke(null, _sum1, source.getExpression());
    return (Result) source.getFactory().createQueryable(Number.class, e)
        .single();
  }
View Full Code Here

  public static <T, Result extends Number> Result sum(
      final Function<Result, ? super T> selector,
      final Queryable<T> source) {
    LambdaExpression<?> lambda = LambdaExpression.parse(selector);

    Expression e = invoke(null, _sum2, quote(lambda), source
        .getExpression());
    return (Result) source.getFactory().createQueryable(Number.class, e)
        .single();
  }
View Full Code Here

TOP

Related Classes of jaque.expressions.Expression

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.