jrun.ejb.ejbql
Class NavigationExpression

java.lang.Object
  |
  +--jrun.ejb.ejbql.ExpressionBase
        |
        +--jrun.ejb.ejbql.NavigationExpression
All Implemented Interfaces:
Element, Expression

public class NavigationExpression
extends ExpressionBase

A generalization of the following EJBQL path expressions : SingleValuedPathExpression (e.g. o.customer, o.customer.firstname) CollectionValuedPathExpression : (e.g. o.lineItems) NavigationExpression has the following syntax : IdentificationVar [. CmrField]* . (CmpField | CmrField)

Author:
Enrique Duvos

Fields inherited from interface jrun.ejb.ejbql.Element
UNSPECIFIED_TRAVERSAL_ORDER
 
Constructor Summary
NavigationExpression()
           
 
Method Summary
 void accept(Visitor visitor)
           
 void addExpression(Expression expression)
           
 void addOperator(NavigationOperator navigationOp)
           
 java.lang.Object clone()
           
 boolean endsInCmpField()
           
 boolean endsInCmrField()
           
 boolean equals(java.lang.Object other)
          Other navigation epressions must have same count and each element must be equal.
 AbstractSchemaName getAbstractSchemaName()
           
 java.util.ListIterator getChildren(int traversalType)
          Provide default implementation that returns 0 children.
 java.util.Iterator getFieldNames()
           
 IdentificationVar getFirstExpression()
           
 java.lang.String getJavaType()
          The navigation expression's type is determined by the last symbol and the operator acting on it.
 Symbol getLastExpression()
           
 CmpField getLastExpressionCmp()
          Convenience method to return last cmp field of path expression.
 CmrField getLastExpressionCmr()
          Convenience method to return last cmr field of path expression.
 NavigationOperator getLastOperator()
           
 int hashCode()
           
 boolean hasMultipleNavigations()
           
 boolean isNavigationExpression()
           
 void removeLastExpression()
           
 int size()
           
 
Methods inherited from class jrun.ejb.ejbql.ExpressionBase
isCmpField, isCmrField, isIdentificationVar, isInputParam, isOperatorExpression
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NavigationExpression

public NavigationExpression()
Method Detail

isNavigationExpression

public boolean isNavigationExpression()
Overrides:
isNavigationExpression in class ExpressionBase

addExpression

public void addExpression(Expression expression)

addOperator

public void addOperator(NavigationOperator navigationOp)

size

public int size()

getJavaType

public java.lang.String getJavaType()
The navigation expression's type is determined by the last symbol and the operator acting on it.

hasMultipleNavigations

public boolean hasMultipleNavigations()

getFirstExpression

public IdentificationVar getFirstExpression()

getLastOperator

public NavigationOperator getLastOperator()

getLastExpression

public Symbol getLastExpression()

getFieldNames

public java.util.Iterator getFieldNames()

endsInCmrField

public boolean endsInCmrField()

getAbstractSchemaName

public AbstractSchemaName getAbstractSchemaName()

getLastExpressionCmr

public CmrField getLastExpressionCmr()
Convenience method to return last cmr field of path expression. Should only be called is endsInCmrField() is true.

endsInCmpField

public boolean endsInCmpField()

getLastExpressionCmp

public CmpField getLastExpressionCmp()
Convenience method to return last cmp field of path expression. Should only be called is endsInCmpField() is true.

accept

public void accept(Visitor visitor)

getChildren

public java.util.ListIterator getChildren(int traversalType)
Description copied from class: ExpressionBase
Provide default implementation that returns 0 children.
Overrides:
getChildren in class ExpressionBase

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object other)
Other navigation epressions must have same count and each element must be equal.
Overrides:
equals in class java.lang.Object

removeLastExpression

public void removeLastExpression()

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object


Copyright � 2002 Macromedia Corporation. All Rights Reserved.