Wednesday, November 2, 2011

Implementing DBSequences in an ADF Application

Below is a nice tutorial on how to programmatically use dbsequences as well as how to use trigger based dbsequence as an attribute in an entity.

http://www.youtube.com/watch?v=QIkwwdzYmJE

Summary for no trigger based dbsequence

If you have a sequence Number (here: "STOCKUSER.RUNID_SEQ") -- and no trigger to populate the dbSequence -- you can populate the DBSequence attribute in the Entity Object Default Value / Expression as such:


(new oracle.jbo.server.SequenceImpl("STOCKUSER.RUNID_SEQ", adf.object.getDBTransaction())).
getSequenceNumber()

No comments:

Post a Comment