|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface for DAO plugins that perform additional processing of query parameters just before they get set into a prepared statement during a DAO call.
Multiple QueryParamProcessor
plugins can be installed for
one DAO. In this case they will be called in the order, in which their
<plugin>
elements appear in the DAO configuration. Each
processor gets at its input parameter value returned by the previous one.
One instance of a QueryParamProcessor
plugin can be shared
by multiple threads at the same time.
Method Summary | |
java.lang.Object |
processQueryParam(java.sql.PreparedStatement pstmt,
int placeholderIndex,
java.lang.Object queryParam)
This method is called by the DAO just before a query parameter gets set into a java.sql.PreparedStatement . |
Methods inherited from interface com.boylesoftware.cb2.DAOPlugin |
setApplicationContext |
Method Detail |
public java.lang.Object processQueryParam(java.sql.PreparedStatement pstmt, int placeholderIndex, java.lang.Object queryParam) throws java.sql.SQLException
java.sql.PreparedStatement
. The method returns an
object, which will be actually used by the DAO and set into the
statement.
Note, that for array query parameters the method is called once for the whole array and then one time for each of its element.
This method should not set the parameter by itself. The
pstmt
argument is given to it only for reference.
pstmt
- reference to the prepared statement object, into which the
parameter is going to be set.placeholderIndex
- index of the placeholder in the prepared
statement, into which the parameter is going to be set.queryParam
- the original value of the parameter. May be
null
, an object, or an array of objects.
java.sql.SQLException
- if an error happens.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |