com.ibm.websphere.query.callbacks
Class OracleSqlSelectQueryCallback

java.lang.Object
  extended by com.ibm.websphere.query.callbacks.SqlSelectQueryCallback
      extended by com.ibm.websphere.query.callbacks.OracleSqlSelectQueryCallback
All Implemented Interfaces:
ISelectQueryCallback, java.io.Serializable

public class OracleSqlSelectQueryCallback
extends SqlSelectQueryCallback

The OracleSqlSelectQueryCallback class is a query builder callback that adds the functionality of querying by Date objects on Oracle, and adding limit to Oracle queries.

See Also:
Serialized Form

Field Summary
static java.lang.String ORACLE_SQL_QUERY_LIMITHEAD
           
 
Fields inherited from class com.ibm.websphere.query.callbacks.SqlSelectQueryCallback
MULTIVALUE_SINGLEOPERAND_OPERATOR_SET, objectMapping, OPERATOR_MAP, propertyColumnMap, propertyTypeMap, SINGLEOPERAND_NONNULL_OPERATOR_SET, SQL_QUERY_AND, SQL_QUERY_ARITHMETIC_ADD, SQL_QUERY_ARITHMETIC_DIVIDE, SQL_QUERY_ARITHMETIC_MULTIPLY, SQL_QUERY_ARITHMETIC_SUBTRACT, SQL_QUERY_BTW, SQL_QUERY_COMMA, SQL_QUERY_CONDITIONHEAD, SQL_QUERY_CONDITIONTAIL, SQL_QUERY_DELETE, SQL_QUERY_DOT, SQL_QUERY_EQ, SQL_QUERY_FROM, SQL_QUERY_GEQ, SQL_QUERY_GT, SQL_QUERY_IN, SQL_QUERY_IS, SQL_QUERY_ISN, SQL_QUERY_ISNNULL, SQL_QUERY_ISNULL, SQL_QUERY_LEFTPAREN, SQL_QUERY_LEQ, SQL_QUERY_LIKE, SQL_QUERY_LOWER, SQL_QUERY_LT, SQL_QUERY_MVALL, SQL_QUERY_MVANY, SQL_QUERY_NEQ, SQL_QUERY_NOT_LIKE, SQL_QUERY_NULL, SQL_QUERY_OR, SQL_QUERY_ORDERBYASC, SQL_QUERY_ORDERBYASIS, SQL_QUERY_ORDERBYDES, SQL_QUERY_ORDERBYEXPSEP, SQL_QUERY_ORDERBYHEAD, SQL_QUERY_ORDERBYRANDOM, SQL_QUERY_ORDERBYTAIL, SQL_QUERY_PREDICATEHEAD, SQL_QUERY_PREDICATETAIL, SQL_QUERY_RIGHTPAREN, SQL_QUERY_SELECT, SQL_QUERY_SELECT_ALL, SQL_QUERY_SPACE, SQL_QUERY_SPACEAND, SQL_QUERY_SPACEOR, SQL_QUERY_STRINGSEP, SQL_QUERY_UPPER, SQL_QUERY_WHERE, SQL_QUERY_WHERETAIL, SQL_QUERY_WILDCARD
 
Fields inherited from interface com.ibm.websphere.query.base.ISelectQueryCallback
JOIN_CONDITIONS, JOIN_TABLES, JOINS, LAST_TABLE_ALIAS_INTEGER, MULTIVALUE_PROPERTY_NAMES, NAME_MAPPING, PREDICATE_IS_NULL, SELECT_ATTRIBUTES, TABLE_MAP, TABLE_NAME, TYPE_MAPPING
 
Constructor Summary
OracleSqlSelectQueryCallback()
          Creates a new OracleSqlSelectQueryCallback instance.
OracleSqlSelectQueryCallback(java.util.Map nameMapping, java.util.Map typeMapping)
          Creates a new OracleSqlSelectQueryCallback instance with the given attribute and type mappings.
 
Method Summary
 void buildAttribute(IAttribute attribute, java.lang.StringBuffer sb)
          Appends the string representation of the specified attribute to the specified string buffer.
 void buildLimit(ISelectQuery selectQuery, java.lang.StringBuffer sb, java.util.Map metadata)
           
 void buildSelectQuery(ISelectQuery selectQuery, java.lang.StringBuffer sb, java.util.Map metadata)
           
 void buildValue(IValue value, java.lang.StringBuffer sb)
          Returns the Oracle SQL value string for the given value.
 
Methods inherited from class com.ibm.websphere.query.callbacks.SqlSelectQueryCallback
buildArithmeticCondition, buildArithmeticCondition, buildAttribute, buildCondition, buildCondition, buildFrom, buildFrom, buildFunction, buildFunction, buildInnerSelect, buildJoin, buildLimit, buildLimit, buildLimit, buildLimit, buildMultiValueJoins, buildOperator, buildOperator, buildOrderBy, buildOrderBy, buildOrderBy, buildOrderBy, buildOrderByExpression, buildOrderByExpression, buildPredicate, buildPredicate, buildPredicate, buildPredicate, buildQuery, buildSelect, buildSelect, buildSelectQuery, buildSelectQuery, buildSMVCondition, buildTable, buildValue, getMultiValuePropertyNameSet, getNameMapping, getNullCast, getTableAlias, getTableName, getTypeMapping, isMultiValueAttribute, makeQuerySafeValue, processMvAll, processMvAny, processSMVBetween, processSMVIn, processSMVSingle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ORACLE_SQL_QUERY_LIMITHEAD

public static final java.lang.String ORACLE_SQL_QUERY_LIMITHEAD
See Also:
Constant Field Values
Constructor Detail

OracleSqlSelectQueryCallback

public OracleSqlSelectQueryCallback()
Creates a new OracleSqlSelectQueryCallback instance.


OracleSqlSelectQueryCallback

public OracleSqlSelectQueryCallback(java.util.Map nameMapping,
                                    java.util.Map typeMapping)
Creates a new OracleSqlSelectQueryCallback instance with the given attribute and type mappings.

Method Detail

buildValue

public void buildValue(IValue value,
                       java.lang.StringBuffer sb)
                throws QueryException

Returns the Oracle SQL value string for the given value.

This method generates the value string in SQL based on the data type.

Specified by:
buildValue in interface ISelectQueryCallback
Overrides:
buildValue in class SqlSelectQueryCallback
Throws:
QueryException

buildLimit

public void buildLimit(ISelectQuery selectQuery,
                       java.lang.StringBuffer sb,
                       java.util.Map metadata)
                throws QueryException
Throws:
QueryException
See Also:
ISelectQueryCallback.buildLimit(ISelectQuery)

buildSelectQuery

public void buildSelectQuery(ISelectQuery selectQuery,
                             java.lang.StringBuffer sb,
                             java.util.Map metadata)
                      throws QueryException
Throws:
QueryException
See Also:
ISelectQueryCallback.buildSelectQuery(ISelectQuery)

buildAttribute

public void buildAttribute(IAttribute attribute,
                           java.lang.StringBuffer sb)
                    throws QueryException
Description copied from class: SqlSelectQueryCallback
Appends the string representation of the specified attribute to the specified string buffer. If the attribute mapping contains an entry whose key matches the attribute name then the SQL table column name is appended. If the attribute represents a join then the string representation of the join is expanded and appended. If neither of these cases is true then that attribute name is appended as is.

Specified by:
buildAttribute in interface ISelectQueryCallback
Overrides:
buildAttribute in class SqlSelectQueryCallback
Parameters:
attribute - the attribute to expand
sb - the string buffer to append to
Throws:
QueryException