org.hibernate.ejb.criteria.expression.function
Class AggregationFunction<T>
java.lang.Object
org.hibernate.ejb.criteria.AbstractNode
org.hibernate.ejb.criteria.expression.AbstractTupleElement<X>
org.hibernate.ejb.criteria.expression.SelectionImpl<T>
org.hibernate.ejb.criteria.expression.ExpressionImpl<X>
org.hibernate.ejb.criteria.expression.function.BasicFunctionExpression<X>
org.hibernate.ejb.criteria.expression.function.ParameterizedFunctionExpression<T>
org.hibernate.ejb.criteria.expression.function.AggregationFunction<T>
- All Implemented Interfaces:
- java.io.Serializable, javax.persistence.criteria.Expression<T>, javax.persistence.criteria.Selection<T>, javax.persistence.TupleElement<T>, FunctionExpression<T>, ExpressionImplementor<T>, ParameterContainer, Renderable, SelectionImplementor<T>, TupleElementImplementor<T>
- Direct Known Subclasses:
- AggregationFunction.AVG, AggregationFunction.COUNT, AggregationFunction.GREATEST, AggregationFunction.LEAST, AggregationFunction.MAX, AggregationFunction.MIN, AggregationFunction.SUM
public class AggregationFunction<T>
- extends ParameterizedFunctionExpression<T>
- implements java.io.Serializable
Models SQL aggregation functions (MIN, MAX, COUNT, etc).
- Author:
- Steve Ebersole
- See Also:
- Serialized Form
Nested Class Summary |
static class |
AggregationFunction.AVG
Implementation of a AVG function providing convenience in construction. |
static class |
AggregationFunction.COUNT
Implementation of a COUNT function providing convenience in construction. |
static class |
AggregationFunction.GREATEST<X extends java.lang.Comparable<X>>
Models the MAX function in terms of non-numeric expressions. |
static class |
AggregationFunction.LEAST<X extends java.lang.Comparable<X>>
Models the MIN function in terms of non-numeric expressions. |
static class |
AggregationFunction.MAX<N extends java.lang.Number>
Implementation of a MAX function providing convenience in construction. |
static class |
AggregationFunction.MIN<N extends java.lang.Number>
Implementation of a MIN function providing convenience in construction. |
static class |
AggregationFunction.SUM<N extends java.lang.Number>
Implementation of a SUM function providing convenience in construction. |
Constructor Summary |
AggregationFunction(CriteriaBuilderImpl criteriaBuilder,
java.lang.Class<T> returnType,
java.lang.String functionName,
javax.persistence.criteria.Expression<?> argument)
Constructs an aggregation function with a single literal argument. |
AggregationFunction(CriteriaBuilderImpl criteriaBuilder,
java.lang.Class<T> returnType,
java.lang.String functionName,
java.lang.Object argument)
Constructs an aggregation function with a single literal argument. |
Method Summary |
boolean |
isAggregation()
Is this function a value aggregator (like a COUNT or MAX function e.g.)? |
Methods inherited from class org.hibernate.ejb.criteria.expression.ExpressionImpl |
as, asBigDecimal, asBigInteger, asDouble, asFloat, asInteger, asLong, asString, in, in, in, in, isNotNull, isNull |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.persistence.criteria.Expression |
as, in, in, in, in, isNotNull, isNull |
Methods inherited from interface javax.persistence.criteria.Selection |
alias, getCompoundSelectionItems, isCompoundSelection |
Methods inherited from interface javax.persistence.TupleElement |
getAlias, getJavaType |
AggregationFunction
public AggregationFunction(CriteriaBuilderImpl criteriaBuilder,
java.lang.Class<T> returnType,
java.lang.String functionName,
java.lang.Object argument)
- Constructs an aggregation function with a single literal argument.
- Parameters:
criteriaBuilder
- The query builder instance.returnType
- The function return type.functionName
- The name of the function.argument
- The literal argument
AggregationFunction
public AggregationFunction(CriteriaBuilderImpl criteriaBuilder,
java.lang.Class<T> returnType,
java.lang.String functionName,
javax.persistence.criteria.Expression<?> argument)
- Constructs an aggregation function with a single literal argument.
- Parameters:
criteriaBuilder
- The query builder instance.returnType
- The function return type.functionName
- The name of the function.argument
- The argument
isAggregation
public boolean isAggregation()
- Description copied from interface:
FunctionExpression
- Is this function a value aggregator (like a COUNT or MAX function e.g.)?
- Specified by:
isAggregation
in interface FunctionExpression<T>
- Overrides:
isAggregation
in class BasicFunctionExpression<T>
- Returns:
- True if this functions does aggregation.
Copyright © 2012. All Rights Reserved.