Top Description Fields Constructors Methods
org.eclipse.persistence.internal.jpa.querydef

public abstract Class SelectionImpl<X>

extends Object
implements Selection<X>, InternalSelection, Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable, org.eclipse.persistence.internal.jpa.querydef.InternalSelection, jakarta.persistence.criteria.Selection, jakarta.persistence.TupleElement
Known Direct Subclasses
org.eclipse.persistence.internal.jpa.querydef.CompoundSelectionImpl, org.eclipse.persistence.internal.jpa.querydef.ExpressionImpl
Imports
java.io.Serializable, java.util.List, jakarta.persistence.criteria.Selection, org.eclipse.persistence.expressions.Expression, org.eclipse.persistence.internal.localization.ExceptionLocalization

Purpose: Contains the implementation of the Selection interface of the JPA criteria API.

Description: The Selection is the expression describing what should be returned by the query.

Author
gyorke
Since
EclipseLink 1.2
See Also
Join

Field Summary

Modifier and TypeField and Description
protected String
protected Expression
protected Class<X>

Constructor Summary

AccessConstructor and Description
public <T>
SelectionImpl(Class<X> javaType, Expression expressionNode)

Method Summary

Modifier and TypeMethod and Description
public Selection<X>
alias(String
alias
name
)

Implements jakarta.persistence.criteria.Selection.alias.

Assign an alias to the selection.
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 List<Selection<?>>

Returns:

list of selection items
getCompoundSelectionItems
()

Implements jakarta.persistence.criteria.Selection.getCompoundSelectionItems.

Return selection items composing a compound selection
public Expression

Returns:

the currentNode
getCurrentNode
()

Implements org.eclipse.persistence.internal.jpa.querydef.InternalSelection.getCurrentNode.

Returns the current EclipseLink expression at this node in the criteria expression tree
public Class<? extends X>
getJavaType()

Implements jakarta.persistence.TupleElement.getJavaType.

Return the Java type of the tuple element.
public boolean

Returns:

boolean
isCompoundSelection
()

Implements jakarta.persistence.criteria.Selection.isCompoundSelection.

Whether the selection item is a compound selection
public boolean
public boolean
public boolean
public void
setJavaType(Class<X> javaType)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

aliasback to summary
protected String alias
currentNodeback to summary
protected Expression currentNode
javaTypeback to summary
protected Class<X> javaType

Constructor Detail

SelectionImplback to summary
public <T> SelectionImpl(Class<X> javaType, Expression expressionNode)

Method Detail

aliasback to summary
public Selection<X> alias(String name)

Implements jakarta.persistence.criteria.Selection.alias.

Assign an alias to the selection.

Parameters
name:String

alias

Returns:Selection<X>

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

selection item

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
getCompoundSelectionItemsback to summary
public List<Selection<?>> getCompoundSelectionItems()

Implements jakarta.persistence.criteria.Selection.getCompoundSelectionItems.

Return selection items composing a compound selection

Returns:List<Selection<?>>

list of selection items

Annotations
@Override
Exceptions
IllegalStateException:
if selection is not a compound selection
getCurrentNodeback to summary
public Expression getCurrentNode()

Implements org.eclipse.persistence.internal.jpa.querydef.InternalSelection.getCurrentNode.

Returns the current EclipseLink expression at this node in the criteria expression tree

Returns:Expression

the currentNode

Annotations
@Override
getJavaTypeback to summary
public Class<? extends X> getJavaType()

Implements jakarta.persistence.TupleElement.getJavaType.

Doc from jakarta.persistence.TupleElement.getJavaType.

Return the Java type of the tuple element.

Returns:Class<? extends X>

the Java type of the tuple element

Annotations
@Override
isCompoundSelectionback to summary
public boolean isCompoundSelection()

Implements jakarta.persistence.criteria.Selection.isCompoundSelection.

Whether the selection item is a compound selection

Returns:boolean

boolean

Annotations
@Override
isConstructorback to summary
public boolean isConstructor()

Implements org.eclipse.persistence.internal.jpa.querydef.InternalSelection.isConstructor.

Annotations
@Override
isFromback to summary
public boolean isFrom()

Implements org.eclipse.persistence.internal.jpa.querydef.InternalSelection.isFrom.

Annotations
@Override
isRootback to summary
public boolean isRoot()

Implements org.eclipse.persistence.internal.jpa.querydef.InternalSelection.isRoot.

Annotations
@Override
setJavaTypeback to summary
public void setJavaType(Class<X> javaType)