Top Fields Constructors Methods
org.hibernate.query.sqm.tree.select

public Class SqmJpaCompoundSelection<T>

extends AbstractSqmExpression<T>
implements JpaCompoundSelection<T>, SqmExpressible<T>
Class Inheritance
All Implemented Interfaces
org.hibernate.query.sqm.SqmExpressible, org.hibernate.query.BindableType, org.hibernate.query.criteria.JpaCompoundSelection, jakarta.persistence.criteria.CompoundSelection, jakarta.persistence.criteria.Selection, jakarta.persistence.TupleElement, org.hibernate.query.criteria.JpaSelection, org.hibernate.query.criteria.JpaTupleElement, org.hibernate.query.criteria.JpaCriteriaNode, java.io.Serializable
Imports
java.util.ArrayList, .List, java.util.function.Consumer, org.hibernate.metamodel.model.domain.DomainType, org.hibernate.query.criteria.JpaCompoundSelection, .JpaSelection, org.hibernate.query.sqm.NodeBuilder, .SemanticQueryWalker, .SqmExpressible, org.hibernate.query.sqm.tree.SqmCopyContext, org.hibernate.query.sqm.tree.expression.AbstractSqmExpression, org.hibernate.type.descriptor.java.JavaType, jakarta.persistence.criteria.Selection

Author
Steve Ebersole
See Also
org.hibernate.query.sqm.internal.SqmCriteriaNodeBuilder#tuple(Selection[]), jakarta.persistence.criteria.CriteriaBuilder#tuple(jakarta.persistence.criteria.Selection[]), org.hibernate.query.sqm.internal.SqmCriteriaNodeBuilder#array(Selection[]), jakarta.persistence.criteria.CriteriaBuilder#array(jakarta.persistence.criteria.Selection[]), org.hibernate.query.sqm.tree.expression.SqmTuple

Field Summary

Modifier and TypeField and Description
private final JavaType<T>
private final List<SqmSelectableNode<?>>

Constructor Summary

AccessConstructor and Description
public
SqmJpaCompoundSelection(List<SqmSelectableNode<?>> selectableNodes, JavaType<T> javaType, NodeBuilder criteriaBuilder)

Method Summary

Modifier and TypeMethod and Description
public <X> X
accept(SemanticQueryWalker<X> walker)

Implements org.hibernate.query.sqm.tree.SqmVisitableNode.accept.

Accept the walker per visitation
public JpaSelection<T>
public void
public SqmJpaCompoundSelection<T>
public String
getAlias()

Overrides org.hibernate.query.sqm.tree.jpa.AbstractJpaTupleElement.getAlias.

Implements jakarta.persistence.TupleElement.getAlias.

Return the alias assigned to the tuple element or null, if no alias has been assigned.
public Class<T>
public JavaType<T>
getExpressibleJavaType()

Implements org.hibernate.query.sqm.SqmExpressible.getExpressibleJavaType.

The Java type descriptor for this expressible
public Class<T>
getJavaType()

Overrides default org.hibernate.query.criteria.JpaTupleElement.getJavaType.

Implements jakarta.persistence.TupleElement.getJavaType.

Return the Java type of the tuple element.
public JavaType<T>
public List<SqmSelectableNode<?>>
public DomainType<T>
public boolean
public void
visitSubSelectableNodes(Consumer<SqmSelectableNode<?>> jpaSelectionConsumer)

Overrides default org.hibernate.query.sqm.tree.expression.SqmExpression.visitSubSelectableNodes.

Implements org.hibernate.query.sqm.tree.select.SqmSelectableNode.visitSubSelectableNodes.

Visit each of this selectable's direct sub-selectables - used to support JPA's Selection model (which is really a "selectable", just poorly named and poorly defined
Inherited from org.hibernate.query.sqm.tree.expression.AbstractSqmExpression:
applyInferableTypeasasBigDecimalasBigIntegerasDoubleasFloatasIntegerasLongasStringequalToequalToinininininternalApplyInferableTypeisNotNullisNullnodeBuilder

Field Detail

javaTypeback to summary
private final JavaType<T> javaType
selectableNodesback to summary
private final List<SqmSelectableNode<?>> selectableNodes

Constructor Detail

SqmJpaCompoundSelectionback to summary
public SqmJpaCompoundSelection(List<SqmSelectableNode<?>> selectableNodes, JavaType<T> javaType, NodeBuilder criteriaBuilder)

Method Detail

acceptback to summary
public <X> X accept(SemanticQueryWalker<X> walker)

Implements org.hibernate.query.sqm.tree.SqmVisitableNode.accept.

Doc from org.hibernate.query.sqm.tree.SqmVisitableNode.accept.

Accept the walker per visitation

Annotations
@Override
aliasback to summary
public JpaSelection<T> alias(String name)

Overrides org.hibernate.query.sqm.tree.expression.AbstractSqmExpression.alias.

Implements org.hibernate.query.criteria.JpaSelection.alias, jakarta.persistence.criteria.Selection.alias.

Doc from jakarta.persistence.criteria.Selection.alias.

Assigns an alias to the selection item. Once assigned, an alias cannot be changed or reassigned. Returns the same selection item.

Parameters
name:String

alias

Returns:JpaSelection<T>

selection item

Annotations
@Override
appendHqlStringback to summary
public void appendHqlString(StringBuilder sb)

Implements org.hibernate.query.sqm.tree.SqmVisitableNode.appendHqlString.

Annotations
@Override
copyback to summary
public SqmJpaCompoundSelection<T> copy(SqmCopyContext context)

Implements org.hibernate.query.sqm.tree.expression.SqmExpression.copy, org.hibernate.query.sqm.tree.select.SqmSelectableNode.copy, org.hibernate.query.sqm.tree.SqmNode.copy.

Annotations
@Override
getAliasback to summary
public String getAlias()

Overrides org.hibernate.query.sqm.tree.jpa.AbstractJpaTupleElement.getAlias.

Implements jakarta.persistence.TupleElement.getAlias.

Doc from jakarta.persistence.TupleElement.getAlias.

Return the alias assigned to the tuple element or null, if no alias has been assigned.

Returns:String

alias

Annotations
@Override
getBindableJavaTypeback to summary
public Class<T> getBindableJavaType()

Implements org.hibernate.query.BindableType.getBindableJavaType.

Doc from org.hibernate.query.BindableType.getBindableJavaType.

The expected Java type

Annotations
@Override
getExpressibleJavaTypeback to summary
public JavaType<T> getExpressibleJavaType()

Implements org.hibernate.query.sqm.SqmExpressible.getExpressibleJavaType.

Doc from org.hibernate.query.sqm.SqmExpressible.getExpressibleJavaType.

The Java type descriptor for this expressible

Annotations
@Override
getJavaTypeback to summary
public Class<T> getJavaType()

Overrides default org.hibernate.query.criteria.JpaTupleElement.getJavaType.

Implements jakarta.persistence.TupleElement.getJavaType.

Doc from jakarta.persistence.TupleElement.getJavaType.

Return the Java type of the tuple element.

Returns:Class<T>

the Java type of the tuple element

Annotations
@Override
getJavaTypeDescriptorback to summary
public JavaType<T> getJavaTypeDescriptor()

Overrides org.hibernate.query.sqm.tree.expression.AbstractSqmExpression.getJavaTypeDescriptor.

Implements org.hibernate.query.criteria.JpaTupleElement.getJavaTypeDescriptor.

Annotations
@Override
getSelectionItemsback to summary
public List<SqmSelectableNode<?>> getSelectionItems()

Overrides org.hibernate.query.sqm.tree.jpa.AbstractJpaSelection.getSelectionItems.

Implements org.hibernate.query.criteria.JpaSelection.getSelectionItems.

Annotations
@Override
getSqmTypeback to summary
public DomainType<T> getSqmType()

Implements org.hibernate.query.sqm.SqmExpressible.getSqmType.

Annotations
@Override
isCompoundSelectionback to summary
public boolean isCompoundSelection()

Overrides org.hibernate.query.sqm.tree.jpa.AbstractJpaSelection.isCompoundSelection.

Implements jakarta.persistence.criteria.Selection.isCompoundSelection.

Doc from jakarta.persistence.criteria.Selection.isCompoundSelection.

Whether the selection item is a compound selection.

Returns:boolean

boolean indicating whether the selection is a compound selection

Annotations
@Override
visitSubSelectableNodesback to summary
public void visitSubSelectableNodes(Consumer<SqmSelectableNode<?>> jpaSelectionConsumer)

Overrides default org.hibernate.query.sqm.tree.expression.SqmExpression.visitSubSelectableNodes.

Implements org.hibernate.query.sqm.tree.select.SqmSelectableNode.visitSubSelectableNodes.

Doc from org.hibernate.query.sqm.tree.select.SqmSelectableNode.visitSubSelectableNodes.

Visit each of this selectable's direct sub-selectables - used to support JPA's Selection model (which is really a "selectable", just poorly named and poorly defined

Annotations
@Override