Hierarchy Developer's Guide for Oracle Self-Service E-Billing > Basic Hierarchy Manager Use Cases > Taking the User's Role into Consideration >

Finding Assigned Link Targets or OMF Objects


The following code shows an example of finding assigned link targets or OMF objects:

IHierarchyNodeObjWrapper[] linkTargetNodes = haMgr.findAssignedLinkTargets(hierarchy,linkTargetType, searchCriteria);

Or

IHierarchyNodeObjWrapper[] linkTargetNodes = haMgr.findAssignedLinkTargets(hierNode,linkTargetType, searchCriteria);

This method finds link targets of a given type within the hierarchy. The searchCriteria is used as a filter to apply on link target objects themselves. The returned IHierarchyNodeObjWrapper is a wrapper class, which contains the handle to the HierarchyNode object and the link target object itself. The returned list returns information about all the objects you need, as well as the corresponding hierarchy node that the object is linked with.

The search takes the user's role into consideration, and only returns objects that qualify the search criteria and are accessible to the current user.

IOMFObject[] omfObjects =

haMgr.findAssignedOMFs(hierarchy,omfType, searchCriteria);

or

IOMFObject[] omfObjects =

haMgr.findAssignedOMFs(hierNode,omfType, searchCriteria);

This method finds OMF objects of the given type within the hierarchy. The searchCriteria is used as a filter to apply to the OMF objects. The method returns a list of business objects without node information. The search takes user's role into consideration as well, and returns objects that qualify the search criteria and are accessible to the current user.

To improve performance for assigned search, you can choose to implement the IAssignedObjectProvider search interface and write specific query with cross table join between Hierarchy Manager tables and OMF object table to improve performance. The default behavior for assigned search is to use the methods above, which is slower since multiple queries will be executed and the result are again filter in memory.

Hierarchy Developer's Guide for Oracle Self-Service E-Billing Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices.