Class SqmHqlNumericLiteral<N extends Number>
java.lang.Object
org.hibernate.query.sqm.tree.AbstractSqmNode
org.hibernate.query.sqm.tree.jpa.AbstractJpaTupleElement<T>
org.hibernate.query.sqm.tree.jpa.AbstractJpaSelection<T>
org.hibernate.query.sqm.tree.expression.AbstractSqmExpression<T>
org.hibernate.query.sqm.tree.expression.SqmLiteral<N>
org.hibernate.query.sqm.tree.expression.SqmHqlNumericLiteral<N>
- All Implemented Interfaces:
Expression<N>
,Selection<N>
,TupleElement<N>
,Serializable
,JpaCriteriaNode
,JpaExpression<N>
,JpaSelection<N>
,JpaTupleElement<N>
,SqmExpression<N>
,SqmSelectableNode<N>
,SqmExpressibleAccessor<N>
,SqmNode
,SqmTypedNode<N>
,SqmVisitableNode
Used to model numeric literals found in HQL queries.
Used instead of
SqmLiteral
which would require parsing the
literal value to the specified number type to avoid loss of precision
due to Float and Double being non-exact types.- See Also:
- API Note:
- Only used for HQL literals because we do not have this problem with criteria queries where the value given us by user would already be typed.
-
Nested Class Summary
Nested Classes -
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionSqmHqlNumericLiteral
(String literalValue, BasicDomainType<N> type, NodeBuilder criteriaBuilder) SqmHqlNumericLiteral
(String literalValue, NumericTypeCategory typeCategory, BasicDomainType<N> type, NodeBuilder criteriaBuilder) -
Method Summary
Modifier and TypeMethodDescription<X> X
accept
(SemanticQueryWalker<X> walker) Accept the walker per visitationvoid
copy
(SqmCopyContext context) The expression's type.Methods inherited from class org.hibernate.query.sqm.tree.expression.SqmLiteral
appendHqlString
Methods inherited from class org.hibernate.query.sqm.tree.expression.AbstractSqmExpression
applyInferableType, as, asBigDecimal, asBigInteger, asDouble, asFloat, asInteger, asLong, asString, cast, equalTo, equalTo, getJavaTypeDescriptor, in, in, in, in, internalApplyInferableType, isNotNull, isNull, nodeBuilder, notEqualTo, notEqualTo
Methods inherited from class org.hibernate.query.sqm.tree.jpa.AbstractJpaSelection
alias, getSelectionItems, isCompoundSelection
Methods inherited from class org.hibernate.query.sqm.tree.jpa.AbstractJpaTupleElement
copyTo, getAlias, setAlias, setExpressibleType
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.hibernate.query.criteria.JpaSelection
alias, getCompoundSelectionItems, getSelectionItems
Methods inherited from interface org.hibernate.query.criteria.JpaTupleElement
getJavaType, getJavaTypeName, isEnum
Methods inherited from interface jakarta.persistence.criteria.Selection
isCompoundSelection
Methods inherited from interface org.hibernate.query.sqm.tree.expression.SqmExpression
castAs, visitSubSelectableNodes
Methods inherited from interface org.hibernate.query.sqm.tree.select.SqmSelectableNode
getTupleLength
Methods inherited from interface org.hibernate.query.sqm.tree.SqmTypedNode
getNodeJavaType
Methods inherited from interface org.hibernate.query.sqm.tree.SqmVisitableNode
toHqlString
Methods inherited from interface jakarta.persistence.TupleElement
getAlias
-
Constructor Details
-
SqmHqlNumericLiteral
public SqmHqlNumericLiteral(String literalValue, BasicDomainType<N> type, NodeBuilder criteriaBuilder) -
SqmHqlNumericLiteral
public SqmHqlNumericLiteral(String literalValue, NumericTypeCategory typeCategory, BasicDomainType<N> type, NodeBuilder criteriaBuilder)
-
-
Method Details
-
getUnparsedLiteralValue
-
getLiteralValue
- Overrides:
getLiteralValue
in classSqmLiteral<N extends Number>
-
getTypeCategory
-
getNodeType
Description copied from interface:SqmExpression
The expression's type.Can change as a result of calls to
SqmExpression.applyInferableType(org.hibernate.query.sqm.SqmExpressible<?>)
- Specified by:
getNodeType
in interfaceSqmExpression<N extends Number>
- Specified by:
getNodeType
in interfaceSqmTypedNode<N extends Number>
- Overrides:
getNodeType
in classAbstractJpaTupleElement<N extends Number>
-
getExpressible
-
accept
Description copied from interface:SqmVisitableNode
Accept the walker per visitation- Specified by:
accept
in interfaceSqmVisitableNode
- Overrides:
accept
in classSqmLiteral<N extends Number>
-
appendHqlString
- Specified by:
appendHqlString
in interfaceSqmVisitableNode
- Overrides:
appendHqlString
in classSqmLiteral<N extends Number>
-
asLoggableText
- Specified by:
asLoggableText
in interfaceSqmNode
- Overrides:
asLoggableText
in classSqmLiteral<N extends Number>
-
copy
- Specified by:
copy
in interfaceSqmExpression<N extends Number>
- Specified by:
copy
in interfaceSqmNode
- Specified by:
copy
in interfaceSqmSelectableNode<N extends Number>
- Specified by:
copy
in interfaceSqmTypedNode<N extends Number>
- Overrides:
copy
in classSqmLiteral<N extends Number>
-