org.jboss.ejb.plugins.jaws.jdbc
Class JDBCFinderCommand
java.lang.Object
|
+--org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand
|
+--org.jboss.ejb.plugins.jaws.jdbc.JDBCQueryCommand
|
+--org.jboss.ejb.plugins.jaws.jdbc.JDBCFinderCommand
- All Implemented Interfaces:
- JPMFindEntitiesCommand
- Direct Known Subclasses:
- JDBCDefinedFinderCommand, JDBCFindAllCommand, JDBCFindByCommand
- public abstract class JDBCFinderCommand
- extends JDBCQueryCommand
- implements JPMFindEntitiesCommand
Abstract superclass of finder commands that return collections.
Provides the handleResult() implementation that these all need.
- Version:
- $Revision: 1.11.2.1 $
- Author:
- Rickard Öberg, Marc Fleury, Joe Shevland, Justin Forder
- See Also:
Method Summary |
FinderResults |
execute(java.lang.reflect.Method finderMethod,
java.lang.Object[] args,
EntityEnterpriseContext ctx)
|
FinderMetaData |
getFinderMetaData()
|
abstract java.lang.String |
getFromClause()
This method must be ovverridden to return the full table list for
the query, including any join statements. |
abstract java.lang.String |
getOrderByClause()
This method must be ovverridded to return the full order by clause for
the query, including the 'ORDER BY' keyword. |
abstract java.lang.String |
getWhereClause()
This method must be overridden to return the where clause used in
this query. |
protected java.lang.Object |
handleResult(java.sql.ResultSet rs,
java.lang.Object argOrArgs)
Handles the result of successful execution of the query. |
Methods inherited from class org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand |
getCMPFieldValue, getConnection, getJawsCMPFieldJDBCType, getJDBCType, getJDBCTypeName, getPkColumnList, getPkColumnWhereList, getPkFieldValue, getResultObject, getResultObject, getSQL, getState, isBinaryType, jdbcExecute, setCMPFieldValue, setParameter, setParameters, setPrimaryKeyParameters, setSQL |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
finderMetaData
protected FinderMetaData finderMetaData
JDBCFinderCommand
public JDBCFinderCommand(JDBCCommandFactory factory,
FinderMetaData f)
getFinderMetaData
public FinderMetaData getFinderMetaData()
getWhereClause
public abstract java.lang.String getWhereClause()
- This method must be overridden to return the where clause used in
this query. This must start with the keyword 'WHERE' and include all
conditions needed to execute the query properly.
getFromClause
public abstract java.lang.String getFromClause()
- This method must be ovverridden to return the full table list for
the query, including any join statements. This must start with the
keyword 'FROM' and include all tables needed to execute the query properly.
getOrderByClause
public abstract java.lang.String getOrderByClause()
- This method must be ovverridded to return the full order by clause for
the query, including the 'ORDER BY' keyword.
execute
public FinderResults execute(java.lang.reflect.Method finderMethod,
java.lang.Object[] args,
EntityEnterpriseContext ctx)
throws java.rmi.RemoteException,
javax.ejb.FinderException
- Specified by:
execute
in interface JPMFindEntitiesCommand
handleResult
protected java.lang.Object handleResult(java.sql.ResultSet rs,
java.lang.Object argOrArgs)
throws java.lang.Exception
- Description copied from class:
JDBCQueryCommand
- Handles the result of successful execution of the query.
- Overrides:
handleResult
in class JDBCQueryCommand
- Following copied from class:
org.jboss.ejb.plugins.jaws.jdbc.JDBCQueryCommand
- Parameters:
rs
- the result set from the query.argOrArgs
- argument or array of arguments passed in from
subclass execute method.- Returns:
- any result produced by the handling of the result of executing
the prepared statement.
- Throws:
java.lang.Exception
- if execution or result handling fails.
Copyright © 2000 The JBoss Organization. All Rights Reserved.