Selection<X>
- Type Parameters:
<X>
- the type of the selection item
- Super Interfaces:
TupleElement<X>
The
Selection
interface defines an item that is to be returned in a query result. - Since:
- JPA 2.0
The SELECT clause (JPQL / Criteria API) article explains how to use
Selection
.Public Methods
Selection<X> alias(String name)
Once assigned, an alias cannot be changed or reassigned. Returns the same selection item.
- Parameters:
name
- alias
- Return:
- selection item
- Since:
- JPA 2.0
String getAlias()
List<Selection<?>> getCompoundSelectionItems()
Modifications to the list do not affect the query.
- Return:
- list of selection items
- Throws:
- IllegalStateException - if selection is not a compound selection
- Since:
- JPA 2.0
Class<?extendsX> getJavaType()
boolean isCompoundSelection()
- Return:
- boolean indicating whether the selection is a compound selection
- Since:
- JPA 2.0