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

## BEA WebLogic Server Support for Apache Beehive

## com.bea.control
Class DatabaseFilter

    java.lang.Object
      com.bea.control.DatabaseFilter

All Implemented Interfaces:
  Serializable

public class DatabaseFilter
extends Object
implements Serializable

The DatabaseFilter class is a helper class for SQL generation.
NOTE: Depending on the database, column names may be case-sensitive. The most reliable way to avoid column name mistakes is to use the setResultSetMetaData() method.

See Also:
  Serialized Form

  Copyright © 2005 BEA Systems, Inc. All Rights Reserved.

Nested Class Summary
`static class` | `DatabaseFilter.FilterTerm`
`static class` | `DatabaseFilter.SortTerm`

Field Summary
`protected char` | `_chFilter`
`protected HashMap` | `_columns`
`protected DatabaseFilter.FilterTerm[]` | `_filter`
`protected int` | `_identifierOptions`
`protected int` | `_maxSortCols`
`protected DatabaseMetaData` | `_mdDatabase`
`protected ResultSetMetaData` | `_mdResultSet`
`protected String` | `_sIdentifierQuote`
`protected DatabaseFilter.SortTerm[]` | `_sort`
`static int` | `IDENTIFIER_ASIS`
`static int` | `IDENTIFIER_CHANGECASE`
`static int` | `IDENTIFIER_DEFAULT`
`static int` | `IDENTIFIER_QUOTE`
`static int` | `IDENTIFIER_TOLOWER`
`static int` | `IDENTIFIER_TOUPPER`
`static int` | `opAsc`
`static int` | `opContains`
`static int` | `opDesc`
`static int` | `opEmpty`
`static int` | `opEqual`
`static int` | `opGreater`
`static int` | `opGreaterEqual`
`static int` | `opIn`
`static int` | `opInvalid`
`static int` | `opIs`
`static int` | `opIsNot`
`static int` | `opLess`
`static int` | `opLessEqual`
`static int` | `opNotEqual`
`static int` | `opStartsWith`
`static String` | `sContains`
`static String` | `sEmpty`
`static String` | `sEquals`
`static String` | `sFilterChar`
`static String` | `sGreaterEqual`
`static String` | `sGreaterThan`
`static String` | `sIn`
`static String` | `sIsEmpty`
`static String` | `sIsNotEmpty`
`static String` | `sLessEqual`
`static String` | `sLessThan`
`static String` | `sNotEqual`
`static String` | `sStartsWith`
`static String` | `sUnitDate`
`static String` | `sUnitMonth`
`static String` | `sUnitYear`
`static int` | `unitDate`
`static int` | `unitDefault`
`static int` | `unitMonth`
`static int` | `unitYear`

Constructor Summary
`DatabaseFilter()`
`DatabaseFilter(DatabaseFilter.FilterTerm[] filter, DatabaseFilter.SortTerm[] sort)`

Method Summary
`JdbcControl.SQLFragment` | `getFilterExpression()`
`JdbcControl.SQLFragment` | `getOrderByClause()`
`JdbcControl.SQLFragment` | `getSortExpression()`
`JdbcControl.SQLFragment` | `getWhereClause()`
`Calendar` | `parseDate(CharSequence buf, Calendar calDefault)` Parse a date in ISO8601 or SOAP format. `Example 1: 1999-05-31 13:20:00.000 Example 2: 1999-05-31T13:20:00Z Example 3: 1999-05-31T13:20:00-05:00`
`void` | `parseQueryString(String query)`
`void` | `parseQueryString(String query, String prefix, String enc)`
`void` | `setDatabaseMetaData(DatabaseMetaData md)`
`void` | `setIdentifierOptions(int flags)` Control handling of identifiers in generated SQL.
`void` | `setResultSetMetaData(ResultSetMetaData md)`

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

Field Detail

### _chFilter

    protected char _chFilter

### _columns

    protected HashMap _columns

### _filter

    protected DatabaseFilter.FilterTerm[] _filter

### _identifierOptions

    protected int _identifierOptions

### _maxSortCols

    protected int _maxSortCols

### _mdDatabase

    protected DatabaseMetaData _mdDatabase

### _mdResultSet

    protected ResultSetMetaData _mdResultSet

### _sIdentifierQuote

    protected String _sIdentifierQuote

### _sort

    protected DatabaseFilter.SortTerm[] _sort

### IDENTIFIER_ASIS

    public static final int IDENTIFIER_ASIS

See Also:
  Constant Field Values

### IDENTIFIER_CHANGECASE

    public static final int IDENTIFIER_CHANGECASE

See Also:
  Constant Field Values

### IDENTIFIER_DEFAULT

    public static final int IDENTIFIER_DEFAULT

See Also:
  Constant Field Values

### IDENTIFIER_QUOTE

    public static final int IDENTIFIER_QUOTE

See Also:
  Constant Field Values

### IDENTIFIER_TOLOWER

    public static final int IDENTIFIER_TOLOWER

See Also:
  Constant Field Values

### IDENTIFIER_TOUPPER

    public static final int IDENTIFIER_TOUPPER

See Also:
  Constant Field Values

### opAsc

    public static final int opAsc

See Also:
  Constant Field Values

### opContains

    public static final int opContains

See Also:
  Constant Field Values

### opDesc

    public static final int opDesc

See Also:
  Constant Field Values

### opEmpty

    public static final int opEmpty

See Also:
  Constant Field Values

### opEqual

    public static final int opEqual

See Also:
  Constant Field Values

### opGreater

    public static final int opGreater

See Also:
  Constant Field Values

### opGreaterEqual

    public static final int opGreaterEqual

See Also:
  Constant Field Values

### opIn

    public static final int opIn

See Also:
  Constant Field Values

### opInvalid

    public static final int opInvalid

See Also:
  Constant Field Values

### opIs

    public static final int opIs

See Also:
  Constant Field Values

### opIsNot

    public static final int opIsNot

See Also:
  Constant Field Values

### opLess

    public static final int opLess

See Also:
  Constant Field Values

### opLessEqual

    public static final int opLessEqual

See Also:
  Constant Field Values

### opNotEqual

    public static final int opNotEqual

See Also:
  Constant Field Values

### opStartsWith

    public static final int opStartsWith

See Also:
  Constant Field Values

### sContains

    public static final String sContains

See Also:
  Constant Field Values

### sEmpty

    public static final String sEmpty

See Also:
  Constant Field Values

### sEquals

    public static final String sEquals

See Also:
  Constant Field Values

### sFilterChar

    public static final String sFilterChar

See Also:
  Constant Field Values

### sGreaterEqual

    public static final String sGreaterEqual

See Also:
  Constant Field Values

### sGreaterThan

    public static final String sGreaterThan

See Also:
  Constant Field Values

### sIn

    public static final String sIn

See Also:
  Constant Field Values

### sIsEmpty

    public static final String sIsEmpty

See Also:
  Constant Field Values

### sIsNotEmpty

    public static final String sIsNotEmpty

See Also:
  Constant Field Values

### sLessEqual

    public static final String sLessEqual

See Also:
  Constant Field Values

### sLessThan

    public static final String sLessThan

See Also:
  Constant Field Values

### sNotEqual

    public static final String sNotEqual

See Also:
  Constant Field Values

### sStartsWith

    public static final String sStartsWith

See Also:
  Constant Field Values

### sUnitDate

    public static final String sUnitDate

See Also:
  Constant Field Values

### sUnitMonth

    public static final String sUnitMonth

See Also:
  Constant Field Values

### sUnitYear

    public static final String sUnitYear

See Also:
  Constant Field Values

### unitDate

    public static final int unitDate

See Also:
  Constant Field Values

### unitDefault

    public static final int unitDefault

See Also:
  Constant Field Values

### unitMonth

    public static final int unitMonth

See Also:
  Constant Field Values

### unitYear

    public static final int unitYear

See Also:
  Constant Field Values

Constructor Detail

### DatabaseFilter

    public DatabaseFilter()

### DatabaseFilter

    public DatabaseFilter(DatabaseFilter.FilterTerm[] filter,
                          DatabaseFilter.SortTerm[] sort)

Method Detail

### getFilterExpression

    public JdbcControl.SQLFragment getFilterExpression()

### getOrderByClause

    public JdbcControl.SQLFragment getOrderByClause()

### getSortExpression

    public JdbcControl.SQLFragment getSortExpression()

### getWhereClause

    public JdbcControl.SQLFragment getWhereClause()

### parseDate

    public Calendar parseDate(CharSequence buf,
                              Calendar calDefault)

  Parse a date in ISO8601 or SOAP format.
  `Example 1: 1999-05-31 13:20:00.000
  Example 2: 1999-05-31T13:20:00Z
  Example 3: 1999-05-31T13:20:00-05:00`

  Returns:
    Calendar if the time zone is explicit (as in 2nd and 3rd example). The TimeZone of the returned calendar will be UTC. Otherwise the TimeZone will be as indicated by `calDefault` if specified, or the system default if not specified.

### parseQueryString

    public void parseQueryString(String query)

### parseQueryString

    public void parseQueryString(String query,
                                 String prefix,
                                 String enc)
                          throws UnsupportedEncodingException

  Throws:
    `UnsupportedEncodingException`

### setDatabaseMetaData

    public void setDatabaseMetaData(DatabaseMetaData md)

### setIdentifierOptions

    public void setIdentifierOptions(int flags)

  Control handling of identifiers in generated SQL. If setResultSetMetaData() is called, the values of IDENTIFIER_TOUPPER and IDENTIFIER_TOLOWER are ignored and the case will be as specified by metadata.getColumnName().

### setResultSetMetaData

    public void setResultSetMetaData(ResultSetMetaData md)
                              throws SQLException

  Throws:
    `SQLException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Documentation is available at http://e-docs.bea.com/wls/docs91 Copyright 2005 BEA Systems Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD