public class BinaryArithmeticOperation<N extends java.lang.Number> extends ExpressionImpl<N> implements BinaryOperatorExpression<N>, java.io.Serializable
| Modifier and Type | Class and Description |
|---|---|
static class |
BinaryArithmeticOperation.Operation |
ParameterContainer.Helper| Constructor and Description |
|---|
BinaryArithmeticOperation(CriteriaBuilderImpl criteriaBuilder,
java.lang.Class<N> resultType,
BinaryArithmeticOperation.Operation operator,
javax.persistence.criteria.Expression<? extends N> lhs,
javax.persistence.criteria.Expression<? extends N> rhs)
Creates an arithmethic operation based on 2 expressions.
|
BinaryArithmeticOperation(CriteriaBuilderImpl criteriaBuilder,
java.lang.Class<N> javaType,
BinaryArithmeticOperation.Operation operator,
javax.persistence.criteria.Expression<? extends N> lhs,
N rhs)
Creates an arithmethic operation based on an expression and a literal.
|
BinaryArithmeticOperation(CriteriaBuilderImpl criteriaBuilder,
java.lang.Class<N> javaType,
BinaryArithmeticOperation.Operation operator,
N lhs,
javax.persistence.criteria.Expression<? extends N> rhs)
Creates an arithmetic operation based on an expression and a literal.
|
| Modifier and Type | Method and Description |
|---|---|
static java.lang.Class<? extends java.lang.Number> |
determineResultType(java.lang.Class<? extends java.lang.Number> argument1Type,
java.lang.Class<? extends java.lang.Number> argument2Type) |
static java.lang.Class<? extends java.lang.Number> |
determineResultType(java.lang.Class<? extends java.lang.Number> argument1Type,
java.lang.Class<? extends java.lang.Number> argument2Type,
boolean isQuotientOperation) |
static java.lang.Class<? extends java.lang.Number> |
determineReturnType(java.lang.Class<? extends java.lang.Number> defaultType,
javax.persistence.criteria.Expression<? extends java.lang.Number> expression)
Helper for determining the appropriate operation return type based on one of the operands as an expression.
|
static java.lang.Class<? extends java.lang.Number> |
determineReturnType(java.lang.Class<? extends java.lang.Number> defaultType,
java.lang.Number numberLiteral)
Helper for determining the appropriate operation return type based on one of the operands as a literal.
|
javax.persistence.criteria.Expression<? extends N> |
getLeftHandOperand()
Get the left-hand operand.
|
BinaryArithmeticOperation.Operation |
getOperator() |
javax.persistence.criteria.Expression<? extends N> |
getRightHandOperand()
Get the right-hand operand.
|
void |
registerParameters(ParameterRegistry registry)
Register any parameters contained within this query component with the given registry.
|
java.lang.String |
render(RenderingContext renderingContext) |
java.lang.String |
renderProjection(RenderingContext renderingContext) |
as, asBigDecimal, asBigInteger, asDouble, asFloat, asInteger, asLong, asString, in, in, in, in, isNotNull, isNullalias, getCompoundSelectionItems, getValueHandlers, isCompoundSelectionforceConversion, getAlias, getJavaType, getValueHandler, resetJavaType, setAliascriteriaBuilderclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitas, in, in, in, in, isNotNull, isNullalias, getCompoundSelectionItems, isCompoundSelectiongetValueHandlersgetValueHandlerpublic BinaryArithmeticOperation(CriteriaBuilderImpl criteriaBuilder, java.lang.Class<N> resultType, BinaryArithmeticOperation.Operation operator, javax.persistence.criteria.Expression<? extends N> lhs, javax.persistence.criteria.Expression<? extends N> rhs)
criteriaBuilder - The builder for query components.resultType - The operation result typeoperator - The operator (type of operation).lhs - The left-hand operand.rhs - The right-hand operandpublic BinaryArithmeticOperation(CriteriaBuilderImpl criteriaBuilder, java.lang.Class<N> javaType, BinaryArithmeticOperation.Operation operator, javax.persistence.criteria.Expression<? extends N> lhs, N rhs)
criteriaBuilder - The builder for query components.javaType - The operation result typeoperator - The operator (type of operation).lhs - The left-hand operandrhs - The right-hand operand (the literal)public BinaryArithmeticOperation(CriteriaBuilderImpl criteriaBuilder, java.lang.Class<N> javaType, BinaryArithmeticOperation.Operation operator, N lhs, javax.persistence.criteria.Expression<? extends N> rhs)
criteriaBuilder - The builder for query components.javaType - The operation result typeoperator - The operator (type of operation).lhs - The left-hand operand (the literal)rhs - The right-hand operandpublic static java.lang.Class<? extends java.lang.Number> determineResultType(java.lang.Class<? extends java.lang.Number> argument1Type,
java.lang.Class<? extends java.lang.Number> argument2Type)
public static java.lang.Class<? extends java.lang.Number> determineResultType(java.lang.Class<? extends java.lang.Number> argument1Type,
java.lang.Class<? extends java.lang.Number> argument2Type,
boolean isQuotientOperation)
public static java.lang.Class<? extends java.lang.Number> determineReturnType(java.lang.Class<? extends java.lang.Number> defaultType,
javax.persistence.criteria.Expression<? extends java.lang.Number> expression)
defaultType - The default return type to use if we cannot determine the java type of 'expression' operand.expression - The operand.public static java.lang.Class<? extends java.lang.Number> determineReturnType(java.lang.Class<? extends java.lang.Number> defaultType,
java.lang.Number numberLiteral)
defaultType - The default return type to use if we cannot determine the java type of 'numberLiteral' operand.numberLiteral - The operand.public BinaryArithmeticOperation.Operation getOperator()
public javax.persistence.criteria.Expression<? extends N> getRightHandOperand()
BinaryOperatorExpressiongetRightHandOperand in interface BinaryOperatorExpression<N extends java.lang.Number>public javax.persistence.criteria.Expression<? extends N> getLeftHandOperand()
BinaryOperatorExpressiongetLeftHandOperand in interface BinaryOperatorExpression<N extends java.lang.Number>public void registerParameters(ParameterRegistry registry)
ParameterContainerregisterParameters in interface ParameterContainerregistry - The parameter registry with which to register.public java.lang.String render(RenderingContext renderingContext)
render in interface Renderablepublic java.lang.String renderProjection(RenderingContext renderingContext)
renderProjection in interface RenderableCopyright © 2001-2018 Red Hat, Inc. All Rights Reserved.