Class SelectionImpl<X>
- java.lang.Object
-
- org.eclipse.persistence.internal.jpa.querydef.SelectionImpl<X>
-
- All Implemented Interfaces:
java.io.Serializable,javax.persistence.criteria.Selection<X>,javax.persistence.TupleElement<X>,InternalSelection
- Direct Known Subclasses:
CompoundSelectionImpl,ExpressionImpl
public abstract class SelectionImpl<X> extends java.lang.Object implements javax.persistence.criteria.Selection<X>, InternalSelection, java.io.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 java.lang.Stringaliasprotected org.eclipse.persistence.expressions.ExpressioncurrentNodeprotected java.lang.Class<X>javaType
-
Constructor Summary
Constructors Constructor Description SelectionImpl(java.lang.Class<X> javaType, org.eclipse.persistence.expressions.Expression expressionNode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.persistence.criteria.Selection<X>alias(java.lang.String name)Assign an alias to the selection.java.lang.StringgetAlias()java.util.List<javax.persistence.criteria.Selection<?>>getCompoundSelectionItems()Return selection items composing a compound selectionorg.eclipse.persistence.expressions.ExpressiongetCurrentNode()Returns the current EclipseLink expression at this node in the criteria expression treejava.lang.Class<? extends X>getJavaType()booleanisCompoundSelection()Whether the selection item is a compound selectionbooleanisConstructor()booleanisFrom()booleanisRoot()voidsetJavaType(java.lang.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
-
javaType
protected java.lang.Class<X> javaType
-
currentNode
protected org.eclipse.persistence.expressions.Expression currentNode
-
alias
protected java.lang.String alias
-
-
Constructor Detail
-
SelectionImpl
public SelectionImpl(java.lang.Class<X> javaType, org.eclipse.persistence.expressions.Expression expressionNode)
-
-
Method Detail
-
getCurrentNode
public org.eclipse.persistence.expressions.Expression getCurrentNode()
Returns the current EclipseLink expression at this node in the criteria expression tree- Specified by:
getCurrentNodein interfaceInternalSelection- Returns:
- the currentNode
-
alias
public javax.persistence.criteria.Selection<X> alias(java.lang.String name)
Assign an alias to the selection.- Specified by:
aliasin interfacejavax.persistence.criteria.Selection<X>- Parameters:
name- alias
-
getAlias
public java.lang.String getAlias()
- Specified by:
getAliasin interfacejavax.persistence.TupleElement<X>
-
getJavaType
public java.lang.Class<? extends X> getJavaType()
- Specified by:
getJavaTypein interfacejavax.persistence.TupleElement<X>
-
setJavaType
public void setJavaType(java.lang.Class<X> javaType)
-
getCompoundSelectionItems
public java.util.List<javax.persistence.criteria.Selection<?>> getCompoundSelectionItems()
Return selection items composing a compound selection- Specified by:
getCompoundSelectionItemsin interfacejavax.persistence.criteria.Selection<X>- Returns:
- list of selection items
- Throws:
java.lang.IllegalStateException- if selection is not a compound selection
-
isCompoundSelection
public boolean isCompoundSelection()
Whether the selection item is a compound selection- Specified by:
isCompoundSelectionin interfacejavax.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
-
-