GigaSpaces XAP 10.0.1 API

org.openspaces.jpa.openjpa.query
Class InnerQuery

java.lang.Object
  extended by org.openspaces.jpa.openjpa.query.InnerQuery
All Implemented Interfaces:
Serializable, org.apache.openjpa.kernel.exps.Subquery, org.apache.openjpa.kernel.exps.Value, ExpressionNode

public class InnerQuery
extends Object
implements org.apache.openjpa.kernel.exps.Subquery, ExpressionNode

Represents an inner query (subquery) in OpenJPA's expression tree.

Since:
8.0
Author:
idan
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.openspaces.jpa.openjpa.query.ExpressionNode
ExpressionNode.NodeType
 
Constructor Summary
InnerQuery(org.apache.openjpa.meta.ClassMetaData classMetaData)
           
 
Method Summary
 void acceptVisit(org.apache.openjpa.kernel.exps.ExpressionVisitor visitor)
          Accept a visit from a tree visitor.
 void appendSql(StringBuilder sql)
          Appends the node SQL string to the string builder.
 String getAlias()
          Return select item alias
 String getCandidateAlias()
          Return the candidate alias for this subquery.
 org.apache.openjpa.meta.ClassMetaData getMetaData()
          Return any associated persistent type.
 String getName()
           
 ExpressionNode.NodeType getNodeType()
          Gets the node type
 org.apache.openjpa.kernel.exps.Path getPath()
           
 Object getSelect()
           
 org.apache.openjpa.kernel.exps.Value getSelectAs()
          Return 'this' concrete class if alias is set, otherwise null
 String getSubqAlias()
          Return the subqAlias
 Class getType()
          Return the expected type for this value, or Object if the type is unknown.
 boolean isAggregate()
          Return true if this value is an aggregate.
 boolean isVariable()
          Return true if this value is a variable.
 boolean isXPath()
          Return true if this value is an XML Path.
 void setAlias(String alias)
          Set select item alias
 void setImplicitType(Class type)
          Set the implicit type of the value, based on how it is used in the filter.
 void setMetaData(org.apache.openjpa.meta.ClassMetaData meta)
          Associate a persistent type with this value.
 void setQueryExpressions(org.apache.openjpa.kernel.exps.QueryExpressions query)
          Set the parsed subquery.
 void setSubqAlias(String subqAlias)
          Set the candidate alias for this subquery.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InnerQuery

public InnerQuery(org.apache.openjpa.meta.ClassMetaData classMetaData)
Method Detail

getCandidateAlias

public String getCandidateAlias()
Return the candidate alias for this subquery.

Specified by:
getCandidateAlias in interface org.apache.openjpa.kernel.exps.Subquery

setSubqAlias

public void setSubqAlias(String subqAlias)
Set the candidate alias for this subquery.

Specified by:
setSubqAlias in interface org.apache.openjpa.kernel.exps.Subquery

getSubqAlias

public String getSubqAlias()
Return the subqAlias

Specified by:
getSubqAlias in interface org.apache.openjpa.kernel.exps.Subquery

setQueryExpressions

public void setQueryExpressions(org.apache.openjpa.kernel.exps.QueryExpressions query)
Set the parsed subquery.

Specified by:
setQueryExpressions in interface org.apache.openjpa.kernel.exps.Subquery

getSelect

public Object getSelect()
Specified by:
getSelect in interface org.apache.openjpa.kernel.exps.Subquery

getType

public Class getType()
Return the expected type for this value, or Object if the type is unknown.

Specified by:
getType in interface org.apache.openjpa.kernel.exps.Value

setImplicitType

public void setImplicitType(Class type)
Set the implicit type of the value, based on how it is used in the filter. This method is only called on values who return Object from getType().

Specified by:
setImplicitType in interface org.apache.openjpa.kernel.exps.Value

isVariable

public boolean isVariable()
Return true if this value is a variable.

Specified by:
isVariable in interface org.apache.openjpa.kernel.exps.Value

isAggregate

public boolean isAggregate()
Return true if this value is an aggregate.

Specified by:
isAggregate in interface org.apache.openjpa.kernel.exps.Value

isXPath

public boolean isXPath()
Return true if this value is an XML Path.

Specified by:
isXPath in interface org.apache.openjpa.kernel.exps.Value

getMetaData

public org.apache.openjpa.meta.ClassMetaData getMetaData()
Return any associated persistent type.

Specified by:
getMetaData in interface org.apache.openjpa.kernel.exps.Value

setMetaData

public void setMetaData(org.apache.openjpa.meta.ClassMetaData meta)
Associate a persistent type with this value.

Specified by:
setMetaData in interface org.apache.openjpa.kernel.exps.Value

acceptVisit

public void acceptVisit(org.apache.openjpa.kernel.exps.ExpressionVisitor visitor)
Accept a visit from a tree visitor.

Specified by:
acceptVisit in interface org.apache.openjpa.kernel.exps.Value

getAlias

public String getAlias()
Return select item alias

Specified by:
getAlias in interface org.apache.openjpa.kernel.exps.Value

setAlias

public void setAlias(String alias)
Set select item alias

Specified by:
setAlias in interface org.apache.openjpa.kernel.exps.Value

getSelectAs

public org.apache.openjpa.kernel.exps.Value getSelectAs()
Return 'this' concrete class if alias is set, otherwise null

Specified by:
getSelectAs in interface org.apache.openjpa.kernel.exps.Value

getPath

public org.apache.openjpa.kernel.exps.Path getPath()
Specified by:
getPath in interface org.apache.openjpa.kernel.exps.Value

getName

public String getName()
Specified by:
getName in interface org.apache.openjpa.kernel.exps.Value

appendSql

public void appendSql(StringBuilder sql)
Description copied from interface: ExpressionNode
Appends the node SQL string to the string builder.

Specified by:
appendSql in interface ExpressionNode
Parameters:
sql - The SQL string builder to append to.

getNodeType

public ExpressionNode.NodeType getNodeType()
Description copied from interface: ExpressionNode
Gets the node type

Specified by:
getNodeType in interface ExpressionNode
Returns:
The node type.

GigaSpaces XAP 10.0.1 API

Copyright © GigaSpaces.