Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2002 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.p13n.content.expression
Class ExpressionAdapter

    java.lang.Object
      |
      +--com.bea.p13n.content.expression.ExpressionAdapter

public class ExpressionAdapter
extends java.lang.Object

Class which can adapt between old com.beasys.commerce.foundation.expression and new com.bea.p13n.expression.Expressions, specifically for content.

This will be removed when the com.beasys.commerce.foundation.expression.Expressions are removed.

Constructor Summary
`ExpressionAdapter()`

Method Summary
`static Expression` | `createBranchExpression(java.lang.String logicalComparator)` Create the appropriate new branch Expression from the given information.
`static Expression` | `createLeafExpression(java.lang.String propertySet, java.lang.String propertyName, java.lang.String comparator, java.lang.Object literal)` Create the appropriate new leaf Expression from the given information.
`static java.lang.String` | `getComparator(Expression expr)` Get the TypesHelper comparator constant for the specified leaf node.
`static java.lang.String` | `getLogicalComparator(Expression expr)` Get the TypesHelper logical comparator constant for the specified branch node.
`static Expression` | `toExpression(Expression orig)` Convert from old expression to new expression.
`static Expression` | `toExpression(Expression orig)` Convert from new expression to old expression.
`static Search` | `toSearch(Search orig)` Convert an old Search to a new Search (including the contained expression).
`static Search` | `toSearch(Search orig)` Convert an new Search to an old Search (including the contained expression).

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ExpressionAdapter

    public ExpressionAdapter()

Method Detail

### toExpression

    public static Expression toExpression(Expression orig)
                                   throws java.lang.IllegalArgumentException

  Convert from old expression to new expression.

  Throws:
    java.lang.IllegalArgumentException - thrown if the incoming expression is invalid.

### createLeafExpression

    public static Expression createLeafExpression(java.lang.String propertySet,
                                                  java.lang.String propertyName,
                                                  java.lang.String comparator,
                                                  java.lang.Object literal)
                                           throws java.lang.IllegalArgumentException

  Create the appropriate new leaf Expression from the given information.

  Parameters:
    `propertySet` - the propertySet name (can be null).
    `propertyName` - the propertyName.
    `comparator` - the TypesHelper comparator constant.
    `literal` - the rhs literal value.
  Throws:
    java.lang.IllegalArgumentException - thrown if comparator is invalid.

### createBranchExpression

    public static Expression createBranchExpression(java.lang.String logicalComparator)
                                             throws java.lang.IllegalArgumentException

  Create the appropriate new branch Expression from the given information.

  Parameters:
    `logicalComparator` - the TypesHelper comparator constant (AND or OR).
  Throws:
    java.lang.IllegalArgumentException - thrown if logicalComparator is invalid.

### toExpression

    public static Expression toExpression(Expression orig)
                                   throws java.lang.IllegalArgumentException

  Convert from new expression to old expression.

  Throws:
    java.lang.IllegalArgumentException - thrown if the incoming expression is invalid.

### getComparator

    public static java.lang.String getComparator(Expression expr)
                                          throws java.lang.IllegalArgumentException

  Get the TypesHelper comparator constant for the specified leaf node.

  Throws:
    java.lang.IllegalArgumentException - thrown if expr is not a leaf node.

### getLogicalComparator

    public static java.lang.String getLogicalComparator(Expression expr)

  Get the TypesHelper logical comparator constant for the specified branch node.

  Throws:
    java.lang.IllegalArgumentException - thrown if expr is not a branch node.

### toSearch

    public static Search toSearch(Search orig)
                           throws java.lang.IllegalArgumentException

  Convert an old Search to a new Search (including the contained expression).

  Throws:
    java.lang.IllegalArgumentException - thrown if the incoming expression is invalid.

### toSearch

    public static Search toSearch(Search orig)
                           throws java.lang.IllegalArgumentException

  Convert an new Search to an old Search (including the contained expression).

  Throws:
    java.lang.IllegalArgumentException - thrown if the incoming expression is invalid.

Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2002 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002 BEA Systems, Inc. All Rights Reserved