All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jchanghong.autoconfig.db.mybatis.ResultSetHandlerPlugin.kt Maven / Gradle / Ivy

There is a newer version: 3.0.38
Show newest version
package jchanghong.autoconfig.db.mybatis;

import org.apache.ibatis.executor.resultset.ResultSetHandler
import org.apache.ibatis.plugin.Interceptor
import org.apache.ibatis.plugin.Intercepts
import org.apache.ibatis.plugin.Invocation
import org.apache.ibatis.plugin.Signature
import java.sql.CallableStatement
import java.sql.Statement

/**
\* Created with IntelliJ IDEA.
\* User: jiang
\* Date: 2020/1/5
\* Time: 14:59
\*/
//@Intercepts(
//    value = [Signature(type = ResultSetHandler::class, method = "handleResultSets", args = [Statement::class]),
//        Signature(type = ResultSetHandler::class, method = "handleOutputParameters", args = [CallableStatement::class])
//    ]
//)
//class ResultSetHandlerPlugin : Interceptor {
//    override fun intercept(invocation: Invocation): Any? {
//        var proceed = invocation.proceed()
//        if (invocation.method.name == "handleResultSets") {
//            handleResultSets(invocation.args[0] as Statement?, proceed)
//        }
//        return proceed
//    }
//
//    fun handleResultSets(stmt: Statement?, result: Any?) {
//        if (stmt == null || result == null) {
//            return
//        }
//    }
//}

fun main() {

}
//  List handleResultSets(Statement stmt) throws SQLException;
//
//   Cursor handleCursorResultSets(Statement stmt) throws SQLException;
//
//  void handleOutputParameters(CallableStatement cs) throws SQLException;




© 2015 - 2024 Weber Informatics LLC | Privacy Policy