Class SqmHqlNumericLiteral<N extends Number>
java.lang.Object
org.hibernate.query.sqm.tree.AbstractSqmNode
org.hibernate.query.sqm.tree.jpa.AbstractJpaTupleElement<N>
org.hibernate.query.sqm.tree.jpa.AbstractJpaSelection<N>
org.hibernate.query.sqm.tree.expression.AbstractSqmExpression<N>
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> Xaccept(SemanticQueryWalker<X> walker) Accept the walker per visitationvoidappendHqlString(StringBuilder hql, SqmRenderContext context) copy(SqmCopyContext context) Methods inherited from class org.hibernate.query.sqm.tree.expression.SqmLiteral
appendHqlString, equals, hashCodeMethods 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, notEqualToMethods inherited from class org.hibernate.query.sqm.tree.jpa.AbstractJpaSelection
alias, getSelectionItems, isCompoundSelectionMethods inherited from class org.hibernate.query.sqm.tree.jpa.AbstractJpaTupleElement
copyTo, getAlias, getNodeType, setAlias, setExpressibleTypeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.query.criteria.JpaSelection
alias, getCompoundSelectionItems, getSelectionItemsMethods inherited from interface org.hibernate.query.criteria.JpaTupleElement
getJavaType, getJavaTypeName, isEnumMethods inherited from interface jakarta.persistence.criteria.Selection
isCompoundSelectionMethods inherited from interface org.hibernate.query.sqm.tree.expression.SqmExpression
castAs, getNodeType, visitSubSelectableNodesMethods inherited from interface org.hibernate.query.sqm.tree.select.SqmSelectableNode
getTupleLengthMethods inherited from interface org.hibernate.query.sqm.tree.SqmTypedNode
getExpressible, getNodeJavaTypeMethods inherited from interface org.hibernate.query.sqm.tree.SqmVisitableNode
toHqlStringMethods 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:
getLiteralValuein classSqmLiteral<N extends Number>
-
getTypeCategory
-
accept
Description copied from interface:SqmVisitableNodeAccept the walker per visitation- Specified by:
acceptin interfaceSqmVisitableNode- Overrides:
acceptin classSqmLiteral<N extends Number>
-
appendHqlString
- Specified by:
appendHqlStringin interfaceSqmVisitableNode- Overrides:
appendHqlStringin classSqmLiteral<N extends Number>
-
asLoggableText
- Specified by:
asLoggableTextin interfaceSqmNode- Overrides:
asLoggableTextin classSqmLiteral<N extends Number>
-
copy
- Specified by:
copyin interfaceSqmExpression<N extends Number>- Specified by:
copyin interfaceSqmNode- Specified by:
copyin interfaceSqmSelectableNode<N extends Number>- Specified by:
copyin interfaceSqmTypedNode<N extends Number>- Overrides:
copyin classSqmLiteral<N extends Number>
-