Class SqmEnumLiteral<E extends Enum<E>>
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<E>
org.hibernate.query.sqm.tree.expression.SqmEnumLiteral<E>
- All Implemented Interfaces:
Expression<E>
,Selection<E>
,TupleElement<E>
,Serializable
,BindableType<E>
,JpaCriteriaNode
,JpaExpression<E>
,JpaSelection<E>
,JpaTupleElement<E>
,SemanticPathPart
,SqmExpressible<E>
,SqmExpression<E>
,SqmSelectableNode<E>
,SqmExpressibleAccessor<E>
,SqmNode
,SqmTypedNode<E>
,SqmVisitableNode
public class SqmEnumLiteral<E extends Enum<E>>
extends SqmLiteral<E>
implements SqmExpressible<E>, SemanticPathPart
Specialized SQM literal defined by an enum reference. E.g.
".. where p.sex = Sex.MALE"
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionSqmEnumLiteral
(E enumValue, EnumJavaType<E> referencedEnumTypeDescriptor, String enumValueName, NodeBuilder nodeBuilder) -
Method Summary
Modifier and TypeMethodDescription<X> X
accept
(SemanticQueryWalker<X> walker) Accept the walker per visitationvoid
asDouble()
asFloat()
asLong()
asString()
copy
(SqmCopyContext context) The expected Java typeThe Java type descriptor for this expressibleSqmPath<?>
resolveIndexedAccess
(SqmExpression<?> selector, boolean isTerminal, SqmCreationState creationState) resolvePathPart
(String name, boolean isTerminal, SqmCreationState creationState) Methods inherited from class org.hibernate.query.sqm.tree.expression.SqmLiteral
appendHqlString, asLoggableText, getLiteralValue
Methods inherited from class org.hibernate.query.sqm.tree.expression.AbstractSqmExpression
applyInferableType, as, equalTo, equalTo, getJavaTypeDescriptor, in, in, in, in, internalApplyInferableType, isNotNull, isNull, nodeBuilder
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, getNodeType, 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.SqmExpressible
getRelationalJavaType, getTypeName, isInstance, resolveExpressible
Methods inherited from interface org.hibernate.query.sqm.tree.expression.SqmExpression
cast, castAs, getNodeType, 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
-
SqmEnumLiteral
public SqmEnumLiteral(E enumValue, EnumJavaType<E> referencedEnumTypeDescriptor, String enumValueName, NodeBuilder nodeBuilder)
-
-
Method Details
-
copy
-
getExpressible
- Specified by:
getExpressible
in interfaceSqmExpressibleAccessor<E extends Enum<E>>
- Specified by:
getExpressible
in interfaceSqmTypedNode<E extends Enum<E>>
-
getSqmType
- Specified by:
getSqmType
in interfaceSqmExpressible<E extends Enum<E>>
-
getEnumValue
-
getExpressibleJavaType
Description copied from interface:SqmExpressible
The Java type descriptor for this expressible- Specified by:
getExpressibleJavaType
in interfaceSqmExpressible<E extends Enum<E>>
-
getBindableJavaType
Description copied from interface:BindableType
The expected Java type- Specified by:
getBindableJavaType
in interfaceBindableType<E extends Enum<E>>
-
resolvePathPart
public SemanticPathPart resolvePathPart(String name, boolean isTerminal, SqmCreationState creationState) - Specified by:
resolvePathPart
in interfaceSemanticPathPart
-
resolveIndexedAccess
public SqmPath<?> resolveIndexedAccess(SqmExpression<?> selector, boolean isTerminal, SqmCreationState creationState) - Specified by:
resolveIndexedAccess
in interfaceSemanticPathPart
-
asLong
- Specified by:
asLong
in interfaceJpaExpression<E extends Enum<E>>
- Specified by:
asLong
in interfaceSqmExpression<E extends Enum<E>>
- Overrides:
asLong
in classAbstractSqmExpression<E extends Enum<E>>
-
asInteger
- Specified by:
asInteger
in interfaceJpaExpression<E extends Enum<E>>
- Specified by:
asInteger
in interfaceSqmExpression<E extends Enum<E>>
- Overrides:
asInteger
in classAbstractSqmExpression<E extends Enum<E>>
-
asFloat
- Specified by:
asFloat
in interfaceJpaExpression<E extends Enum<E>>
- Specified by:
asFloat
in interfaceSqmExpression<E extends Enum<E>>
- Overrides:
asFloat
in classAbstractSqmExpression<E extends Enum<E>>
-
asDouble
- Specified by:
asDouble
in interfaceJpaExpression<E extends Enum<E>>
- Specified by:
asDouble
in interfaceSqmExpression<E extends Enum<E>>
- Overrides:
asDouble
in classAbstractSqmExpression<E extends Enum<E>>
-
asBigDecimal
- Specified by:
asBigDecimal
in interfaceJpaExpression<E extends Enum<E>>
- Specified by:
asBigDecimal
in interfaceSqmExpression<E extends Enum<E>>
- Overrides:
asBigDecimal
in classAbstractSqmExpression<E extends Enum<E>>
-
asBigInteger
- Specified by:
asBigInteger
in interfaceJpaExpression<E extends Enum<E>>
- Specified by:
asBigInteger
in interfaceSqmExpression<E extends Enum<E>>
- Overrides:
asBigInteger
in classAbstractSqmExpression<E extends Enum<E>>
-
asString
- Specified by:
asString
in interfaceJpaExpression<E extends Enum<E>>
- Specified by:
asString
in interfaceSqmExpression<E extends Enum<E>>
- Overrides:
asString
in classAbstractSqmExpression<E extends Enum<E>>
-
accept
Description copied from interface:SqmVisitableNode
Accept the walker per visitation- Specified by:
accept
in interfaceSqmVisitableNode
- Overrides:
accept
in classSqmLiteral<E extends Enum<E>>
-
appendHqlString
- Specified by:
appendHqlString
in interfaceSqmVisitableNode
- Overrides:
appendHqlString
in classSqmLiteral<E extends Enum<E>>
-