Creating View Accessors
View accessors facilitate traversing from a detail record to all the associated master records. For example, a view accessor could enable you to traverse from an employee to all the departments the employee is allowed to join, rather than just to the department the employee is currently in. View accessors are commonly used both in validation, which is discussed in the lesson titled “Validating User Input,” and in lists of values, which are discussed next.
You can define view accessors for entity or view objects, but defining them at the entity level is usually preferable because it enables access by any view object that is based on that entity. You can define a view accessor to any view object in the same workspace. Simply click Create New View Accessors on the View Accessor tab of the EO or VO editor and then in the View Accessors dialog box select the view object or objects to access. You can create multiple view accessors at once.
If the view accessor retrieves a view object on which view criteria or bind variables are defined, you can optionally use those for the view accessor to restrict the rows that are retrieved, and you can also add an ORDER BY clause. To choose these options, with the view accessor selected in the View Accessors dialog box, click Edit. You can also set these options after creating the view accessor by editing it.