A: Entity objects are Data Access Objects (DAOs) that are responsible for persisting & caching data, validation, and encapsulating business rules.
· Represent a database table or other data source.
· Handles database caching.
· Contains attributes representing the database columns.
· Encapsulates attribute-level and entity –level validation logic.
· Can contain custom business methods.
Q : Can an entity object be based on two Database Objects(tables/views) or two Webservices?
A : No, Directly its not possible to create EO using multiple tables.
Entity objects will always have one to one relationship with a database object or web service.
But using views you can create Entity Objects on multiple tables.
Q.What is Control Hints in Entity Object configuration?
A: Control hints are associated with the current view or entity attribute. All view objects inherit the hint values at run time.
Control hints for data controls and bindings, including: Labels, Date & currency formatting.
A: View objects, which can be bases on entity objects/Web Services,represent the data which you want to view and manipulate.
· Present a view or slice of business data.
· Are used for joining, filtering, projecting, and sorting your business data.
· Can be based on any number of entity objects.
· Can also be constructed from a SQL statement.
Read-only SQL –Based View Objects:
· Is not based on any entity based object.
· Cannot be used for insert, update, or delete.
. Use SQL-based view objects for query –only views, which do not need the functionality of entity objects.
Q.What is Application Module?
A: An ADF components application module is a service object that coordinates view objects for a specific task in the same way that a form usually encapsulates a single user task. It contains only the business services that the application requires, and can be compared to a Forms module.
An application module can represent and assist with tasks such as:
· Updating customer information
· Processing salary increases.
Q.What is view link? How to create it? What is idea behind it?
A: View Link is an active link between view objects.You can create view links by providing the Source & destination VO attributes.
Oracle ADF view links are business components that define a relationship between two Oracle ADF view object definitions (the "source" and "destination" view objects) based on sets of view attributes (the "source" and "destination" attributes) from each.
These can range from simple one-to-many relationships to complexmany-to-many relationships. This allows you to easily create master/detail relationships between data controls in the client. For example, creating a view link between view objects will allow you to create relationships between:
- A dropdown list for selecting a customer and a table displaying that customer's orders
- The nodes in a tree control and their respective children
- An HTML page containing two frames: one that allows the user to browse for items and the other that lists the wherehouses in which the selected item is stored
View Links can be created using:
2. Based on EO Association
View Links and Queries
A view link definition relates two view object definitions. In the vast majority of cases, the view object definitions will contain SQL queries that access a database, and the view link definition will relate those queries using a parametrized WHERE clause, which is appended to the destination view object's query and resolved using the values of source attributes.
For example, suppose you had the following view object definitions:
· CustomersView, containing the query:
SELECT * FROM CUSTOMERS
OrdersView, containing the query:
SELECT * FROM ORDERS
You could create a view link, CustOrdLink, with
· CustomersView's CustomerId attribute as its source attribute
· The parametrized WHERE clause
WHERE :1 = ORDERS.CUSTOMER_ID
You could then use CustOrdLink conjunction with a row fromCustomersView (for example, the row for Customer 101) and all ofOrdersView to return the rows from the query
SELECT * FROM ORDERS WHERE 101 = ORDERS.CUSTOMER_ID
JDeveloper will create the parametrized query for you based on the attributes you select. If you do not change this query, you can make the view link bidirectional. This will switch the roles of the source and destination attributes. For example, if you make CustOrdLink bidirectional, you can use it in conjunction with a row from OrdersView (for example, a row for an order placed by Customer 101) and all of CustomersView to return the rows from the query
SELECT * FROM CUSTOMERS WHERE CUSTOMERS.CUSTOMER_ID = 101
Q. Can you make View Link bidirectional?
A: Yes, you can make a view link bidirectional.
It’s handled by view link query.
View Links created on Association are also bidirectional.
Q. How to create read only VO?
A: While creating View select below marked option
A view is read-only if it does not have Primary Keys or if all its entity
references are reference-only.
Q. Is EO to EO association possible like VO? If yes how?
è Direct EO-EO association is possible.
In Jdeveloper select option ‘New Association’, Give name to association, select attributes in source & destination Eos.
1. One-to-many relationships based on foreign keys.
2. A single many-to-many association corresponds to two foreign key relationships:
· A one-to-many relationship between the source table and a third table, the intersection table
· A one-to-many relationship between the destination table and the intersection table.
Q. What is Control hint?
A: Control hints are additional attribute settings that the view layer can use to automatically display the queried information to the user in a consistent, locale-sensitive way.
JDeveloper manages storing the hints in a way that is easy to localize for multi-lingual applications.
Used to set: Parameters in screenshot
Ex. Number, Number format, Date Format etc.
Q: What are UI Hints & List UI Hints?
A:
UI Hints: VO -> Query -> Create or Edit view criteria -> click Tab UI Hints
Use to specify the default properties for a query search component’s runtime usage of individual named view criteria. Named view criteria that you create for view object collections can be used by the web page designer to create query-by-example search forms.
List UI Hints: Open view-object -> List UI Hints
Use to specify default LOV (list of values) hints when you want the LOV-enabled attributes of other view objects to inherit the list UI hints from the current view object. Use to specify the type of LOV (list of values) component and one or more attributes to display in the LOV for the attributes that you will LOV-enabled. Additionally, you can set properties of the LOV component to customize it behavior in the user interface.
Q: What are the security application layers & how they handled in Oracle ADF?
Q: What is policy store and identity store in OID?
A: Identity Store is used to store information about users and groups while the Policy Store is used to store information about security policies.
Q: What is the difference between databindings.cpx and datacontrol.dcx?
A: The DataBindings.cpx file contains the Oracle ADF binding context for your entire application and provides the metadata from which the Oracle ADF binding objects are created at runtime.
The DataControls.dcx file is created when you register data controls on the business services. This file is not generated for Oracle ADF Business Components. It identifies the Oracle ADF model layer data control classes(factory classes) that facilitate the interaction between the client and the available business service.
Q: What is binding context and binding container?
A: Binding context is a runtime map between the data controls and page definition of pages in the application which is used to access the binding layer. It is accessible through the EL expression in your jspx pages.
Binding container is a request-scoped map that is used to instantiate the page bindings. This is accessible through the EL expressions. Also, since it is request-scoped map, it is accessible during every page request.
Q: What are the different types of bindings in ADF?
A: ADF contains the following types of bindings:
Method Bindings: This binding is used when you want to use custom methods to be executed.
Attribute Bindings: This is the binding to retrieve the value of a single view attribute in the iterator binding’s current view row. For eg; #{bindings.CustomerId.InputValue}
Tree Bindings: This is used for tables, tree-tables and trees. It is used to expose rows of a table in the iterator binding’s current range. Eg; All Customers-#{bindings.AllCustomers.labels.CustomerId}
Action Bindings: This binding type is used when buttons or command links are dropped on the user interface and require an action to be performed on them. We can use data control operations on them, for eg, Create, Delete, First, Last, Commit, Rollback etc.
Iterator Binding: This binding is created by the application to access the ADF binding context. It contains a reference to the page bound data collection, helps access it and iterates over its data objects.
Q : What is the return type of Service Methods?
A : Service Methods can return Scalar or Primitive Data types.
Q : Can Service Methods return type Void?
A : Yes, Service Methods can Return type Void
Q : Can Service Methods return Complex Data types?
A : No, service methods can return only primitive/scalar data types.
Q : Which component in ADF BC manages transaction ?
A : Application Module, manages transaction.
Q : Can an entity object be based on two Database Objects(tables/views) or two Webservices ?
A : No entity objects will always have one to one relationship with a database object or web service.
Q : Where is that we write business rules/validations in ADF and why?
A : We should be writing validations at Entity Object level, because they provide highest degree of reuse.
Q : What are the various access scopes supported by ADF?
A : ADF Faces supports the following scopes
Application Scope
Session Scope
PageFlow Scope
Request Scope
BackingBean Scope.
Q : What is the purpose of adfc-config.xml?
A: The adfc-config.xml file is the configuration file for an ADF unbounded task flow. This file contains metadata about the activities and control flows contained in the unbounded task flow.
Q : What is the purpose of faces-config.xml?
A: Use the faces-config.xml file to register a Framework application’s resources, such as custom validators and managed beans, and to define all page-to-page navigation rules.
Q : In which xml do you configure the skin for your framework application?
A: trinidad-config.xml
Q : How do you decide whether the application should be deployed as an EAR or a WAR?
A: If the application contains run-time customizations using MDS, it must be bundles as an EAR. For simple webcenter portal application with no such customizations, WAR can be created.
Q : What is the purpose of jazn-data.xml?
A: This file is used for defining the permissions and privileges for various groups of users on various taskflows created in the application.
Q : When we drag drop VO from DataControl which binding occurs?
A: Value binding occurs.
Q : Explain Data binding & its types, sub-types?
A : Oracle Application Development Framework (Oracle ADF) provides several types of binding objects to support the attributes and operations exposed by the Oracle ADF data controls for a particular business object:
- Iterator binding, one per accessor attribute that your page or panel displays. Iterates over the business objects of the data collection and maintains the row currency and state.
- Value bindings, one for each data-bound UI component. Provides access to data.
- Action binding, specifically defined for a button component. Provides access to operations defined by the business object.
Value Binding Types:
1. Attribute Value Binding
2. Boolean Value Binding
3. List Value Binding
4. Range Value Binding
5. Scroll Value Binding
Q: Explain Data Control Palette hierarchy
A: Data Control Palette hierarchy:The Data Control Palette displays two types of actions:
- Actions that typically operate on all data collections in the current web page's binding context (such as Commit and Rollback) in the Operations folder at the root level of the hierarchy.
- Operations on a specific data collection (for example, MyView1). Data collection-specific operations (such as Create and Delete) appear in the Operations folder as child nodes of the collection in the Data Control Palette.
Q: Write code to access the current row and or the view object inside your bean.
A: code to access the current row and or the view object inside your bean:
BindingContainer bc = BindingContext.getCurrent().getCurrentBindingsEntry();
DCBindingContainer dcbc = (DCBindingContainer) bc;
DCIteratorBinding lBinding = dcbc.findIteratorBinding("EmployeesViewIterator");
EmployeesViewRow row = (EmployeesViewRow) lBinding.getCurrentRow();
EmployeesView view = (EmployeesView) lBinding.getViewObject();
You have to change the iterator name 'EmployeesViewIterator' to the name of your VO iterator (look it up in the page bindings) and the classes Employees.
Q: How many types of VOs we can create in Oracle ADF?
A: There are four types of VOs we can create as shown in below image, select radio button & create VO.
1. Updatable VO (Updatable access through entity objects) - Here EO need to be created for updatable VOs.
2. Read only VO (Read-only access through SQl query) - No need to create EO, VOs can be created using SQL queries, table, or views.
3. Rows populated pro-grammatically, not based on query - This is also read-only view. Here add one or more attributes to use in program. In the Attribute Settings page, adjust any setting you may need to for the attributes you defined.
4. Static VO (Rows populated at design time- Static List): You use the Create View Object wizard to create static view objects. The wizard lets you define the desired attributes (columns) and enter as many rows of data as necessary. The wizard displays the static data table as you create it.
You can also use the Create View Object wizard to create the attributes based on data from a comma-separated value (CSV) file format like a spreadsheet file. The wizard will attempt to create the attributes that you define in the wizard with data from the first row of the flat file.
Check below image- circled import option is to import comma separated .cvs file or other file.

Q: Can we change DB connection for any particular AM?
A: YES, follow steps to change DB connection:
1. Double click on AM.
2. GO to the configuration tab, click on configuration file bc4j.xml
3. Here we have attribute JDBCName under element AppModuleConfig, change the connection which is created for other DB.
Q: What is view criteria, how can you change view criteria at runtime?
A: View Criteria: View criteria are structured criteria that you can use to create searches.
View criteria are collections of view criteria rows. A view criteria row specifies query-by-example requirements for one or more view object attributes. A view row matches if it meets all of the requirements.
When you apply view criteria to a view object instance, the query is restricted to return those view rows that match at least one of the view criteria rows. Effectively, therefore, view criteria assemble a WHERE clause in conjunctive normal form: the WHERE clause is a disjunction of conjunctions of query-by-example requirements.
View criteria are implemented by the class - oracle.jbo.ViewCriteria;
view criteria rows, by the classoracle.jbo.ViewCriteriaRow.
View criteria is like querying a SQL query.
Sometimes you need dynamic ViewCriteria that you can handle at runtime ,
here is the solution ,you can create and apply ViewCriteria Programmatically-
Sample UseCase-
- Suppose you have Department VO
- You want to filter this VO for DepartmentId 10
- Do this using this code snippet
/**Get ViewObject*/
ViewObject vo = getAm().getDepartments1();
/**Create ViewCriteria on ViewObject*/
ViewCriteria vc = vo.createViewCriteria();
/**Create ViewCriteriaRow for that Criteria*/
ViewCriteriaRow vcRow = vc.createViewCriteriaRow();
/**Set the values for ViewCriteriaRow*/
vcRow.setAttribute("DepartmentId", 10);
/**Add row to ViewCriteria*/
vc.addRow(vcRow);
/**Apply Criteria on ViewObject*/
vo.applyViewCriteria(vc);
/**Execute ViewObject*/
vo.executeQuery();
Q: How can you manage transaction in ADF?
A: We can manage transaction using Application Module, different Application Modules, Bounded Task Flows & at ADF Data Control Level.
Q: What is Bundled Exception Mode in ADF?
A: An application module provides a feature called bundled exception mode which allows web applications to easily present a maximal set of failed validation exceptions to the end user, instead of presenting only the first error that gets raised. By default, the ADF Business Components application module pool enables bundled exception mode for web applications.
You typically will not need to change this default setting. However it is important to understand that it is enabled by default since it effects how validation exceptions are thrown. Since the Java language and runtime only support throwing a single exception object, the way that bundled validation exceptions are implemented is by wrapping a set of exceptions as details of a new "parent" exception that contains them. For example, if multiple attributes in a single entity object fail attribute-level validation, then these multipleValidationException objects will be wrapped in a RowValException. This wrapping exception contains the row key of the row that has failed validation. At transaction commit time, if multiple rows do not successfully pass the validation performed during commit, then all of the RowValException objects will get wrapped in an enclosing TxnValException object.
When writing custom error processing code, you can use the getDetails() method of the JboException base exception class to recursively process the bundled exceptions contained inside it.
Note: All the exception classes mentioned here are in the oracle.jbo package.