Class SqmFieldLiteral<T>
java.lang.Object
org.hibernate.query.sqm.tree.expression.SqmFieldLiteral<T>
- All Implemented Interfaces:
Expression<T>,Selection<T>,TupleElement<T>,Serializable,BindableType<T>,JpaCriteriaNode,JpaExpression<T>,JpaSelection<T>,JpaTupleElement<T>,SemanticPathPart,SqmExpressible<T>,SqmExpression<T>,SqmSelectableNode<T>,SqmExpressibleAccessor<T>,SqmNode,SqmTypedNode<T>,SqmVisitableNode
public class SqmFieldLiteral<T>
extends Object
implements SqmExpression<T>, SqmExpressible<T>, SqmSelectableNode<T>, SemanticPathPart
- Author:
- Steve Ebersole
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionSqmFieldLiteral(Field field, JavaType<T> fieldJavaType, NodeBuilder nodeBuilder) SqmFieldLiteral(T value, JavaType<T> fieldJavaType, String fieldName, NodeBuilder nodeBuilder) -
Method Summary
Modifier and TypeMethodDescription<X> Xaccept(SemanticQueryWalker<X> walker) Accept the walker per visitationAssigns an alias to the selection item.voidvoidapplyInferableType(@Nullable SqmExpressible<?> type) Used to apply type information based on the expression's usage within the query.<X> SqmExpression<X>Perform a typecast upon the expression, returning a new expression object.asDouble()asFloat()asLong()asString()copy(SqmCopyContext context) equalTo(Expression<T> that) getAlias()Return the alias assigned to the tuple element or null, if no alias has been assigned.The expected Java typeThe Java type descriptor for this expressibleThe expression's type.List<? extends JpaSelection<?>>getValue()in(Expression<?>... values) Create a predicate to test whether the expression is a member of the argument list.in(Expression<Collection<?>> values) Create a predicate to test whether the expression is a member of the collection.Create a predicate to test whether the expression is a member of the argument list.in(Collection<?> values) Create a predicate to test whether the expression is a member of the collection.booleanWhether the selection item is a compound selection.Create a predicate to test whether the expression is not null.isNull()Create a predicate to test whether the expression is null.SqmPath<?>resolveIndexedAccess(SqmExpression<?> selector, boolean isTerminal, SqmCreationState creationState) resolvePathPart(String name, boolean isTerminal, SqmCreationState creationState) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.query.criteria.JpaSelection
getCompoundSelectionItemsMethods inherited from interface org.hibernate.query.criteria.JpaTupleElement
getJavaType, getJavaTypeName, isEnumMethods inherited from interface org.hibernate.query.sqm.SqmExpressible
getRelationalJavaType, getTypeName, isInstance, resolveExpressibleMethods inherited from interface org.hibernate.query.sqm.tree.expression.SqmExpression
cast, castAs, visitSubSelectableNodesMethods inherited from interface org.hibernate.query.sqm.tree.SqmNode
asLoggableTextMethods 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
toHqlString
-
Constructor Details
-
SqmFieldLiteral
-
SqmFieldLiteral
public SqmFieldLiteral(T value, JavaType<T> fieldJavaType, String fieldName, NodeBuilder nodeBuilder)
-
-
Method Details
-
copy
- Specified by:
copyin interfaceSqmExpression<T>- Specified by:
copyin interfaceSqmNode- Specified by:
copyin interfaceSqmSelectableNode<T>- Specified by:
copyin interfaceSqmTypedNode<T>
-
getValue
-
getFieldName
-
getNodeBuilder
-
getNodeType
Description copied from interface:SqmExpressionThe expression's type.Can change as a result of calls to
SqmExpression.applyInferableType(org.hibernate.query.sqm.SqmExpressible<?>)- Specified by:
getNodeTypein interfaceSqmExpression<T>- Specified by:
getNodeTypein interfaceSqmTypedNode<T>
-
applyInferableType
Description copied from interface:SqmExpressionUsed to apply type information based on the expression's usage within the query.- Specified by:
applyInferableTypein interfaceSqmExpression<T>
-
getExpressibleJavaType
Description copied from interface:SqmExpressibleThe Java type descriptor for this expressible- Specified by:
getExpressibleJavaTypein interfaceSqmExpressible<T>
-
getJavaTypeDescriptor
- Specified by:
getJavaTypeDescriptorin interfaceJpaTupleElement<T>
-
getBindableJavaType
Description copied from interface:BindableTypeThe expected Java type- Specified by:
getBindableJavaTypein interfaceBindableType<T>
-
accept
Description copied from interface:SqmVisitableNodeAccept the walker per visitation- Specified by:
acceptin interfaceSqmVisitableNode
-
appendHqlString
- Specified by:
appendHqlStringin interfaceSqmVisitableNode
-
nodeBuilder
- Specified by:
nodeBuilderin interfaceSqmNode
-
isNull
Description copied from interface:ExpressionCreate a predicate to test whether the expression is null.- Specified by:
isNullin interfaceExpression<T>- Specified by:
isNullin interfaceJpaExpression<T>- Specified by:
isNullin interfaceSqmExpression<T>- Returns:
- predicate testing whether the expression is null
-
equalTo
- Specified by:
equalToin interfaceJpaExpression<T>- Specified by:
equalToin interfaceSqmExpression<T>
-
equalTo
- Specified by:
equalToin interfaceJpaExpression<T>- Specified by:
equalToin interfaceSqmExpression<T>
-
isNotNull
Description copied from interface:ExpressionCreate a predicate to test whether the expression is not null.- Specified by:
isNotNullin interfaceExpression<T>- Specified by:
isNotNullin interfaceJpaExpression<T>- Specified by:
isNotNullin interfaceSqmExpression<T>- Returns:
- predicate testing whether the expression is not null
-
in
Description copied from interface:ExpressionCreate a predicate to test whether the expression is a member of the argument list.- Specified by:
inin interfaceExpression<T>- Specified by:
inin interfaceJpaExpression<T>- Specified by:
inin interfaceSqmExpression<T>- Parameters:
values- values to be tested against- Returns:
- predicate testing for membership
-
in
Description copied from interface:ExpressionCreate a predicate to test whether the expression is a member of the argument list.- Specified by:
inin interfaceExpression<T>- Specified by:
inin interfaceJpaExpression<T>- Specified by:
inin interfaceSqmExpression<T>- Parameters:
values- expressions to be tested against- Returns:
- predicate testing for membership
-
in
Description copied from interface:ExpressionCreate a predicate to test whether the expression is a member of the collection.- Specified by:
inin interfaceExpression<T>- Specified by:
inin interfaceJpaExpression<T>- Specified by:
inin interfaceSqmExpression<T>- Parameters:
values- collection of values to be tested against- Returns:
- predicate testing for membership
-
in
Description copied from interface:ExpressionCreate a predicate to test whether the expression is a member of the collection.- Specified by:
inin interfaceExpression<T>- Specified by:
inin interfaceJpaExpression<T>- Specified by:
inin interfaceSqmExpression<T>- Parameters:
values- expression corresponding to collection to be tested against- Returns:
- predicate testing for membership
-
asLong
- Specified by:
asLongin interfaceJpaExpression<T>- Specified by:
asLongin interfaceSqmExpression<T>
-
asInteger
- Specified by:
asIntegerin interfaceJpaExpression<T>- Specified by:
asIntegerin interfaceSqmExpression<T>
-
asFloat
- Specified by:
asFloatin interfaceJpaExpression<T>- Specified by:
asFloatin interfaceSqmExpression<T>
-
asDouble
- Specified by:
asDoublein interfaceJpaExpression<T>- Specified by:
asDoublein interfaceSqmExpression<T>
-
asBigDecimal
- Specified by:
asBigDecimalin interfaceJpaExpression<T>- Specified by:
asBigDecimalin interfaceSqmExpression<T>
-
asBigInteger
- Specified by:
asBigIntegerin interfaceJpaExpression<T>- Specified by:
asBigIntegerin interfaceSqmExpression<T>
-
asString
- Specified by:
asStringin interfaceJpaExpression<T>- Specified by:
asStringin interfaceSqmExpression<T>
-
as
Description copied from interface:ExpressionPerform a typecast upon the expression, returning a new expression object. This method does not cause type conversion: the runtime type is not changed. Warning: may result in a runtime failure.- Specified by:
asin interfaceExpression<T>- Specified by:
asin interfaceJpaExpression<T>- Specified by:
asin interfaceSqmExpression<T>- Parameters:
type- intended type of the expression- Returns:
- new expression of the given type
-
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
-
isCompoundSelection
public boolean isCompoundSelection()Description copied from interface:SelectionWhether the selection item is a compound selection.- Specified by:
isCompoundSelectionin interfaceSelection<T>- Returns:
- boolean indicating whether the selection is a compound selection
-
getSelectionItems
- Specified by:
getSelectionItemsin interfaceJpaSelection<T>
-
alias
Description copied from interface:SelectionAssigns an alias to the selection item. Once assigned, an alias cannot be changed or reassigned. Returns the same selection item. -
getAlias
Description copied from interface:TupleElementReturn the alias assigned to the tuple element or null, if no alias has been assigned.- Specified by:
getAliasin interfaceTupleElement<T>- Returns:
- alias
-
getSqmType
- Specified by:
getSqmTypein interfaceSqmExpressible<T>
-