We have a table with a Primary Key that gets populated on insert by a trigger on the table - the trigger gets the next sequence number from a sequence we created for the table a
I think you are looking for a Callable Statement. Here's javadoc if you are trying to get to it from Java.