<-----Google Analytics Code Start----> <-----Google Analytics Code Close---->
Skip to content

Green

color

Default screen resolution  Wide screen resolution  Increase font size  Decrease font size  Default font size  Skip to content Default color Pink color Green color Green color
Home arrow Technical Articles arrow Oracle Application Framework arrow OA Framework Entity Objects -Thinking from D2k mindset
This website has now moved to http://apps2fusion.com





OA Framework Entity Objects -Thinking from D2k mindset | Print |  E-mail
Written by Anil Passi   
Saturday, 31 March 2007
For D2K Programmers that are transitioning towards OA Framework, it is so easy to get confused between EJB and Entity Objects. I do not wish to confuse you further, hence I will not touch the word EJB here. Lets see how Entity Objects fit into D2K world.


So what exactly is OA Framework Entity Object similar to in our D2K model?
There is nothing in d2k that fully corresponds to Entity Objects. But there are certain areas where analogy can be drawn(well to an extent).

WHEN-VALIDATE-ITEM in D2K
setItemAttribute() in Entity Object
Ideally does not set a item value, simply validates Sets the value of the field that corresponds to the column. But we can also add field level validations in this method
Can fire immediately after navigating out of the field(assuming it was changed) Unless we implement PPR [partial page rendering]around that field, this will fire at page level by default.
Restricted trigger, but can indirectly influence navigation by setting enable off, or by setting navigation property of other items. No relationship to UserInterface, as controller manages the User Interface

OA Framework Extension Tip:- If you wish to implement additional validation for an existing OA Framework screen, then you will extend the method setItemAttribute of Entity Object.




WHEN-CREATE-RECORD in D2K
create() in Entity Object
As soon as a new record is created, values can be defaulted to fields via this trigger. Defaults values for the fields
super.create(attributelist);
setPOHeaderId(getOADBTransaction().
getSequenceValue("XXPO_HEADER_ID_S"));

OA Framework Extension Tip:- If you wish to default values to a field in existing OA Framework screen, then you will override extend the method create() of Entity Object.




WHEN-VALIDATE-RECORD in D2K
validateEntity() in Entity Object
Used to cross validating values in multiple fields for a record. This trigger fires as soon as you navigate out of a record[if any of its fields have been changed]
Ditto in OA Framework. For example if you wish to ensure that every CLERK must have a supervisorId attached, then write similar to below
protected void validateEntity()
{
super.validateEntity();
if(xxGetSupervisrId() == null
  &&
!"CLERK".equals(xxGetHRPosition()))
     throw new OAAttrValException...
}

OA Framework Extension Tip :- If you wish to cross validate fields in a standard OA Framework screen, then you will extend validateEntity()

 


 

PRE-COMMIT in D2K
postChanges() in Entity Object
Fires before Form issues a commit
This isn't exactly similar to the listed D2K counterpart, but comes close to it. Here you can assign values to Entity Attribute at the very last moment, prior to changes are posted.
public void postChanges(TransactionEvent transactionevent)
{
Number docSeqNum = calculateDocSeqNum();
populateAttribute(1, docSeqNum);
super.postChanges(transactionevent);
}

OA Framework Extension Tip :- If you wish to set any attribute with a sequence value, without loosing its sequence, then override this method.




Lets touch base on some other similarities & dis-similarities between D2K and Entity Objects in Framework
Buffering of records
In D2K Oracle Forms, a multi record block buffers the record data for each record. Oracle form provides no handle to that data. The only way you can access value of a field in other record is by navigating to that record[alternately maintain a record set]. However, in case of Entity Objects, you can iterate through the rows in the Entity cache.
You can get a handle to iterator using which you can programatically scroll through the records in that buffer. Framework maintains a cache for records being inserted/modified into EO via VO.


Post Process
If the entity object that you are extending already extends OAPlsqlEntityImpl, then you can do custom operations before or after Oracle screen makes API calls. Your customization will fire before or after depending upon when you call super.insertRow().


I hope this article gives you an idea for moving from D2K Forms towards Entity Objects in OA Framework.
We havent't yet discussed entityExpert, which I will do in a latter article.

Comments (1)add
...
written by Anil Passi , May 01, 2007
Hi Chitra

I have tried to list the toolsets needed for Fusion, in link http://oracle.anilpassi.com/or...tools.html

See if that helps you get started.

As with any technology, one must concentrate on concepts. I do not think Java Certification is required for you to become a proficient Oracle Apps/Fusion developer. But yes, I must admit, basic java and XML knowledge is indeed becoming a mandatory requirement for most of Fusion apps development.

Thanks,
Anil Passi
You must be logged in to a comment. Please register if you do not have an account yet.

busy