<participant>
     <quickSearch><![CDATA[DriverManager.getConnection]]></quickSearch>
     <insertText location="aboveHTML+50">
<![CDATA[
<%
Driver Driver@@rsName@@ = (Driver)Class.forName(MM_@@cname@@_DRIVER).newInstance();
Connection Conn@@rsName@@ = DriverManager.getConnection(MM_@@cname@@_STRING,MM_@@cname@@_USERNAME,MM_@@cname@@_PASSWORD);
PreparedStatement Statement@@rsName@@ = Conn@@rsName@@.prepareStatement("<@ if (@@newEncodedSQL@@) @>@@newEncodedSQL@@<@ else @>@@encodedSQL@@<@ endif@>",@@cursorType@@,@@lockType@@);
<@ loop (@@paramIndex@@, @@paramValue@@) @>Statement@@rsName@@.setObject(@@paramIndex@@, @@paramValue@@);
<@ endloop @>Statement@@rsName@@.setFetchSize(@@fetchSize@@);
Statement@@rsName@@.setQueryTimeout(@@queryTimeout@@);
ResultSet @@rsName@@ = Statement@@rsName@@.executeQuery();
boolean @@rsName@@_isEmpty = !@@rsName@@.next();
boolean @@rsName@@_hasData = !@@rsName@@_isEmpty;
Object @@rsName@@_data;
int @@rsName@@_numRows = 0;
%>
]]>
     </insertText>
     <searchPatterns whereToSearch="directive">
       <searchPattern paramNames="rsName,cname,encodedSQL,cursorType,lockType,MM_loop1" isOptional="false" limitSearch="all"><![CDATA[/Driver Driver([^\r\n]*?) = \(Driver\)Class\.forName\(MM_([^\r\n]*?)_DRIVER\)\.newInstance\(\);(?:\r\n|\r(?!\n)|\n)[ \t]*Connection Conn[^\r\n]*? = DriverManager\.getConnection\(MM_[^\r\n]*?_STRING,MM_[^\r\n]*?_USERNAME,MM_[^\r\n]*?_PASSWORD\);(?:\r\n|\r(?!\n)|\n)[ \t]*PreparedStatement Statement[^\r\n]*? = Conn[^\r\n]*?\.prepareStatement\("([^\r\n]*)"\s*,\s*([^, ]*?)\s*,\s*([^) ]*?)\);(?:\r\n|\r(?!\n)|\n)[ \t]*((?:Statement[^\r\n]*\.(?:setObject|setFetchSize|setQueryTimeout)\([^\r\n]*?\);(?:\r\n|\r(?!\n)|\n)[ \t]*)*?)ResultSet [^\r\n]*? = Statement[^\r\n]*?\.executeQuery\(\);(?:\r\n|\r(?!\n)|\n)[ \t]*boolean [^\r\n]*?_isEmpty = ![^\r\n]*?\.next\(\);(?:\r\n|\r(?!\n)|\n)[ \t]*boolean [^\r\n]*?_hasData = ![^\r\n]*?_isEmpty;(?:\r\n|\r(?!\n)|\n)[ \t]*Object [^\r\n]*?_data;(?:\r\n|\r(?!\n)|\n)[ \t]*int [^\r\n]*?_numRows = 0;(?=\r\n|\r|\n|%>)/i]]></searchPattern>
       <searchPattern paramNames="paramIndex,paramValue" limitSearch="@@MM_loop1@@" isOptional="true" searchType="multiple"><![CDATA[/Statement[^\r\n]*?\.setObject\(([^\r\n]*?), ([^\r\n]*?)\);(?:\r\n|\r(?!\n)|\n)[ \t]*/i]]></searchPattern>
       <searchPattern paramNames="fetchSize"><![CDATA[/Statement\w+\.setFetchSize\(([^)]*)\);/]]></searchPattern>
       <searchPattern paramNames="queryTimeout"><![CDATA[/Statement\w+\.setQueryTimeout\(([^)]*)\);/]]></searchPattern>
     </searchPatterns>
</participant>