DEPRECATED

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

public class ExpressionAdapter
extends `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.

Hierarchy
  `Object`
  `ExpressionAdapter`

## Constructor Summary

ExpressionAdapter()

## Method Summary

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

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

## Constructor Detail

### ExpressionAdapter

    public ExpressionAdapter()

## Method Detail

### createBranchExpression(String) Method

    public static Expression createBranchExpression(String logicalComparator)
         throws IllegalArgumentException

Create the appropriate new branch Expression from the given information.

#### Parameters

logicalComparator
  the TypesHelper comparator constant (AND or OR).

#### Exceptions

``IllegalArgumentException``
  thrown if logicalComparator is invalid.

### createLeafExpression(String, String, String, Object) Method

    public static Expression createLeafExpression(String propertySet,
                                                  String propertyName,
                                                  String comparator,
                                                  Object literal)
         throws 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.

#### Exceptions

``IllegalArgumentException``
  thrown if comparator is invalid.

### getComparator(Expression) Method

    public static String getComparator(Expression expr)
         throws IllegalArgumentException

Get the TypesHelper comparator constant for the specified leaf node.

#### Exceptions

``IllegalArgumentException``
  thrown if expr is not a leaf node.

### getLogicalComparator(Expression) Method

    public static String getLogicalComparator(Expression expr)

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

### toExpression(Expression) Method

    public static Expression toExpression(Expression orig)
         throws IllegalArgumentException

Convert from old expression to new expression.

#### Exceptions

``IllegalArgumentException``
  thrown if the incoming expression is invalid.

### toExpression(Expression) Method

    public static Expression toExpression(Expression orig)
         throws IllegalArgumentException

Convert from new expression to old expression.

#### Exceptions

``IllegalArgumentException``
  thrown if the incoming expression is invalid.

### toSearch(Search) Method

    public static Search toSearch(Search orig)
         throws IllegalArgumentException

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

#### Exceptions

``IllegalArgumentException``
  thrown if the incoming expression is invalid.

### toSearch(Search) Method

    public static Search toSearch(Search orig)
         throws IllegalArgumentException

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

#### Exceptions

``IllegalArgumentException``
  thrown if the incoming expression is invalid.