Package jaque.expressions

Examples of jaque.expressions.Expression


  public static <T> boolean contains(final T value,
      final java.util.Comparator<? super T> comparator,
      final Queryable<T> source) {

    Expression e = invoke(null, _contains2, constant(value),
        constant(comparator), source.getExpression());
    return source.getFactory().createQueryable(Boolean.TYPE, e).single();
  }
View Full Code Here


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

    Expression e = invoke(null, _count2, quote(lambda), source
        .getExpression());
    return ((Number) source.getFactory().createQueryable(Integer.TYPE, e)
        .single()).intValue();
  }
View Full Code Here

        .single()).intValue();
  }

  public static <E> int count(final Queryable<E> source) {

    Expression e = invoke(null, _count1, source.getExpression());
    return ((Number) source.getFactory().createQueryable(Integer.TYPE, e)
        .single()).intValue();
  }
View Full Code Here

        .single()).intValue();
  }

  @SuppressWarnings("unchecked")
  public static <T> T elementAt(int position, final Queryable<T> source) {
    Expression e = invoke(null, _elementAt1, constant(position,
        Integer.TYPE), source.getExpression());
    return (T) source.getFactory().createQueryable(Object.class, e)
        .single();
  }
View Full Code Here

  @SuppressWarnings("unchecked")
  public static <T> T elementAt(int position,
      final Function<Boolean, ? super T> predicate,
      final Queryable<T> source) {
    LambdaExpression<?> lambda = LambdaExpression.parse(predicate);
    Expression e = invoke(null, _elementAt2, constant(position,
        Integer.TYPE), quote(lambda), source.getExpression());
    return (T) source.getFactory().createQueryable(Object.class, e)
        .single();
  }
View Full Code Here

  }

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

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

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

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

  }

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

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

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

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

    return (T) source.getFactory().createQueryable(Object.class, e)
        .single();
  }

  public static <T> boolean isEmpty(final Queryable<T> source) {
    Expression e = invoke(null, _isEmpty, source.getExpression());
    return source.getFactory().createQueryable(Boolean.TYPE, 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.