|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface StatementFactory
Created by Pavel Syrtsov Date: Nov 3, 2007 Time: 8:16:33 PM
StatementFactory interface defines ability of the object to: create prepared statment and bind all necessary parameters to it. When this factory object created framework will initialize it with method setup Then it will be used to create JDBC prepared statement and bind to it arguments data objects if any. To define what implementation class shall be used to construct statement for Dao use annotationUseStatementFactory
Method Summary | |
---|---|
java.sql.PreparedStatement |
createStatement(java.sql.Connection connection,
java.lang.Object[] args)
Creates new PreparedStatement according to definition given in setup. |
void |
init(java.lang.String sql,
java.lang.reflect.Method method)
Initializes factory object with query data |
Method Detail |
---|
void init(java.lang.String sql, java.lang.reflect.Method method) throws StatementFactoryException
sql
- - query textmethod
- - method that quey will be attached to
StatementFactoryException
- - throws excpetion if fails to parse queryjava.sql.PreparedStatement createStatement(java.sql.Connection connection, java.lang.Object[] args) throws StatementFactoryException
connection
- - JDBC connection to be used to create new statementargs
- - parameters values to bind to prepared statement
StatementFactoryException
- if it fails to create
and initialize prepared statement
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |