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

public Class SqmSelectClause

extends AbstractSqmNode
implements SqmAliasedExpressionContainer<SqmSelection<?>>, JpaSelection<Object>
Class Inheritance
All Implemented Interfaces
org.hibernate.query.criteria.JpaSelection, jakarta.persistence.criteria.Selection, jakarta.persistence.TupleElement, org.hibernate.query.criteria.JpaTupleElement, org.hibernate.query.criteria.JpaCriteriaNode, java.io.Serializable, org.hibernate.query.sqm.tree.select.SqmAliasedExpressionContainer
Imports
java.util.ArrayList, .Collections, .List, org.hibernate.internal.util.collections.CollectionHelper, org.hibernate.query.criteria.JpaSelection, org.hibernate.query.sqm.NodeBuilder, org.hibernate.query.sqm.tree.AbstractSqmNode, .SqmCopyContext, org.hibernate.query.sqm.tree.expression.SqmExpression, org.hibernate.type.descriptor.java.JavaType

The semantic select clause. Defined as a list of individual selections.
Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
private boolean
private List<SqmSelection<?>>

Constructor Summary

AccessConstructor and Description
public
SqmSelectClause(boolean distinct, NodeBuilder nodeBuilder)

public
SqmSelectClause(boolean distinct, int expectedNumberOfSelections, NodeBuilder nodeBuilder)

Method Summary

Modifier and TypeMethod and Description
public SqmSelection<?>
public void
public void
addSelection(SqmSelection<?> selection)

public JpaSelection<Object>
alias(String
alias
name
)

Implements org.hibernate.query.criteria.JpaSelection.alias.

Assigns an alias to the selection item.
public SqmSelectClause
public String
getAlias()

Implements jakarta.persistence.TupleElement.getAlias.

Return the alias assigned to the tuple element or null, if no alias has been assigned.
public JavaType<Object>
public List<SqmSelectableNode<?>>
public List<SqmSelection<?>>
public boolean
isCompoundSelection()

Implements jakarta.persistence.criteria.Selection.isCompoundSelection.

Whether the selection item is a compound selection.
public boolean
public void
makeDistinct(boolean distinct)

public JpaSelection<?>
public void
setSelection(SqmSelection<?> sqmSelection)

public void
setSelection(SqmSelectableNode<?> selectableNode)

Inherited from org.hibernate.query.sqm.tree.AbstractSqmNode:
nodeBuilder

Field Detail

distinctback to summary
private boolean distinct
selectionsback to summary
private List<SqmSelection<?>> selections

Constructor Detail

SqmSelectClauseback to summary
public SqmSelectClause(boolean distinct, NodeBuilder nodeBuilder)
SqmSelectClauseback to summary
public SqmSelectClause(boolean distinct, int expectedNumberOfSelections, NodeBuilder nodeBuilder)

Method Detail

addback to summary
public SqmSelection<?> add(SqmExpression<?> expression, String alias)

Implements org.hibernate.query.sqm.tree.select.SqmAliasedExpressionContainer.add.

Annotations
@Override
addback to summary
public void add(SqmSelection<?> aliasExpression)

Implements org.hibernate.query.sqm.tree.select.SqmAliasedExpressionContainer.add.

Annotations
@Override
addSelectionback to summary
public void addSelection(SqmSelection<?> selection)
aliasback to summary
public JpaSelection<Object> alias(String name)

Implements org.hibernate.query.criteria.JpaSelection.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<Object>

selection item

Annotations
@Override
copyback to summary
public SqmSelectClause copy(SqmCopyContext context)

Implements org.hibernate.query.sqm.tree.SqmNode.copy.

Annotations
@Override
getAliasback to summary
public String 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
getJavaTypeDescriptorback to summary
public JavaType<Object> getJavaTypeDescriptor()

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

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

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

Annotations
@Override
getSelectionsback to summary
public List<SqmSelection<?>> getSelections()
isCompoundSelectionback to summary
public boolean 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
isDistinctback to summary
public boolean isDistinct()
makeDistinctback to summary
public void makeDistinct(boolean distinct)
resolveJpaSelectionback to summary
public JpaSelection<?> resolveJpaSelection()
setSelectionback to summary
public void setSelection(SqmSelection<?> sqmSelection)
setSelectionback to summary
public void setSelection(SqmSelectableNode<?> selectableNode)