org.exolab.castor.jdo.drivers
Class OracleQueryExpression
java.lang.Object
org.exolab.castor.jdo.drivers.JDBCQueryExpression
org.exolab.castor.jdo.drivers.OracleQueryExpression
- All Implemented Interfaces:
- QueryExpression
public final class OracleQueryExpression
- extends JDBCQueryExpression
QueryExpression for Oracle 7/8.
As of release 8.1.6, Oracle supports limiting the number of rows returned by a query
through the use of the following mechanism.
SELECT *
FROM (
SELECT empno, ename, job, sal,
rank() over (order by sal) rnk
FROM emp
)
WHERE rnk BETWEEN 3 AND 8
- Version:
- $Revision: 1.7 $ $Date: 2005/03/24 10:44:58 $
- Author:
- Assaf Arkin
Fields inherited from class org.exolab.castor.jdo.drivers.JDBCQueryExpression |
_cols, _conds, _dbInfo, _distinct, _factory, _joins, _limit, _offset, _order, _select, _tables, _where |
Method Summary |
java.lang.String |
getStatement(boolean lock)
Creates a SQL statement. |
boolean |
isLimitClauseSupported()
Indicates that Oracle supports an OQL LIMIT clause for versions >= 8.1.6. |
boolean |
isOffsetClauseSupported()
Indicates that Oracle supports an OQL OFFSET clause for versions >= 8.1.6. |
Methods inherited from class org.exolab.castor.jdo.drivers.JDBCQueryExpression |
addColumn, addCondition, addInnerJoin, addInnerJoin, addInnerJoin, addInnerJoin, addLimitClause, addOffsetClause, addOrderClause, addOuterJoin, addOuterJoin, addOuterJoin, addOuterJoin, addParameter, addSelect, addTable, addTable, addWhereClause, addWhereClause, clone, encodeColumn, getColumnList, getStandardStatement, setDbMetaInfo, setDistinct, toString |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
OracleQueryExpression
public OracleQueryExpression(PersistenceFactory factory)
getStatement
public java.lang.String getStatement(boolean lock)
throws SyntaxNotSupportedException
- Description copied from class:
JDBCQueryExpression
- Creates a SQL statement.
In general, for a RDBMS/JDBC driver with a full support of the SQL standard/JDBC
specification, this will return a valid SQL statement. For some features,
a particular RDBMS might indicate that it does not support this feature by
throwing a .
- Specified by:
getStatement
in interface QueryExpression
- Overrides:
getStatement
in class JDBCQueryExpression
- Parameters:
lock
- True if a write lock is required
- Returns:
- The SQL statement
- Throws:
SyntaxNotSupportedException
- If the RDBMS does not support a particular feature.
isLimitClauseSupported
public boolean isLimitClauseSupported()
- Indicates that Oracle supports an OQL LIMIT clause for versions >= 8.1.6.
- Specified by:
isLimitClauseSupported
in interface QueryExpression
- Overrides:
isLimitClauseSupported
in class JDBCQueryExpression
- Returns:
- true to indicate that Oracle supports an OQL LIMIT clause.
- See Also:
QueryExpression.isLimitClauseSupported()
isOffsetClauseSupported
public boolean isOffsetClauseSupported()
- Indicates that Oracle supports an OQL OFFSET clause for versions >= 8.1.6.
- Specified by:
isOffsetClauseSupported
in interface QueryExpression
- Overrides:
isOffsetClauseSupported
in class JDBCQueryExpression
- Returns:
- true to indicate that Oracle supports an OQL OFFSET clause.
- See Also:
QueryExpression.isOffsetClauseSupported()
Intalio Inc. (C) 1999-2004. All rights reserved http://www.intalio.com