org.apache.openjpa.persistence.criteria
Interface AliasContext

All Known Implementing Classes:
CriteriaQueryImpl

interface AliasContext

The context holds named variables for nodes of CriteriaQuery. Can create unique alias for the nodes that has not been aliased explicitly.

Since:
2.0.0
Author:
Pinaki Poddar

Method Summary
 String getAlias(Selection<?> node)
          Gets the alias for the given node.
 Value getRegisteredRootVariable(Root<?> node)
          Gets the registered root variable for the given node.
 Value getRegisteredValue(Selection<?> node)
          Gets the registered path value for the given node.
 Value getRegisteredVariable(Selection<?> node)
          Gets the registered variable for the given node.
 boolean isRegistered(Selection<?> node)
          Affirms if the given node has been registered.
 void registerVariable(Selection<?> node, Value variable, Value path)
          Register the given variable of corresponding given value against the given node.
 

Method Detail

getAlias

String getAlias(Selection<?> node)
Gets the alias for the given node. If no alias is set on the given node then create an alias, assign it to the node.


registerVariable

void registerVariable(Selection<?> node,
                      Value variable,
                      Value path)
Register the given variable of corresponding given value against the given node.

Parameters:
node - of query tree
variable - must be a variable
value - path value

isRegistered

boolean isRegistered(Selection<?> node)
Affirms if the given node has been registered.


getRegisteredVariable

Value getRegisteredVariable(Selection<?> node)
Gets the registered variable for the given node. Return null if the node is not registered.


getRegisteredRootVariable

Value getRegisteredRootVariable(Root<?> node)
Gets the registered root variable for the given node. Return null if the node is not registered.


getRegisteredValue

Value getRegisteredValue(Selection<?> node)
Gets the registered path value for the given node. Return null if the node is not registered.



Copyright © 2006-2010 Apache Software Foundation. All Rights Reserved.