Class SelectionImpl<X>
- java.lang.Object
-
- org.eclipse.persistence.internal.jpa.querydef.SelectionImpl<X>
-
- All Implemented Interfaces:
jakarta.persistence.criteria.Selection<X>,jakarta.persistence.TupleElement<X>,Serializable,InternalSelection
- Direct Known Subclasses:
CompoundSelectionImpl,ExpressionImpl
public abstract class SelectionImpl<X> extends Object implements jakarta.persistence.criteria.Selection<X>, InternalSelection, Serializable
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.
- Since:
- EclipseLink 1.2
- Author:
- gyorke
- See Also:
Join, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Stringaliasprotected ExpressioncurrentNodeprotected Class<X>javaType
-
Constructor Summary
Constructors Constructor Description SelectionImpl(Class<X> javaType, Expression expressionNode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description jakarta.persistence.criteria.Selection<X>alias(String name)Assign an alias to the selection.StringgetAlias()List<jakarta.persistence.criteria.Selection<?>>getCompoundSelectionItems()Return selection items composing a compound selectionExpressiongetCurrentNode()Returns the current EclipseLink expression at this node in the criteria expression treeClass<? extends X>getJavaType()booleanisCompoundSelection()Whether the selection item is a compound selectionbooleanisConstructor()booleanisFrom()booleanisRoot()voidsetJavaType(Class<X> javaType)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.persistence.internal.jpa.querydef.InternalSelection
findRootAndParameters
-
-
-
-
Field Detail
-
currentNode
protected Expression currentNode
-
alias
protected String alias
-
-
Constructor Detail
-
SelectionImpl
public SelectionImpl(Class<X> javaType, Expression expressionNode)
-
-
Method Detail
-
getCurrentNode
public Expression getCurrentNode()
Returns the current EclipseLink expression at this node in the criteria expression tree- Specified by:
getCurrentNodein interfaceInternalSelection- Returns:
- the currentNode
-
alias
public jakarta.persistence.criteria.Selection<X> alias(String name)
Assign an alias to the selection.- Specified by:
aliasin interfacejakarta.persistence.criteria.Selection<X>- Parameters:
name- alias
-
getAlias
public String getAlias()
- Specified by:
getAliasin interfacejakarta.persistence.TupleElement<X>
-
getJavaType
public Class<? extends X> getJavaType()
- Specified by:
getJavaTypein interfacejakarta.persistence.TupleElement<X>
-
getCompoundSelectionItems
public List<jakarta.persistence.criteria.Selection<?>> getCompoundSelectionItems()
Return selection items composing a compound selection- Specified by:
getCompoundSelectionItemsin interfacejakarta.persistence.criteria.Selection<X>- Returns:
- list of selection items
- Throws:
IllegalStateException- if selection is not a compound selection
-
isCompoundSelection
public boolean isCompoundSelection()
Whether the selection item is a compound selection- Specified by:
isCompoundSelectionin interfacejakarta.persistence.criteria.Selection<X>- Returns:
- boolean
-
isFrom
public boolean isFrom()
- Specified by:
isFromin interfaceInternalSelection
-
isRoot
public boolean isRoot()
- Specified by:
isRootin interfaceInternalSelection
-
isConstructor
public boolean isConstructor()
- Specified by:
isConstructorin interfaceInternalSelection
-
-