Skip to main content

Posts

Showing posts from April, 2016

Get modified rows from Entitiy Cache

To get the modified rows from entity cache we have getEntityState() method at EntityImpl class. Refer to my previous blog  Accessing EO impl methods from VO impl  where i am overriding the getEntityState() in EOimpl and calling it in VOImpl. We can use methods written or overridden in VOImpl class to AMImpl class. There are different states associated with an entity object. STATUS_UNMODIFIED STATUS_MODIFIED STATUS_NEW STATUS_DELETED STATUS_DEAD We have to check the state or row in our AmImpl class by using the VOImpl method and through this we can distinguish the rows present at vo. Add below code in AMImpl class along with my previous post. public void geCachedRowsCount(){         JobsVOImpl jobsVo = (JobsVOImpl)this.getJobsVO();         RowSetIterator iter = jobsVo.createRowSetIterator(null);             while(iter.hasNext()){             Row row = iter.next();             byte state = jobsVo.getEntityState(row);             System.out.println("Job_id -&

Accessing EOImpl methods from VOImpl

When you have a requirement to access EOImpl level overridden methods or any custom method from VOImpl follow below steps. 1.Create/Override method in your EOImpl class In above example i have overridden the getEntityState method to print the state of my current entity row. 2. To access this method in VOImpl class Create VOImpl and VORowImpl classes for your view object. See the code written in below VOImpl class to access the EOImpl methods. 3. Now you can expose this method to client tier through VO/AM Client Interface. As per your requirement you can use the client interface and achieve the functionality.

Customize ADF Entity Object

Like most business components, individual entity objects are partially defined by XML files. These files specify: 1. Simple metadata about the datasource, such as the table name and attribute definitions and 2. Simple business logic, such as the business logic that represents most column constraints and simple validation and security logic. In addition to XML files, entity object definitions comprise up to three Java classes: a) The entity object class - an instance of this class (an entity object instance) represents a single row from the datasource ( oracle.jbo.server.EntityImpl ) b) The entity collection class - an instance of this class represents the collection of rows currently in memory for a single user( oracle.jbo.server.EntityCache ) c) The entity definition class - the singleton instance of this class represents the entire datasource object( oracle.jbo.server.EntityDefImpl ) To access an entity row, you use a related object called the entity definition. At run