Ofbiz使用原生Sql


Delegator delegator = (Delegator) request.getAttribute("delegator");
String groupHelperName= delegator.getGroupHelperName("org.ofbiz.olap");
GenericHelperInfo helperInfo=new GenericHelperInfo(null, groupHelperName);
SQLProcessor sql=new SQLProcessor(delegator, helperInfo);
try {
Connection conn= sql.getConnection();

} catch (GenericDataSourceException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (GenericEntityException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

你可能感兴趣的:(Ofbiz使用原生Sql)