org.apache.cayenne.exp
Class ListExpression

java.lang.Object
  extended by org.apache.cayenne.exp.Expression
      extended by org.apache.cayenne.exp.ListExpression
All Implemented Interfaces:
java.io.Serializable, XMLSerializable

Deprecated. since 1.2, replaced by ASTList.

public class ListExpression
extends Expression

An expression with a varying number of operands. Usually this is used for the list expressions when the list size may vary.

Author:
Andrus Adamchik
See Also:
Serialized Form

Field Summary
protected  java.util.List operands
          Deprecated.  
 
Fields inherited from class org.apache.cayenne.exp.Expression
ADD, ALL, AND, ANY, AVG, BETWEEN, COUNT, DB_PATH, DIVIDE, EQUAL_TO, EXISTS, GREATER_THAN, GREATER_THAN_EQUAL_TO, IN, LESS_THAN, LESS_THAN_EQUAL_TO, LIKE, LIKE_IGNORE_CASE, LIST, MAX, MIN, MULTIPLY, NEGATIVE, NOT, NOT_BETWEEN, NOT_EQUAL_TO, NOT_IN, NOT_LIKE, NOT_LIKE_IGNORE_CASE, OBJ_PATH, OR, POSITIVE, PRUNED_NODE, RAW_SQL, SOME, SUBQUERY, SUBTRACT, SUM, type
 
Constructor Summary
ListExpression()
          Deprecated.  
ListExpression(int type)
          Deprecated.  
 
Method Summary
 void appendOperand(java.lang.Object value)
          Deprecated.  
 void appendOperands(java.util.Collection operands)
          Deprecated.  
 void encodeAsString(java.io.PrintWriter pw)
          Deprecated. Stores a String representation of Expression using a provided PrintWriter.
 java.lang.Object evaluate(java.lang.Object o)
          Deprecated. Calculates expression value with object as a context for path expressions.
protected  void flattenTree()
          Deprecated. Restructures expression to make sure that there are no children of the same type as this expression.
 java.lang.Object getOperand(int index)
          Deprecated. Returns a value of operand at index.
 int getOperandCount()
          Deprecated. Returns the number of operands currently in the list.
 Expression joinExp(int type, Expression exp)
          Deprecated. In case requested expression type is the same as internal type, creates and returns a copy of this expression with the internal list of operands expanded with the new expression.
 Expression notExp()
          Deprecated. Returns a logical NOT of current expression.
protected  boolean pruneNodeForPrunedChild(java.lang.Object prunedChild)
          Deprecated. Returns true if this node should be pruned from expression tree in the event a child is removed.
 void removeOperand(java.lang.Object value)
          Deprecated.  
 void setOperand(int index, java.lang.Object value)
          Deprecated. Sets a value of operand at index.
 Expression shallowCopy()
          Deprecated. Creates a copy of this expression node, without copying children.
protected  java.lang.Object transformExpression(org.apache.commons.collections.Transformer transformer)
          Deprecated. A recursive method called from "transform" to do the actual transformation.
 
Methods inherited from class org.apache.cayenne.exp.Expression
andExp, deepCopy, encodeAsXML, equals, expName, expWithParameters, expWithParameters, filter, filterObjects, fromString, getType, match, orExp, setType, toString, transform, traverse, traverse
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

operands

protected java.util.List operands
Deprecated. 
Constructor Detail

ListExpression

public ListExpression()
Deprecated. 

ListExpression

public ListExpression(int type)
Deprecated. 
Method Detail

evaluate

public java.lang.Object evaluate(java.lang.Object o)
Deprecated. 
Description copied from class: Expression
Calculates expression value with object as a context for path expressions.

Specified by:
evaluate in class Expression

notExp

public Expression notExp()
Deprecated. 
Description copied from class: Expression
Returns a logical NOT of current expression.

Specified by:
notExp in class Expression

flattenTree

protected void flattenTree()
Deprecated. 
Description copied from class: Expression
Restructures expression to make sure that there are no children of the same type as this expression.

Specified by:
flattenTree in class Expression

pruneNodeForPrunedChild

protected boolean pruneNodeForPrunedChild(java.lang.Object prunedChild)
Deprecated. 
Description copied from class: Expression
Returns true if this node should be pruned from expression tree in the event a child is removed.

Specified by:
pruneNodeForPrunedChild in class Expression

transformExpression

protected java.lang.Object transformExpression(org.apache.commons.collections.Transformer transformer)
Deprecated. 
Description copied from class: Expression
A recursive method called from "transform" to do the actual transformation.

Overrides:
transformExpression in class Expression
Returns:
null, Expression.PRUNED_NODE or transformed expression.

shallowCopy

public Expression shallowCopy()
Deprecated. 
Creates a copy of this expression node, without copying children.

Specified by:
shallowCopy in class Expression
Since:
1.1

getOperandCount

public int getOperandCount()
Deprecated. 
Returns the number of operands currently in the list.

Specified by:
getOperandCount in class Expression

getOperand

public java.lang.Object getOperand(int index)
Deprecated. 
Description copied from class: Expression
Returns a value of operand at index. Operand indexing starts at 0.

Specified by:
getOperand in class Expression
See Also:
Expression.getOperand(int)

setOperand

public void setOperand(int index,
                       java.lang.Object value)
Deprecated. 
Description copied from class: Expression
Sets a value of operand at index. Operand indexing starts at 0.

Specified by:
setOperand in class Expression

appendOperand

public void appendOperand(java.lang.Object value)
Deprecated. 

appendOperands

public void appendOperands(java.util.Collection operands)
Deprecated. 

removeOperand

public void removeOperand(java.lang.Object value)
Deprecated. 

joinExp

public Expression joinExp(int type,
                          Expression exp)
Deprecated. 
In case requested expression type is the same as internal type, creates and returns a copy of this expression with the internal list of operands expanded with the new expression. If the type of expression is different from this, calls superclass's implementation.

Overrides:
joinExp in class Expression

encodeAsString

public void encodeAsString(java.io.PrintWriter pw)
Deprecated. 
Description copied from class: Expression
Stores a String representation of Expression using a provided PrintWriter.

Specified by:
encodeAsString in class Expression
Since:
1.1


Copyright © 2001-2006 Apache.org All Rights Reserved.