javax.persistence.criteria
Interface Selection<X>

Type Parameters:
X - the type of the selection item
All Superinterfaces:
TupleElement<X>
All Known Subinterfaces:
CollectionJoin<Z,E>, CompoundSelection<X>, Expression<T>, From<Z,X>, Join<Z,X>, ListJoin<Z,E>, MapJoin<Z,K,V>, ParameterExpression<T>, Path<X>, PluralJoin<Z,C,E>, Predicate, QueryBuilder.Case<R>, QueryBuilder.Coalesce<T>, QueryBuilder.In<T>, QueryBuilder.SimpleCase<C,R>, Root<X>, SetJoin<Z,E>, Subquery<T>

public interface Selection<X>
extends TupleElement<X>

The Selection interface defines an item that to be returned in the query result.


Method Summary
 Selection<X> alias(String name)
          Return a selection item with the assigned alias.
 List<Selection<?>> getCompoundSelectionItems()
          Return selection items composing a compound selection
 boolean isCompoundSelection()
          Whether the selection item is a compound selection
 
Methods inherited from interface javax.persistence.TupleElement
getAlias, getJavaType
 

Method Detail

alias

Selection<X> alias(String name)
Return a selection item with the assigned alias.

Parameters:
name - alias
Returns:
selection item

isCompoundSelection

boolean isCompoundSelection()
Whether the selection item is a compound selection

Returns:
boolean

getCompoundSelectionItems

List<Selection<?>> getCompoundSelectionItems()
Return selection items composing a compound selection

Returns:
list of selection items
Throws:
IllegalStateException - if selection is not a compound selection


Copyright © 2007-2009 Hibernate.org. All Rights Reserved.