Novell exteNd
Director 5.2 API

com.sssw.fw.api
Interface EbiQueryExpression

All Superinterfaces:
Serializable

public interface EbiQueryExpression
extends Serializable

Interface for combining expressions for use in the WHERE clause of a SQL query.

You get an EbiQueryExpression object when you call the query-building where...() methods of an element-specific query object. To build a complex expression, you join one EbiQueryExpression with another using EbiQueryExpression methods. There are methods for joining expressions using AND, OR, negating, and parenthesizing. It is up to you to combine expression in an appropriate order and adding parentheses where appropriate to control the evaluation of the expression when the query gets executed.

For a code example, see EbiDocQuery. For a list of element-specific query objects, see the subinterfaces of EbiQuery and EbiMetaDataQuery.


Method Summary
 void andExpression(EbiQueryExpression other)
          Joins another expression with the current expression with a logical AND.
 void andMultipleExpressions(EbiQueryExpression[] exprs)
          Joins multiple expressions with the current expression with logical ANDs.
 String getExpression()
          Gets the text of the current expression.
 Object[] getInParameters()
          Gets an Array of In Parameters with propName/PropDataType/PropValue for each paramter.
 void negateExpression()
          Negates the current expression.
 void orExpression(EbiQueryExpression other)
          Joins another expression with the current expression with a logical OR.
 void orMultipleExpressions(EbiQueryExpression[] exprs)
          Joins multiple expressions with the current expression with logical ORs.
 void parenthesize()
          Encloses the current expression in parentheses.
 

Method Detail

getExpression

public String getExpression()
Gets the text of the current expression.
Returns:
A String of the SQL expressions and their logical operators.

andExpression

public void andExpression(EbiQueryExpression other)
Joins another expression with the current expression with a logical AND.
Parameters:
other - An EbiQueryExpression object that you want to combine with the current WHERE clause.

andMultipleExpressions

public void andMultipleExpressions(EbiQueryExpression[] exprs)
Joins multiple expressions with the current expression with logical ANDs.
Parameters:
exprs - An array of EbiQueryExpression objects that you want to combine with the current WHERE clause.

orExpression

public void orExpression(EbiQueryExpression other)
Joins another expression with the current expression with a logical OR.
Parameters:
other - An EbiQueryExpression object that you want to combine with the current WHERE clause.

orMultipleExpressions

public void orMultipleExpressions(EbiQueryExpression[] exprs)
Joins multiple expressions with the current expression with logical ORs.
Parameters:
exprs - An array of EbiQueryExpression objects that you want to combine with the current WHERE clause.

negateExpression

public void negateExpression()
Negates the current expression.

parenthesize

public void parenthesize()
Encloses the current expression in parentheses. Parentheses control the order that the expressions are evaluated when the query is executed. Use parenthesize() to group the subexpressions that make up the current expression before adding another subexpression with andExpression() or orExpression().

getInParameters

public Object[] getInParameters()
Gets an Array of In Parameters with propName/PropDataType/PropValue for each paramter.

Novell exteNd
Director 5.2 API