org.midao.jdbc.core.handlers.type
Interface TypeHandler

All Known Implementing Classes:
BaseTypeHandler, EmptyTypeHandler, OracleTypeHandler, UniversalTypeHandler

public interface TypeHandler

Automatically converts Java types into JDBC SQL Types


Method Summary
 void afterExecute(java.sql.Statement stmt, QueryParameters processedInput, QueryParameters params)
          Reads @processedInput and closes all JDBC SQL Type to prevent any memory leaks.
 QueryParameters processInput(java.sql.Statement stmt, QueryParameters params)
          Reads @params and creates new QueryParameters with converted Java types into JDBC SQL Types
 java.util.List<QueryParameters> processOutput(java.sql.Statement stmt, java.util.List<QueryParameters> paramsList)
          Works the same as processInput(java.sql.Statement, org.midao.jdbc.core.handlers.model.QueryParameters) Allows processing of the List
 QueryParameters processOutput(java.sql.Statement stmt, QueryParameters params)
          Processes QueryParameters returned after Statement execution and converts any JDBC SQL Type into Java Type
 

Method Detail

processInput

QueryParameters processInput(java.sql.Statement stmt,
                             QueryParameters params)
                             throws java.sql.SQLException
Reads @params and creates new QueryParameters with converted Java types into JDBC SQL Types

Parameters:
stmt - JDBC Statement
params - QueryParameters which are read
Returns:
QueryParameters with converted values into JDBC SQL Type
Throws:
java.sql.SQLException

afterExecute

void afterExecute(java.sql.Statement stmt,
                  QueryParameters processedInput,
                  QueryParameters params)
                  throws java.sql.SQLException
Reads @processedInput and closes all JDBC SQL Type to prevent any memory leaks.

Parameters:
stmt - JDBC Statement
processedInput - values returned from processInput(java.sql.Statement, org.midao.jdbc.core.handlers.model.QueryParameters)
params - original values
Throws:
java.sql.SQLException

processOutput

QueryParameters processOutput(java.sql.Statement stmt,
                              QueryParameters params)
                              throws java.sql.SQLException
Processes QueryParameters returned after Statement execution and converts any JDBC SQL Type into Java Type

Parameters:
stmt - JDBC Statement
params - QueryParameters returned after Statement execution
Returns:
QueryParameters with converted values into Java Type
Throws:
java.sql.SQLException

processOutput

java.util.List<QueryParameters> processOutput(java.sql.Statement stmt,
                                              java.util.List<QueryParameters> paramsList)
                                              throws java.sql.SQLException
Works the same as processInput(java.sql.Statement, org.midao.jdbc.core.handlers.model.QueryParameters) Allows processing of the List

Parameters:
stmt - JDBC Statement
paramsList - QueryParameters List returned after Statement execution
Returns:
QueryParameters List with converted values into Java Type
Throws:
java.sql.SQLException


Copyright © 2013. All Rights Reserved.