21 Jul 2016

ADF BC View Object level Triggers

The latest JDeveloper release 12.2.1.1 came up with a new feature. Now we can define View Object level triggers just like we used to do with entities.  These triggers can be used as extension points provided by the framework to interfere in the VO lifecycle with Groovy script.

There are five available trigger points at this moment:



BeforeExecute
BeforeExecute trigger fires at the very beginning of VO execute lifecycle. Basically, it is invoked by prepareRowSetForQuery method which is a good place to assign bind variable values or modify the where clause for a specific row set. The source of this trigger is VO, so we can refer to VO's methods and properties using source keyword.

Criteria
Criteria trigger fires each time whenever the framework constructs a where clause for a view critera.
The source of this trigger is VO, so the VO instance can be referred with source keyword.

CriteriaItem
CriteriaItem trigger fires each time whenever the framework constructs a where clause for a specific view critera item.  So, we can specify for which VC item the trigger event should occur.

BeforeCreate
If we need to add some logic just before a new view object row is created we can use BeforeCreate trigger for that. The source of this trigger is VO row, so an instance of the VO row which is being created can be accessed with source keyword.

Modify
Whenever a VO attribute is being modified, the framework invokes Modify trigger. We can specify for which attribute the trigger should work. The source of this trigger is the VO row which is accessible with source keyword.


That's it!




8 Jul 2016

Deep Dive into Oracle ADF Transactions : Advanced Techniques

In this post I would like to thank everyone, who managed to attend my session "Deep Dive into Oracle ADF Transactions : Advanced Techniques" at ODTUG Kscope16 conference in Chicago, IL. Thank you guys for coming to listen to me, to learn something new and to support me. 

I promised at the session that the presentation would be available for download. 
The presentation is available here:

That's it!