类 BinaryArithmeticOperation<N extends Number>
- java.lang.Object
-
- org.hibernate.query.criteria.internal.AbstractNode
-
- org.hibernate.query.criteria.internal.expression.AbstractTupleElement<X>
-
- org.hibernate.query.criteria.internal.expression.SelectionImpl<T>
-
- org.hibernate.query.criteria.internal.expression.ExpressionImpl<N>
-
- org.hibernate.query.criteria.internal.expression.BinaryArithmeticOperation<N>
-
- 所有已实现的接口:
Serializable,javax.persistence.criteria.Expression<N>,javax.persistence.criteria.Selection<N>,javax.persistence.TupleElement<N>,BinaryOperatorExpression<N>,ExpressionImplementor<N>,ParameterContainer,Renderable,SelectionImplementor<N>,TupleElementImplementor<N>
public class BinaryArithmeticOperation<N extends Number> extends ExpressionImpl<N> implements BinaryOperatorExpression<N>, Serializable
Models standard arithmetic operations with two operands.- 作者:
- Steve Ebersole
- 另请参阅:
- 序列化表格
-
-
嵌套类概要
嵌套类 修饰符和类型 类 说明 static classBinaryArithmeticOperation.Operation-
从接口继承的嵌套类/接口 org.hibernate.query.criteria.internal.ParameterContainer
ParameterContainer.Helper
-
-
构造器概要
构造器 构造器 说明 BinaryArithmeticOperation(CriteriaBuilderImpl criteriaBuilder, Class<N> resultType, BinaryArithmeticOperation.Operation operator, javax.persistence.criteria.Expression<? extends N> lhs, javax.persistence.criteria.Expression<? extends N> rhs)Creates an arithmetic operation based on 2 expressions.BinaryArithmeticOperation(CriteriaBuilderImpl criteriaBuilder, Class<N> javaType, BinaryArithmeticOperation.Operation operator, javax.persistence.criteria.Expression<? extends N> lhs, N rhs)Creates an arithmetic operation based on an expression and a literal.BinaryArithmeticOperation(CriteriaBuilderImpl criteriaBuilder, 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.
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 static Class<? extends Number>determineResultType(Class<? extends Number> argument1Type, Class<? extends Number> argument2Type)static Class<? extends Number>determineResultType(Class<? extends Number> argument1Type, Class<? extends Number> argument2Type, boolean isQuotientOperation)static Class<? extends Number>determineReturnType(Class<? extends Number> defaultType, Number numberLiteral)Helper for determining the appropriate operation return type based on one of the operands as a literal.static Class<? extends Number>determineReturnType(Class<? extends Number> defaultType, javax.persistence.criteria.Expression<? extends Number> expression)Helper for determining the appropriate operation return type based on one of the operands as an expression.javax.persistence.criteria.Expression<? extends N>getLeftHandOperand()Get the left-hand operand.BinaryArithmeticOperation.OperationgetOperator()javax.persistence.criteria.Expression<? extends N>getRightHandOperand()Get the right-hand operand.voidregisterParameters(ParameterRegistry registry)Register any parameters contained within this query component with the given registry.Stringrender(RenderingContext renderingContext)Perform the rendering, returning the rendition-
从类继承的方法 org.hibernate.query.criteria.internal.expression.ExpressionImpl
as, asBigDecimal, asBigInteger, asDouble, asFloat, asInteger, asLong, asString, in, in, in, in, isNotNull, isNull
-
从类继承的方法 org.hibernate.query.criteria.internal.expression.SelectionImpl
alias, getCompoundSelectionItems, getValueHandlers, isCompoundSelection
-
从类继承的方法 org.hibernate.query.criteria.internal.expression.AbstractTupleElement
forceConversion, getAlias, getJavaType, getValueHandler, resetJavaType, setAlias
-
从类继承的方法 org.hibernate.query.criteria.internal.AbstractNode
criteriaBuilder
-
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
从接口继承的方法 org.hibernate.query.criteria.internal.SelectionImplementor
getValueHandlers
-
从接口继承的方法 org.hibernate.query.criteria.internal.TupleElementImplementor
getValueHandler
-
-
-
-
构造器详细资料
-
BinaryArithmeticOperation
public BinaryArithmeticOperation(CriteriaBuilderImpl criteriaBuilder, Class<N> resultType, BinaryArithmeticOperation.Operation operator, javax.persistence.criteria.Expression<? extends N> lhs, javax.persistence.criteria.Expression<? extends N> rhs)
Creates an arithmetic operation based on 2 expressions.- 参数:
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 operand
-
BinaryArithmeticOperation
public BinaryArithmeticOperation(CriteriaBuilderImpl criteriaBuilder, Class<N> javaType, BinaryArithmeticOperation.Operation operator, javax.persistence.criteria.Expression<? extends N> lhs, N rhs)
Creates an arithmetic operation based on an expression and a literal.- 参数:
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)
-
BinaryArithmeticOperation
public BinaryArithmeticOperation(CriteriaBuilderImpl criteriaBuilder, 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.- 参数:
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 operand
-
-
方法详细资料
-
determineResultType
public static Class<? extends Number> determineResultType(Class<? extends Number> argument1Type, Class<? extends Number> argument2Type)
-
determineResultType
public static Class<? extends Number> determineResultType(Class<? extends Number> argument1Type, Class<? extends Number> argument2Type, boolean isQuotientOperation)
-
determineReturnType
public static Class<? extends Number> determineReturnType(Class<? extends Number> defaultType, javax.persistence.criteria.Expression<? extends Number> expression)
Helper for determining the appropriate operation return type based on one of the operands as an expression.- 参数:
defaultType- The default return type to use if we cannot determine the java type of 'expression' operand.expression- The operand.- 返回:
- The appropriate return type.
-
determineReturnType
public static Class<? extends Number> determineReturnType(Class<? extends Number> defaultType, Number numberLiteral)
Helper for determining the appropriate operation return type based on one of the operands as a literal.- 参数:
defaultType- The default return type to use if we cannot determine the java type of 'numberLiteral' operand.numberLiteral- The operand.- 返回:
- The appropriate return type.
-
getOperator
public BinaryArithmeticOperation.Operation getOperator()
-
getRightHandOperand
public javax.persistence.criteria.Expression<? extends N> getRightHandOperand()
从接口复制的说明:BinaryOperatorExpressionGet the right-hand operand.- 指定者:
getRightHandOperand在接口中BinaryOperatorExpression<N extends Number>- 返回:
- The right-hand operand.
-
getLeftHandOperand
public javax.persistence.criteria.Expression<? extends N> getLeftHandOperand()
从接口复制的说明:BinaryOperatorExpressionGet the left-hand operand.- 指定者:
getLeftHandOperand在接口中BinaryOperatorExpression<N extends Number>- 返回:
- The left-hand operand.
-
registerParameters
public void registerParameters(ParameterRegistry registry)
从接口复制的说明:ParameterContainerRegister any parameters contained within this query component with the given registry.- 指定者:
registerParameters在接口中ParameterContainer- 参数:
registry- The parameter registry with which to register.
-
render
public String render(RenderingContext renderingContext)
从接口复制的说明:RenderablePerform the rendering, returning the rendition- 指定者:
render在接口中Renderable
-
-