org.jboss.ejb.plugins.cmp.jdbc2
Class DeclaredSQLQueryCommand

java.lang.Object
  extended byorg.jboss.ejb.plugins.cmp.jdbc2.AbstractQueryCommand (src) 
      extended byorg.jboss.ejb.plugins.cmp.jdbc2.DeclaredSQLQueryCommand
All Implemented Interfaces:
QueryCommand (src)

public class DeclaredSQLQueryCommand
extends AbstractQueryCommand (src)


Field Summary
 
Fields inherited from class org.jboss.ejb.plugins.cmp.jdbc2.AbstractQueryCommand (src)
entity, log, params, sql
 
Constructor Summary
DeclaredSQLQueryCommand(JDBCEntityBridge2 (src)  entity, JDBCDeclaredQueryMetaData (src)  metadata)
           
 
Method Summary
protected  java.lang.String parseParameters(java.lang.String sql, JDBCDeclaredQueryMetaData (src)  metadata)
          Replaces the parameters in the specific sql with question marks, and initializes the parameter setting code.
 
Methods inherited from class org.jboss.ejb.plugins.cmp.jdbc2.AbstractQueryCommand (src)
executeFetchOne, fetchCollection, fetchOne, getStoreManager, setEntityReader, setFieldReader, setFunctionReader, setParameters, setResultType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeclaredSQLQueryCommand

public DeclaredSQLQueryCommand(JDBCEntityBridge2 (src)  entity,
                               JDBCDeclaredQueryMetaData (src)  metadata)
                        throws DeploymentException (src) 
Method Detail

parseParameters

protected java.lang.String parseParameters(java.lang.String sql,
                                           JDBCDeclaredQueryMetaData (src)  metadata)
                                    throws DeploymentException (src) 
Replaces the parameters in the specific sql with question marks, and initializes the parameter setting code. Parameters are encoded in curly brackets use a zero based index.

Parameters:
sql - the sql statement that is parsed for parameters
Returns:
the original sql statement with the parameters replaced with a question mark
Throws:
DeploymentException (src) - if a error occures while parsing the sql