javax.persistence.criteria.Selection - JPA interface
javax.persistence.criteria
Interface Selection<X>
- Superinterfaces:
-
TupleElement<X>
- Subinterfaces:
-
CollectionJoin
,CompoundSelection
,Case
,Coalesce
,In
,SimpleCase
,Expression
,From
,Join
,ListJoin
,MapJoin
,ParameterExpression
,Path
,PluralJoin
,Predicate
,Root
,SetJoin
,Subquery
The
Selection
interface defines an item that is to be returned in a query result.
- Since:
- JPA 2.0
Learn how to use JPA Criteria API's Selection in
Chapter 4 of the ObjectDB/JPA manual.
Selection<X>
alias(String name)
Assigns an alias to the selection item. Once assigned, an alias cannot be changed or reassigned. Returns the same selection item.
- Parameters:
-
name
- alias
- Returns:
- selection item
- Since:
- JPA 2.0
String
getAlias()
Return the alias assigned to the tuple element or null, if no alias has been assigned.
- Returns:
- alias
- Since:
- JPA 2.0
List<
Selection<?>>
getCompoundSelectionItems()
Return the selection items composing a compound selection. Modifications to the list do not affect the query.
- Returns:
- list of selection items
- Throws:
-
IllegalStateException
- if selection is not a compound selection
- Since:
- JPA 2.0
Class<?>
getJavaType()
Return the Java type of the tuple element.
- Returns:
- the Java type of the tuple element
- Since:
- JPA 2.0
boolean
isCompoundSelection()
Whether the selection item is a compound selection.
- Returns:
- boolean indicating whether the selection is a compound selection
- Since:
- JPA 2.0
This documentation page is derived (with some adjustments) from the open source JPA 2 RI (EclipseLink)
and is available under the terms of the Eclipse Public License, v. 1.0 and Eclipse Distribution License, v. 1.0.
and is available under the terms of the Eclipse Public License, v. 1.0 and Eclipse Distribution License, v. 1.0.
Object Relational Mapping (ORM) JPA 2 providers include Hibernate, EclipseLink, TopLink, OpenJPA and DataNucleus.
ObjectDB is not an ORM JPA implementation but an Object Database for Java with built in JPA 2 support.