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> Xaccept(SemanticQueryWalker<X> walker)Accept the walker per visitationvoidappendHqlString(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 typeEgetEnumValue()SqmExpressible<E>getExpressible()EnumJavaType<E>getExpressibleJavaType()The Java type descriptor for this expressibleDomainType<E>getSqmType()SqmPath<?>resolveIndexedAccess(SqmExpression<?> selector, boolean isTerminal, SqmCreationState creationState)SemanticPathPartresolvePathPart(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
alias, applyInferableType, as, getJavaTypeDescriptor, in, in, in, in, internalApplyInferableType, isNotNull, isNull, nodeBuilder
-
Methods inherited from class org.hibernate.query.sqm.tree.jpa.AbstractJpaSelection
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
getCompoundSelectionItems, getSelectionItems
-
Methods inherited from interface org.hibernate.query.criteria.JpaTupleElement
getJavaType
-
Methods inherited from interface jakarta.persistence.criteria.Selection
isCompoundSelection
-
Methods inherited from interface org.hibernate.query.sqm.SqmExpressible
getRelationalJavaType, isInstance, resolveExpressible
-
Methods inherited from interface org.hibernate.query.sqm.tree.expression.SqmExpression
castAs, getNodeType, visitSubSelectableNodes
-
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:
getExpressiblein interfaceSqmExpressibleAccessor<E extends Enum<E>>- Specified by:
getExpressiblein interfaceSqmTypedNode<E extends Enum<E>>
-
getSqmType
public DomainType<E> getSqmType()
- Specified by:
getSqmTypein interfaceSqmExpressible<E extends Enum<E>>
-
getEnumValue
public E getEnumValue()
-
getExpressibleJavaType
public EnumJavaType<E> getExpressibleJavaType()
Description copied from interface:SqmExpressibleThe Java type descriptor for this expressible- Specified by:
getExpressibleJavaTypein interfaceSqmExpressible<E extends Enum<E>>
-
getBindableJavaType
public Class<E> getBindableJavaType()
Description copied from interface:BindableTypeThe expected Java type- Specified by:
getBindableJavaTypein interfaceBindableType<E extends Enum<E>>
-
resolvePathPart
public SemanticPathPart resolvePathPart(String name, boolean isTerminal, SqmCreationState creationState)
- Specified by:
resolvePathPartin interfaceSemanticPathPart
-
resolveIndexedAccess
public SqmPath<?> resolveIndexedAccess(SqmExpression<?> selector, boolean isTerminal, SqmCreationState creationState)
- Specified by:
resolveIndexedAccessin interfaceSemanticPathPart
-
asLong
public SqmExpression<Long> asLong()
- Specified by:
asLongin interfaceJpaExpression<E extends Enum<E>>- Specified by:
asLongin interfaceSqmExpression<E extends Enum<E>>- Overrides:
asLongin classAbstractSqmExpression<E extends Enum<E>>
-
asInteger
public SqmExpression<Integer> asInteger()
- Specified by:
asIntegerin interfaceJpaExpression<E extends Enum<E>>- Specified by:
asIntegerin interfaceSqmExpression<E extends Enum<E>>- Overrides:
asIntegerin classAbstractSqmExpression<E extends Enum<E>>
-
asFloat
public SqmExpression<Float> asFloat()
- Specified by:
asFloatin interfaceJpaExpression<E extends Enum<E>>- Specified by:
asFloatin interfaceSqmExpression<E extends Enum<E>>- Overrides:
asFloatin classAbstractSqmExpression<E extends Enum<E>>
-
asDouble
public SqmExpression<Double> asDouble()
- Specified by:
asDoublein interfaceJpaExpression<E extends Enum<E>>- Specified by:
asDoublein interfaceSqmExpression<E extends Enum<E>>- Overrides:
asDoublein classAbstractSqmExpression<E extends Enum<E>>
-
asBigDecimal
public SqmExpression<BigDecimal> asBigDecimal()
- Specified by:
asBigDecimalin interfaceJpaExpression<E extends Enum<E>>- Specified by:
asBigDecimalin interfaceSqmExpression<E extends Enum<E>>- Overrides:
asBigDecimalin classAbstractSqmExpression<E extends Enum<E>>
-
asBigInteger
public SqmExpression<BigInteger> asBigInteger()
- Specified by:
asBigIntegerin interfaceJpaExpression<E extends Enum<E>>- Specified by:
asBigIntegerin interfaceSqmExpression<E extends Enum<E>>- Overrides:
asBigIntegerin classAbstractSqmExpression<E extends Enum<E>>
-
asString
public SqmExpression<String> asString()
- Specified by:
asStringin interfaceJpaExpression<E extends Enum<E>>- Specified by:
asStringin interfaceSqmExpression<E extends Enum<E>>- Overrides:
asStringin classAbstractSqmExpression<E extends Enum<E>>
-
accept
public <X> X accept(SemanticQueryWalker<X> walker)
Description copied from interface:SqmVisitableNodeAccept the walker per visitation- Specified by:
acceptin interfaceSqmVisitableNode- Overrides:
acceptin classSqmLiteral<E extends Enum<E>>
-
appendHqlString
public void appendHqlString(StringBuilder sb)
- Specified by:
appendHqlStringin interfaceSqmVisitableNode- Overrides:
appendHqlStringin classSqmLiteral<E extends Enum<E>>
-
-