Friday, January 18, 2013

JDev/ADF sample - How To Implement Gapless Sequence in ADF BC

  • How To Implement Gapless Sequence in ADF BC. We all know how to insert new records using ADF BC. But if you have a sequence in the DB for primary key attribute and there is requirement to make sure assigned sequence values are always gapless - few extra steps are needed. When you hit Create button, ADF will assign sequence value immediately - often user may rollback transaction and sequence value will be lost. In order to prevent gaps in the sequence we can use two sequences - one temporary for Create and then real sequence will be applied during commit time from doDML method.
    Download -
    Run - CreateSequenceApp on Oracle Cloud

No comments: