use of com.varsql.core.exception.VarsqlMethodNotFoundException in project varsql by varsqlinfo.
the class MetaControlBean method getDDLScript.
public <T> T getDDLScript(String dbObjType, DatabaseParamInfo paramInfo, DDLCreateOption ddlOption, String... objNm) {
String callMethodName = String.format("get%ss", StringUtils.capitalize(dbObjType));
try {
if (VartechReflectionUtils.hasMethod(this.ddlScriptImpl.getClass(), callMethodName, DatabaseParamInfo.class, DDLCreateOption.class, objNm.getClass())) {
Object[] paramArr = { paramInfo, ddlOption, objNm };
Object obj = VartechReflectionUtils.invokeMethod(this.ddlScriptImpl, callMethodName, paramArr);
return (T) obj;
} else {
throw new VarsqlMethodNotFoundException(String.format("MetaControlBean getDDLScript -> %s method not found ", callMethodName));
}
} catch (Exception e) {
logger.error("getDDLScript class : {} , callMethodName : {}, objArr : {} ", this.ddlScriptImpl.getClass(), callMethodName, StringUtils.join(objNm));
logger.error("getDDLScript callMethodName ", e);
}
return null;
}
Aggregations