Monday, July 4, 2011

Bit #31 - Making an Entity object read-only

There are a few different ways to make an Entity object read-only, both declaratively in JDeveloper or programmatically via the ADF Business Components API. One that is suggested in OTN thread http://forums.oracle.com/forums/thread.jspa?threadID=2247578&tstart=0 is to change in the Entity's General section the Entity's Updatable property from true (the default) to false. This property can be found under the Type section in the Property Inspector.


By changing it to false, the Entity will not be updatable for all Entity-based View objects that use it. Note however that JDeveloper will still show the Entity reference as being Updatable in the View object Entity Objects page. This seems to be a bug in JDeveloper.

Some of the other ways to make the Entity read only would be to uncheck the Updatable checkbox for each View object that uses the Entity object (in the Entity Objects section), to use the isAttributeUpdatable() API to return false for all attributes or even at the attribute level to set each attribute's Updatable property to Never.

Context:
Entity Objects
Related Posts Plugin for WordPress, Blogger...