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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SqmEnumLiteral(E enumValue, EnumJavaType<E> referencedEnumTypeDescriptor, String enumValueName, NodeBuilder nodeBuilder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <X> X
accept(SemanticQueryWalker<X> walker)
Accept the walker per visitationvoid
appendHqlString(StringBuilder sb)
SqmExpression<BigDecimal>
asBigDecimal()
SqmExpression<BigInteger>
asBigInteger()
SqmExpression<Double>
asDouble()
SqmExpression<Float>
asFloat()
SqmExpression<Integer>
asInteger()
SqmExpression<Long>
asLong()
SqmExpression<String>
asString()
SqmEnumLiteral<E>
copy(SqmCopyContext context)
Class<E>
getBindableJavaType()
The expected Java typeE
getEnumValue()
SqmExpressible<E>
getExpressible()
EnumJavaType<E>
getExpressibleJavaType()
The Java type descriptor for this expressibleDomainType<E>
getSqmType()
SqmPath<?>
resolveIndexedAccess(SqmExpression<?> selector, boolean isTerminal, SqmCreationState creationState)
SemanticPathPart
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 Detail
-
SqmEnumLiteral
public SqmEnumLiteral(E enumValue, EnumJavaType<E> referencedEnumTypeDescriptor, String enumValueName, NodeBuilder nodeBuilder)
-
-
Method Detail
-
copy
public SqmEnumLiteral<E> copy(SqmCopyContext context)
-
getExpressible
public SqmExpressible<E> getExpressible()
- Specified by:
getExpressible
in interfaceSqmExpressibleAccessor<E extends Enum<E>>
- Specified by:
getExpressible
in interfaceSqmTypedNode<E extends Enum<E>>
-
getSqmType
public DomainType<E> getSqmType()
- Specified by:
getSqmType
in interfaceSqmExpressible<E extends Enum<E>>
-
getEnumValue
public E getEnumValue()
-
getExpressibleJavaType
public EnumJavaType<E> getExpressibleJavaType()
Description copied from interface:SqmExpressible
The Java type descriptor for this expressible- Specified by:
getExpressibleJavaType
in interfaceSqmExpressible<E extends Enum<E>>
-
getBindableJavaType
public Class<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
public SqmExpression<Long> 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
public SqmExpression<Integer> 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
public SqmExpression<Float> 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
public SqmExpression<Double> 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
public SqmExpression<BigDecimal> 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
public SqmExpression<BigInteger> 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
public SqmExpression<String> 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
public <X> X accept(SemanticQueryWalker<X> walker)
Description copied from interface:SqmVisitableNode
Accept the walker per visitation- Specified by:
accept
in interfaceSqmVisitableNode
- Overrides:
accept
in classSqmLiteral<E extends Enum<E>>
-
appendHqlString
public void appendHqlString(StringBuilder sb)
- Specified by:
appendHqlString
in interfaceSqmVisitableNode
- Overrides:
appendHqlString
in classSqmLiteral<E extends Enum<E>>
-
-