|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface for the DAO plugin, which is responsible for setting query
parameters into JDBC prepared statements during a DAO call. The DAO does not
call this plugin for nulls, nor it calls it for arrays. In the case of nulls
the DAO always calls setNull
on the
java.sql.PreparedStatement
internally. For arrays, it
automatically breaks them down onto individual elements and then calls the
plugin for each element.
Only one plugin of this type can be installed in a DAO configuration.
If none installed, the DAO will use a simple internal implementation, which
calls setObject
on the java.sql.PreparedStatement
.
Note, that one instance of the plugin can be shared by multiple threads at the same time.
Method Summary | |
void |
setQueryParam(java.sql.PreparedStatement pstmt,
int placeholderIndex,
java.lang.Object queryParam,
java.lang.Integer sqlType)
Sets the specified query parameter into the specified prepared statement. |
Methods inherited from interface com.boylesoftware.cb2.DAOPlugin |
setApplicationContext |
Method Detail |
public void setQueryParam(java.sql.PreparedStatement pstmt, int placeholderIndex, java.lang.Object queryParam, java.lang.Integer sqlType) throws java.sql.SQLException
pstmt
- the statement.placeholderIndex
- the parameter index.queryParam
- the value to set, never can be an array nor
null
.sqlType
- target SQL type (see java.sql.Types
), or
null
if not specified.
java.sql.SQLException
- if an error happens.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |