Class SqmEnumLiteral<E extends Enum<E>>
java.lang.Object
org.hibernate.query.sqm.tree.AbstractSqmNode
org.hibernate.query.sqm.tree.jpa.AbstractJpaTupleElement<E>
org.hibernate.query.sqm.tree.jpa.AbstractJpaSelection<E>
org.hibernate.query.sqm.tree.expression.AbstractSqmExpression<E>
org.hibernate.query.sqm.tree.expression.SqmLiteral<E>
org.hibernate.query.sqm.tree.expression.SqmEnumLiteral<E>
- All Implemented Interfaces:
Expression<E>, Selection<E>, Type<E>, TupleElement<E>, Serializable, JpaCriteriaNode, JpaExpression<E>, JpaSelection<E>, JpaTupleElement<E>, SemanticPathPart, SqmBindableType<E>, SqmExpressible<E>, SqmExpression<E>, SqmSelectableNode<E>, SqmCacheable, SqmExpressibleAccessor<E>, SqmNode, SqmTypedNode<E>, SqmVisitableNode, BindableType<E>
public class SqmEnumLiteral<E extends Enum<E>>
extends SqmLiteral<E>
implements SqmBindableType<E>, SemanticPathPart
Specialized SQM literal defined by an enum reference. E.g.
".. where p.sex = Sex.MALE"- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface Type
Type.PersistenceType -
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionSqmEnumLiteral(E enumValue, EnumJavaType<E> referencedEnumTypeDescriptor, String enumValueName, NodeBuilder nodeBuilder) -
Method Summary
Modifier and TypeMethodDescription<X> Xaccept(SemanticQueryWalker<X> walker) Accept the walker per visitationvoidappendHqlString(StringBuilder hql, SqmRenderContext context) asDouble()asFloat()asLong()asString()copy(SqmCopyContext context) The Java type descriptor for this expressible@NonNull SqmBindableType<E> The expression's type.@Nullable SqmDomainType<E> SqmPath<?> resolveIndexedAccess(SqmExpression<?> selector, boolean isTerminal, SqmCreationState creationState) resolvePathPart(String name, boolean isTerminal, SqmCreationState creationState) Methods inherited from class SqmLiteral
appendHqlString, asLoggableText, cacheHashCode, equals, getLiteralValue, hashCode, isCompatibleMethods inherited from class AbstractSqmExpression
applyInferableType, as, cast, equalTo, equalTo, getJavaTypeDescriptor, in, in, in, in, internalApplyInferableType, isNotNull, isNull, nodeBuilder, notEqualTo, notEqualToMethods inherited from class AbstractJpaSelection
alias, getSelectionItems, isCompoundSelectionMethods inherited from class AbstractJpaTupleElement
copyTo, getAlias, setAlias, setExpressibleTypeMethods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface JpaSelection
alias, getCompoundSelectionItems, getSelectionItemsMethods inherited from interface JpaTupleElement
getJavaTypeName, isEnumMethods inherited from interface Selection
isCompoundSelectionMethods inherited from interface SqmBindableType
resolveExpressibleMethods inherited from interface SqmExpressible
getRelationalJavaType, getTypeNameMethods inherited from interface SqmExpression
castAs, visitSubSelectableNodesMethods inherited from interface SqmSelectableNode
getTupleLengthMethods inherited from interface SqmTypedNode
getNodeJavaTypeMethods inherited from interface SqmVisitableNode
toHqlStringMethods inherited from interface TupleElement
getAlias
-
Constructor Details
-
SqmEnumLiteral
public SqmEnumLiteral(E enumValue, EnumJavaType<E> referencedEnumTypeDescriptor, String enumValueName, NodeBuilder nodeBuilder)
-
-
Method Details
-
copy
-
getExpressible
- Specified by:
getExpressiblein interfaceSqmExpressibleAccessor<E extends Enum<E>>- Specified by:
getExpressiblein interfaceSqmTypedNode<E extends Enum<E>>
-
getNodeType
Description copied from interface:SqmExpressionThe expression's type.Can change as a result of calls to
SqmExpression.applyInferableType(SqmBindableType)- Specified by:
getNodeTypein interfaceSqmExpression<E extends Enum<E>>- Specified by:
getNodeTypein interfaceSqmTypedNode<E extends Enum<E>>- Overrides:
getNodeTypein classAbstractJpaTupleElement<E extends Enum<E>>
-
getPersistenceType
- Specified by:
getPersistenceTypein interfaceType<E extends Enum<E>>
-
getSqmType
- Specified by:
getSqmTypein interfaceSqmExpressible<E extends Enum<E>>
-
getEnumValue
-
getExpressibleJavaType
Description copied from interface:SqmExpressibleThe Java type descriptor for this expressible- Specified by:
getExpressibleJavaTypein interfaceSqmExpressible<E extends Enum<E>>
-
getJavaType
- Specified by:
getJavaTypein interfaceJpaTupleElement<E extends Enum<E>>- Specified by:
getJavaTypein interfaceTupleElement<E extends Enum<E>>- Specified by:
getJavaTypein interfaceType<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
- Specified by:
asLongin interfaceJpaExpression<E extends Enum<E>>- Specified by:
asLongin interfaceSqmExpression<E extends Enum<E>>
-
asInteger
- Specified by:
asIntegerin interfaceJpaExpression<E extends Enum<E>>- Specified by:
asIntegerin interfaceSqmExpression<E extends Enum<E>>
-
asFloat
- Specified by:
asFloatin interfaceJpaExpression<E extends Enum<E>>- Specified by:
asFloatin interfaceSqmExpression<E extends Enum<E>>
-
asDouble
- Specified by:
asDoublein interfaceJpaExpression<E extends Enum<E>>- Specified by:
asDoublein interfaceSqmExpression<E extends Enum<E>>
-
asBigDecimal
- Specified by:
asBigDecimalin interfaceJpaExpression<E extends Enum<E>>- Specified by:
asBigDecimalin interfaceSqmExpression<E extends Enum<E>>
-
asBigInteger
- Specified by:
asBigIntegerin interfaceJpaExpression<E extends Enum<E>>- Specified by:
asBigIntegerin interfaceSqmExpression<E extends Enum<E>>
-
asString
- Specified by:
asStringin interfaceJpaExpression<E extends Enum<E>>- Specified by:
asStringin interfaceSqmExpression<E extends Enum<E>>
-
accept
Description copied from interface:SqmVisitableNodeAccept the walker per visitation- Specified by:
acceptin interfaceSqmVisitableNode- Overrides:
acceptin classSqmLiteral<E extends Enum<E>>
-
appendHqlString
- Specified by:
appendHqlStringin interfaceSqmVisitableNode- Overrides:
appendHqlStringin classSqmLiteral<E extends Enum<E>>
-