Beispiel #1
0
 /** Finds by a specific prepared find statement by wrapping the poolable search
  *<code>AbstractDomain.findByPreparedStatement</code> method.  Sub-classes must create the key.
  * @param preparedStatementKey       key added in <code>addPreparedFindStatement()</code>.
  * @param handler                    <code>ApplicationRowHandler</code> to use.
  * @param params                     list of object parameters to use to set up <code>PreparedStatment</code>.
  * @param useSearchDomain        If <code>true</code>, <code>searchClassDomainClassName</code> will be
  *                   used. Otherwise, <code>fullDomainClassName will be used.
  * @return                           number of rows fetched.
  * @throws IllegalArgumentException  if number of parameters in <code>params</code> does not
  * match number of column specifications set in <code>addPreparedFindStatement()</code>.
  * @see                              net.sf.jrf.domain.AbstractDomain#findByPreparedStatement(String,ApplicationRowHandler,List)
  */
 protected int findByPreparedStatement(
     String preparedStatementKey,
     ApplicationRowHandler handler,
     List params,
     boolean useSearchDomain) {
   AbstractDomain domain =
       getDomain(useSearchDomain ? searchDomainClassName : fullDomainClassName);
   try {
     return domain.findByPreparedStatement(preparedStatementKey, handler, params);
   } finally {
     releaseDomain(domain);
   }
 }