com.github.andyshaox.jdbc.RootSqlExecution Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of GearEE Show documentation
Show all versions of GearEE Show documentation
Enhance and formating the coding of JDK
package com.github.andyshaox.jdbc;
import java.lang.reflect.Method;
/**
*
* Title:
* Descript:
* Copyright: Copryright(c) Mar 10, 2016
* Encoding:UNIX UTF-8
*
* @author Andy.Shao
*
*/
public class RootSqlExecution implements SqlExecution {
private SqlAssembly assembly = SqlAssembly.DEFAUL;
private SqlExecution excution = null;
@Override
public Object invoke(Dao dao , Method processMethod , String excutableSql , Object... args) {
excutableSql = this.assembly.assemble(dao , processMethod , args);
if (this.excution != null) return this.excution.invoke(dao , processMethod , excutableSql , args);
return null;
}
public void setAssembly(SqlAssembly assembly) {
this.assembly = assembly;
}
public void setExcution(SqlExecution excution) {
this.excution = excution;
}
}