Class SqmDynamicInstantiation<T>
- 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.select.SqmDynamicInstantiation<T>
-
- All Implemented Interfaces:
CompoundSelection<T>
,Selection<T>
,TupleElement<T>
,Serializable
,JpaCompoundSelection<T>
,JpaCriteriaNode
,JpaSelection<T>
,JpaTupleElement<T>
,SqmAliasedExpressionContainer<SqmDynamicInstantiationArgument<?>>
,SqmSelectableNode<T>
,SqmExpressibleAccessor<T>
,SqmNode
,SqmTypedNode<T>
,SqmVisitableNode
public class SqmDynamicInstantiation<T> extends AbstractJpaSelection<T> implements SqmSelectableNode<T>, SqmAliasedExpressionContainer<SqmDynamicInstantiationArgument<?>>, JpaCompoundSelection<T>
Represents a dynamic instantiation (select new XYZ(...) ...
) as part of the SQM.- See Also:
- Serialized Form
-
-
Method Summary
-
Methods inherited from class org.hibernate.query.sqm.tree.jpa.AbstractJpaSelection
alias, isCompoundSelection
-
Methods inherited from class org.hibernate.query.sqm.tree.jpa.AbstractJpaTupleElement
copyTo, getAlias, getNodeType, setAlias, setExpressibleType
-
Methods inherited from class org.hibernate.query.sqm.tree.AbstractSqmNode
nodeBuilder
-
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
-
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.tree.SqmNode
nodeBuilder
-
Methods inherited from interface org.hibernate.query.sqm.tree.select.SqmSelectableNode
getTupleLength
-
Methods inherited from interface org.hibernate.query.sqm.tree.SqmTypedNode
getExpressible, getNodeJavaType, getNodeType
-
Methods inherited from interface org.hibernate.query.sqm.tree.SqmVisitableNode
toHqlString
-
Methods inherited from interface jakarta.persistence.TupleElement
getAlias
-
-
-
-
Method Detail
-
forClassInstantiation
public static <R> SqmDynamicInstantiation<R> forClassInstantiation(JavaType<R> targetJavaType, NodeBuilder nodeBuilder)
-
forClassInstantiation
public static <R> SqmDynamicInstantiation<R> forClassInstantiation(Class<R> targetJavaType, NodeBuilder nodeBuilder)
-
forMapInstantiation
public static <M extends Map<?,?>> SqmDynamicInstantiation<M> forMapInstantiation(JavaType<M> mapJavaType, NodeBuilder nodeBuilder)
-
forMapInstantiation
public static <M extends Map<?,?>> SqmDynamicInstantiation<M> forMapInstantiation(NodeBuilder nodeBuilder)
-
forListInstantiation
public static <L extends List<?>> SqmDynamicInstantiation<L> forListInstantiation(JavaType<L> listJavaType, NodeBuilder nodeBuilder)
-
forListInstantiation
public static <L extends List<?>> SqmDynamicInstantiation<L> forListInstantiation(NodeBuilder nodeBuilder)
-
checkInstantiation
public boolean checkInstantiation(TypeConfiguration typeConfiguration)
-
isFullyAliased
public boolean isFullyAliased()
-
copy
public SqmDynamicInstantiation<T> copy(SqmCopyContext context)
- Specified by:
copy
in interfaceSqmNode
- Specified by:
copy
in interfaceSqmSelectableNode<T>
- Specified by:
copy
in interfaceSqmTypedNode<T>
-
getInstantiationTarget
public SqmDynamicInstantiationTarget<T> getInstantiationTarget()
-
getArguments
public List<SqmDynamicInstantiationArgument<?>> getArguments()
-
getJavaTypeDescriptor
public JavaType<T> getJavaTypeDescriptor()
- Specified by:
getJavaTypeDescriptor
in interfaceJpaTupleElement<T>
-
asLoggableText
public String asLoggableText()
- Specified by:
asLoggableText
in interfaceSqmNode
-
addArgument
public void addArgument(SqmDynamicInstantiationArgument<?> argument)
-
add
public SqmDynamicInstantiationArgument<?> add(SqmExpression<?> expression, String alias)
- Specified by:
add
in interfaceSqmAliasedExpressionContainer<T>
-
add
public void add(SqmDynamicInstantiationArgument<?> aliasExpression)
- Specified by:
add
in interfaceSqmAliasedExpressionContainer<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
-
makeShallowCopy
public SqmDynamicInstantiation<T> makeShallowCopy()
-
visitSubSelectableNodes
public void visitSubSelectableNodes(Consumer<SqmSelectableNode<?>> consumer)
Description copied from interface:SqmSelectableNode
Visit each of this selectable's direct sub-selectables - used to support JPA'sSelection
model (which is really a "selectable", just poorly named and poorly defined- Specified by:
visitSubSelectableNodes
in interfaceSqmSelectableNode<T>
- See Also:
JpaSelection.getSelectionItems()
,Selection.getCompoundSelectionItems()
-
getSelectionItems
public List<SqmSelectableNode<?>> getSelectionItems()
- Specified by:
getSelectionItems
in interfaceJpaSelection<T>
- Overrides:
getSelectionItems
in classAbstractJpaSelection<T>
-
-