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:
-
Method Summary
Modifier and TypeMethodDescription<X> Xaccept(SemanticQueryWalker<X> walker) Accept the walker per visitationadd(SqmExpression<?> expression, String alias) voidadd(SqmDynamicInstantiationArgument<?> aliasExpression) voidaddArgument(SqmDynamicInstantiationArgument<?> argument) voidappendHqlString(StringBuilder hql, SqmRenderContext context) booleancheckInstantiation(TypeConfiguration typeConfiguration) static <R> SqmDynamicInstantiation<R> classInstantiation(Class<R> targetJavaType, List<? extends SqmSelectableNode<?>> arguments, NodeBuilder nodeBuilder) copy(SqmCopyContext context) booleanstatic <R> SqmDynamicInstantiation<R> forClassInstantiation(JavaType<R> targetJavaType, NodeBuilder nodeBuilder) static <L extends List<?>>
SqmDynamicInstantiation<L> forListInstantiation(JavaType<L> listJavaType, NodeBuilder nodeBuilder) static <M extends Map<?,?>>
SqmDynamicInstantiation<M> forMapInstantiation(JavaType<M> mapJavaType, NodeBuilder nodeBuilder) The Java type descriptor for this node.inthashCode()booleanstatic <L extends List<?>>
SqmDynamicInstantiation<L> listInstantiation(List<? extends SqmSelectableNode<?>> arguments, NodeBuilder nodeBuilder) static <M extends Map<?,?>>
SqmDynamicInstantiation<M> mapInstantiation(List<? extends SqmSelectableNode<?>> arguments, NodeBuilder nodeBuilder) voidvisitSubSelectableNodes(Consumer<SqmSelectableNode<?>> consumer) Visit each of this selectable's direct sub-selectables - used to support JPA'sSelectionmodel (which is really a "selectable", just poorly named and poorly definedMethods inherited from class org.hibernate.query.sqm.tree.jpa.AbstractJpaSelection
alias, isCompoundSelectionMethods inherited from class org.hibernate.query.sqm.tree.jpa.AbstractJpaTupleElement
copyTo, getAlias, getNodeType, setAlias, setExpressibleTypeMethods inherited from class org.hibernate.query.sqm.tree.AbstractSqmNode
nodeBuilderMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.query.criteria.JpaSelection
alias, getCompoundSelectionItemsMethods inherited from interface org.hibernate.query.criteria.JpaTupleElement
getJavaType, getJavaTypeName, isEnumMethods inherited from interface jakarta.persistence.criteria.Selection
isCompoundSelectionMethods inherited from interface org.hibernate.query.sqm.tree.SqmNode
nodeBuilderMethods inherited from interface org.hibernate.query.sqm.tree.select.SqmSelectableNode
getTupleLengthMethods inherited from interface org.hibernate.query.sqm.tree.SqmTypedNode
getExpressible, getNodeTypeMethods inherited from interface org.hibernate.query.sqm.tree.SqmVisitableNode
toHqlStringMethods inherited from interface jakarta.persistence.TupleElement
getAlias
-
Method Details
-
forClassInstantiation
public static <R> SqmDynamicInstantiation<R> forClassInstantiation(JavaType<R> targetJavaType, NodeBuilder nodeBuilder) -
classInstantiation
public static <R> SqmDynamicInstantiation<R> classInstantiation(Class<R> targetJavaType, List<? extends SqmSelectableNode<?>> arguments, NodeBuilder nodeBuilder) -
forMapInstantiation
public static <M extends Map<?,?>> SqmDynamicInstantiation<M> forMapInstantiation(JavaType<M> mapJavaType, NodeBuilder nodeBuilder) -
mapInstantiation
public static <M extends Map<?,?>> SqmDynamicInstantiation<M> mapInstantiation(List<? extends SqmSelectableNode<?>> arguments, NodeBuilder nodeBuilder) -
forListInstantiation
public static <L extends List<?>> SqmDynamicInstantiation<L> forListInstantiation(JavaType<L> listJavaType, NodeBuilder nodeBuilder) -
listInstantiation
public static <L extends List<?>> SqmDynamicInstantiation<L> listInstantiation(List<? extends SqmSelectableNode<?>> arguments, NodeBuilder nodeBuilder) -
checkInstantiation
-
isFullyAliased
public boolean isFullyAliased() -
copy
- Specified by:
copyin interfaceSqmNode- Specified by:
copyin interfaceSqmSelectableNode<T>- Specified by:
copyin interfaceSqmTypedNode<T>
-
getInstantiationTarget
-
getArguments
-
getJavaTypeDescriptor
- Specified by:
getJavaTypeDescriptorin interfaceJpaTupleElement<T>
-
asLoggableText
- Specified by:
asLoggableTextin interfaceSqmNode
-
addArgument
-
add
- Specified by:
addin interfaceSqmAliasedExpressionContainer<T>
-
add
- Specified by:
addin interfaceSqmAliasedExpressionContainer<T>
-
accept
Description copied from interface:SqmVisitableNodeAccept the walker per visitation- Specified by:
acceptin interfaceSqmVisitableNode
-
appendHqlString
- Specified by:
appendHqlStringin interfaceSqmVisitableNode
-
equals
-
hashCode
public int hashCode() -
makeShallowCopy
-
getNodeJavaType
Description copied from interface:SqmTypedNodeThe Java type descriptor for this node.- Specified by:
getNodeJavaTypein interfaceSqmExpressibleAccessor<T>- Specified by:
getNodeJavaTypein interfaceSqmTypedNode<T>
-
visitSubSelectableNodes
Description copied from interface:SqmSelectableNodeVisit each of this selectable's direct sub-selectables - used to support JPA'sSelectionmodel (which is really a "selectable", just poorly named and poorly defined- Specified by:
visitSubSelectableNodesin interfaceSqmSelectableNode<T>- See Also:
-
getSelectionItems
- Specified by:
getSelectionItemsin interfaceJpaSelection<T>- Overrides:
getSelectionItemsin classAbstractJpaSelection<T>
-