CallableSql

With CallableSql we can call stored procedures with IN / OUT parameters.

CallableSql cs = server.createCallableSql("{call my_stored_procedure(?,?)}");
cs.setParameter(1, 42);
cs.setParameter(2, "baz");
server.execute(cs);

L2 cache

If we are using L2 caching and the stored procedure modifies data we should inform ebean what tables were modified by insert, update or delete and it can then invalidate appropriate parts of the L2 cache.

CallableSql cs = server.createCallableSql("{call my_stored_procedure(?,?)}");
...
// Using L2 cache - updating rows on customer table
cs.addModification("customer", false, true, false);
server.execute(cs);

Edit Page