List of usage examples for javax.persistence.criteria Expression getJavaType
Class<? extends X> getJavaType();
From source file:org.batoo.jpa.core.impl.criteria.expression.AggregationExpression.java
/** * @param type/*w w w.ja v a 2s . c om*/ * the type of the function * @param x * the first parameter * * @since 2.0.0 */ @SuppressWarnings("unchecked") public AggregationExpression(AggregationFunctionType type, Expression<?> x) { super((Class<T>) x.getJavaType()); this.type = type; this.x = (AbstractExpression<?>) x; }
From source file:org.batoo.jpa.core.impl.criteria.expression.ArithmeticExression.java
/** * @param operation// w w w . j a v a 2 s .c o m * the operation * @param x * the left side expression * @param y * the right side expression * * @since 2.0.0 */ @SuppressWarnings("unchecked") public ArithmeticExression(ArithmeticOperation operation, Expression<? extends N> x, Expression<? extends N> y) { super((Class<N>) x.getJavaType()); this.operation = operation; this.x = (AbstractExpression<N>) x; this.y = (AbstractExpression<N>) y; }
From source file:org.batoo.jpa.core.impl.criteria.expression.NegationExpression.java
/** * @param inner/*from w ww . j a v a 2s. c o m*/ * the inner expression * * @since 2.0.0 */ @SuppressWarnings("unchecked") public NegationExpression(Expression<N> inner) { super((Class<N>) inner.getJavaType()); this.inner = (AbstractExpression<N>) inner; }
From source file:org.batoo.jpa.core.impl.criteria.expression.NullIfExpression.java
/** * @param x/*from w w w .ja va 2 s .c o m*/ * the expression * @param y * the expression * * @since 2.0.0 */ @SuppressWarnings("unchecked") public NullIfExpression(Expression<? extends T> x, Expression<?> y) { super((Class<T>) x.getJavaType()); this.x = (AbstractExpression<? extends T>) x; this.y = (AbstractExpression<?>) y; }
From source file:org.batoo.jpa.core.impl.criteria.expression.NumericFunctionExpression.java
/** * @param type// w ww . j a va 2 s. c om * the type of the function * @param x * the first parameter * @param y * the optional second parameter * * @since 2.0.0 */ @SuppressWarnings("unchecked") public NumericFunctionExpression(NumericFunctionType type, Expression<?> x, Expression<Integer> y) { super((Class<N>) (Number.class.isAssignableFrom(x.getJavaType()) ? x.getJavaType() : Integer.class)); this.type = type; this.x = (AbstractExpression<?>) x; this.y = (AbstractExpression<Integer>) y; }