org.eclipse.datatools.connectivity.oda.spec.result.filter
Class CompositeExpression

java.lang.Object
  extended by org.eclipse.datatools.connectivity.oda.spec.result.FilterExpression
      extended by org.eclipse.datatools.connectivity.oda.spec.result.filter.CompositeExpression
Direct Known Subclasses:
AndExpression, NotExpression, OrExpression

public abstract class CompositeExpression
extends FilterExpression

The abstract base class for all composites of one or multiple child filter expressions. Its child expressions are ordered; their relationships are defined by its concrete extended classes.

Since:
3.2 (DTP 1.7)

Constructor Summary
CompositeExpression()
           
 
Method Summary
 CompositeExpression add(FilterExpression expression)
          Appends the specified FilterExpression to its collection of child expressions.
 int childCount()
          Returns the number of child expressions in this composite.
 FilterExpression[] getChildren()
          Returns the collection of child expressions in this composite.
 boolean isNegatable()
          Indicates whether this expression can be negated.
 java.lang.String toString()
           
 void validateSyntax(ValidationContext context)
          Performs syntactic validation of this expression in the specified context.
 
Methods inherited from class org.eclipse.datatools.connectivity.oda.spec.result.FilterExpression
getName, getQualifiedId, validate, validate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CompositeExpression

public CompositeExpression()
Method Detail

add

public CompositeExpression add(FilterExpression expression)
Appends the specified FilterExpression to its collection of child expressions.

Parameters:
expression - any type of filter expression
Returns:
this

childCount

public int childCount()
Returns the number of child expressions in this composite.

Returns:
the number of child expressions

getChildren

public FilterExpression[] getChildren()
Returns the collection of child expressions in this composite.

Returns:
an array of child FilterExpression; an empty array is returned if no child expression is set

validateSyntax

public void validateSyntax(ValidationContext context)
                    throws OdaException
Description copied from class: FilterExpression
Performs syntactic validation of this expression in the specified context.

Specified by:
validateSyntax in class FilterExpression
Parameters:
context - context for validation; may be null which would limit the scope of validation
Throws:
OdaException - if validation failed. The concrete cause is defined by the subclass implementing this method.

isNegatable

public boolean isNegatable()
Description copied from class: FilterExpression
Indicates whether this expression can be negated.

Specified by:
isNegatable in class FilterExpression
Returns:
true if expression can be negated; false otherwise

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object