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
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SqmFieldLiteral(Field field, JavaType<T> fieldJavaType, NodeBuilder nodeBuilder)
SqmFieldLiteral(T value, JavaType<T> fieldJavaType, String fieldName, NodeBuilder nodeBuilder)
-
Method Summary
-
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
-
Methods inherited from interface org.hibernate.query.criteria.JpaTupleElement
getJavaType, getJavaTypeName, isEnum
-
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, visitSubSelectableNodes
-
Methods inherited from interface org.hibernate.query.sqm.tree.SqmNode
asLoggableText
-
Methods inherited from interface org.hibernate.query.sqm.tree.select.SqmSelectableNode
getTupleLength
-
Methods inherited from interface org.hibernate.query.sqm.tree.SqmTypedNode
getExpressible, getNodeJavaType
-
Methods inherited from interface org.hibernate.query.sqm.tree.SqmVisitableNode
toHqlString
-
-
-
-
Constructor Detail
-
SqmFieldLiteral
public SqmFieldLiteral(Field field, JavaType<T> fieldJavaType, NodeBuilder nodeBuilder)
-
SqmFieldLiteral
public SqmFieldLiteral(T value, JavaType<T> fieldJavaType, String fieldName, NodeBuilder nodeBuilder)
-
-
Method Detail
-
copy
public SqmFieldLiteral<T> copy(SqmCopyContext context)
- Specified by:
copy
in interfaceSqmExpression<T>
- Specified by:
copy
in interfaceSqmNode
- Specified by:
copy
in interfaceSqmSelectableNode<T>
- Specified by:
copy
in interfaceSqmTypedNode<T>
-
getValue
public T getValue()
-
getFieldName
public String getFieldName()
-
getNodeBuilder
public NodeBuilder getNodeBuilder()
-
getNodeType
public SqmExpressible<T> getNodeType()
Description copied from interface:SqmExpression
The expression's type.Can change as a result of calls to
SqmExpression.applyInferableType(org.hibernate.query.sqm.SqmExpressible<?>)
- Specified by:
getNodeType
in interfaceSqmExpression<T>
- Specified by:
getNodeType
in interfaceSqmTypedNode<T>
-
applyInferableType
public void applyInferableType(@Nullable SqmExpressible<?> type)
Description copied from interface:SqmExpression
Used to apply type information based on the expression's usage within the query.- Specified by:
applyInferableType
in interfaceSqmExpression<T>
-
getExpressibleJavaType
public JavaType<T> getExpressibleJavaType()
Description copied from interface:SqmExpressible
The Java type descriptor for this expressible- Specified by:
getExpressibleJavaType
in interfaceSqmExpressible<T>
-
getJavaTypeDescriptor
public JavaType<T> getJavaTypeDescriptor()
- Specified by:
getJavaTypeDescriptor
in interfaceJpaTupleElement<T>
-
getBindableJavaType
public Class<T> getBindableJavaType()
Description copied from interface:BindableType
The expected Java type- Specified by:
getBindableJavaType
in interfaceBindableType<T>
-
accept
public <X> X accept(SemanticQueryWalker<X> walker)
Description copied from interface:SqmVisitableNode
Accept the walker per visitation- Specified by:
accept
in interfaceSqmVisitableNode
-
appendHqlString
public void appendHqlString(StringBuilder sb)
- Specified by:
appendHqlString
in interfaceSqmVisitableNode
-
nodeBuilder
public NodeBuilder nodeBuilder()
- Specified by:
nodeBuilder
in interfaceSqmNode
-
isNull
public SqmPredicate isNull()
- Specified by:
isNull
in interfaceExpression<T>
- Specified by:
isNull
in interfaceJpaExpression<T>
- Specified by:
isNull
in interfaceSqmExpression<T>
-
equalTo
public SqmPredicate equalTo(Expression<T> that)
- Specified by:
equalTo
in interfaceJpaExpression<T>
- Specified by:
equalTo
in interfaceSqmExpression<T>
-
equalTo
public SqmPredicate equalTo(T that)
- Specified by:
equalTo
in interfaceJpaExpression<T>
- Specified by:
equalTo
in interfaceSqmExpression<T>
-
isNotNull
public SqmPredicate isNotNull()
- Specified by:
isNotNull
in interfaceExpression<T>
- Specified by:
isNotNull
in interfaceJpaExpression<T>
- Specified by:
isNotNull
in interfaceSqmExpression<T>
-
in
public SqmPredicate in(Object... values)
- Specified by:
in
in interfaceExpression<T>
- Specified by:
in
in interfaceJpaExpression<T>
- Specified by:
in
in interfaceSqmExpression<T>
-
in
public SqmPredicate in(Expression<?>... values)
- Specified by:
in
in interfaceExpression<T>
- Specified by:
in
in interfaceJpaExpression<T>
- Specified by:
in
in interfaceSqmExpression<T>
-
in
public SqmPredicate in(Collection<?> values)
- Specified by:
in
in interfaceExpression<T>
- Specified by:
in
in interfaceJpaExpression<T>
- Specified by:
in
in interfaceSqmExpression<T>
-
in
public SqmPredicate in(Expression<Collection<?>> values)
- Specified by:
in
in interfaceExpression<T>
- Specified by:
in
in interfaceJpaExpression<T>
- Specified by:
in
in interfaceSqmExpression<T>
-
asLong
public SqmExpression<Long> asLong()
- Specified by:
asLong
in interfaceJpaExpression<T>
- Specified by:
asLong
in interfaceSqmExpression<T>
-
asInteger
public SqmExpression<Integer> asInteger()
- Specified by:
asInteger
in interfaceJpaExpression<T>
- Specified by:
asInteger
in interfaceSqmExpression<T>
-
asFloat
public SqmExpression<Float> asFloat()
- Specified by:
asFloat
in interfaceJpaExpression<T>
- Specified by:
asFloat
in interfaceSqmExpression<T>
-
asDouble
public SqmExpression<Double> asDouble()
- Specified by:
asDouble
in interfaceJpaExpression<T>
- Specified by:
asDouble
in interfaceSqmExpression<T>
-
asBigDecimal
public SqmExpression<BigDecimal> asBigDecimal()
- Specified by:
asBigDecimal
in interfaceJpaExpression<T>
- Specified by:
asBigDecimal
in interfaceSqmExpression<T>
-
asBigInteger
public SqmExpression<BigInteger> asBigInteger()
- Specified by:
asBigInteger
in interfaceJpaExpression<T>
- Specified by:
asBigInteger
in interfaceSqmExpression<T>
-
asString
public SqmExpression<String> asString()
- Specified by:
asString
in interfaceJpaExpression<T>
- Specified by:
asString
in interfaceSqmExpression<T>
-
as
public <X> SqmExpression<X> as(Class<X> type)
- Specified by:
as
in interfaceExpression<T>
- Specified by:
as
in interfaceJpaExpression<T>
- Specified by:
as
in interfaceSqmExpression<T>
-
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
-
isCompoundSelection
public boolean isCompoundSelection()
- Specified by:
isCompoundSelection
in interfaceSelection<T>
-
getSelectionItems
public List<? extends JpaSelection<?>> getSelectionItems()
- Specified by:
getSelectionItems
in interfaceJpaSelection<T>
-
alias
public JpaSelection<T> alias(String name)
-
getAlias
public String getAlias()
- Specified by:
getAlias
in interfaceTupleElement<T>
-
getSqmType
public DomainType<T> getSqmType()
- Specified by:
getSqmType
in interfaceSqmExpressible<T>
-
-