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

java.lang.Object
  extended by org.jboss.ejb.plugins.cmp.jdbc2.AbstractQueryCommand
      extended by org.jboss.ejb.plugins.cmp.jdbc2.DeclaredSQLQueryCommand
All Implemented Interfaces:
QueryCommand

public class DeclaredSQLQueryCommand
extends AbstractQueryCommand

Version:
$Revision: 1.1.4.2 $
Author:
Alexey Loubyansky

Field Summary
 
Fields inherited from class org.jboss.ejb.plugins.cmp.jdbc2.AbstractQueryCommand
entity, log, params, sql
 
Constructor Summary
DeclaredSQLQueryCommand(JDBCEntityBridge2 entity, JDBCDeclaredQueryMetaData metadata)
           
 
Method Summary
protected  String parseParameters(String sql, JDBCDeclaredQueryMetaData 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
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 entity,
                               JDBCDeclaredQueryMetaData metadata)
                        throws org.jboss.deployment.DeploymentException
Throws:
org.jboss.deployment.DeploymentException
Method Detail

parseParameters

protected String parseParameters(String sql,
                                 JDBCDeclaredQueryMetaData metadata)
                          throws org.jboss.deployment.DeploymentException
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:
org.jboss.deployment.DeploymentException - if a error occures while parsing the sql


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.