Created by
Karolis Jocevičius
last modified
| String functionString = configFacade.getByKey(FUNCTION_STRING);
Session session = getEntityManager().unwrap(Session.class);
final StringBuilder result = new StringBuilder();
session.doWork(new Work() {
@Override
public void execute(Connection conn) throws SQLException {
CallableStatement call = conn.prepareCall("{? = call " + functionString + "(?)}");
call.registerOutParameter(1, Types.VARCHAR);
call.setString(2, item.getCode());
call.execute();
result.append(call.getString(1));
}
});
return result.toString();
|