org.midao.jdbc.core.handlers.type
Class UniversalTypeHandler
java.lang.Object
org.midao.jdbc.core.handlers.type.BaseTypeHandler
org.midao.jdbc.core.handlers.type.UniversalTypeHandler
- All Implemented Interfaces:
- TypeHandler
public class UniversalTypeHandler
- extends BaseTypeHandler
TypeHandler Implementation created to support JDBC3/JDBC4 Drivers of MySQL/MariaDB, PostgreSQL, MsSQL.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UniversalTypeHandler
public UniversalTypeHandler(Overrider overrider)
- Creates new BaseTypeHandler instance
- Parameters:
overrider
- overrider
processInput
public 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
- Specified by:
processInput
in interface TypeHandler
- Overrides:
processInput
in class BaseTypeHandler
- Parameters:
stmt
- JDBC Statementparams
- QueryParameters which are read
- Returns:
- QueryParameters with converted values into JDBC SQL Type
- Throws:
java.sql.SQLException
afterExecute
public 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.
- Specified by:
afterExecute
in interface TypeHandler
- Overrides:
afterExecute
in class BaseTypeHandler
- Parameters:
stmt
- JDBC StatementprocessedInput
- values returned from TypeHandler.processInput(java.sql.Statement, org.midao.jdbc.core.handlers.model.QueryParameters)
params
- original values
- Throws:
java.sql.SQLException
Copyright © 2013. All Rights Reserved.