Hello,
1-what's the best practice to call database procedure and function in entity Impl ?
i made the procedure call inside Application module like ( DBTransaction trx = (DBTransaction) getTransaction();
CallableStatement st = null;
try {
String stmt = "begin my_procedure_name (?); end;";
st = trx.createCallableStatement(stmt, 0);
st.setObject(1, param);
st.executeUpdate();
} )
then call it inside the entity impl using ( ESAppModuleImpl am =(ESAppModuleImpl) Configuration.createRootApplicationModule
am.mymethod_name
)
this is the best practice for my case ?
thanks in advance.
my jdev ver. : 12.2.1.2.0