Most of the scenarios , we need to call sql function pragmatically.
Here, is the one approch by using Map we can put input parameter to function and get result as Object.
1- Suppose we have Login Table as follows:
2-we want to fetch name of particular user id. So, for that we will create function is database as follows.
3-Now create Application Test ,create Login EO, LoginVO,
4-In AppModuleImpl.class write following method to get result from database.
5-From Managed Bean call above method as follows:
OperationBinding operationBinding =
(OperationBinding) bindings.getOperationBinding("getName");//AppModuleImpl.class method Name
operationBinding.getParamsMap().put("id", <Pass ID here>);
Object result = operationBinding.execute();//we can get Name of that user Id in result Object
Here, is the one approch by using Map we can put input parameter to function and get result as Object.
1- Suppose we have Login Table as follows:
2-we want to fetch name of particular user id. So, for that we will create function is database as follows.
3-Now create Application Test ,create Login EO, LoginVO,
4-In AppModuleImpl.class write following method to get result from database.
5-From Managed Bean call above method as follows:
OperationBinding operationBinding =
(OperationBinding) bindings.getOperationBinding("getName");//AppModuleImpl.class method Name
operationBinding.getParamsMap().put("id", <Pass ID here>);
Object result = operationBinding.execute();//we can get Name of that user Id in result Object




No comments:
Post a Comment