First page Back Continue Last page Text

oracle adf workshop


Coding the Service Method

Add the Java code for the custom method to the <name> file.

The example in the slide shows a retrievePersonById() method in the class for the PersonsAM application module. It uses the getDefinitionObject() method of the PersonsEOImpl entity object class to access its related entity definition, uses the createPrimaryKey() method on the entity object class to create an appropriate Key object to look up the person, then uses the findByPrimaryKey() method on the entity definition to find the entity row in the entity cache. It returns the LastName attribute of the PersonsEOImpl object.