Creation of a REF Request and REF Passing
Method Set
To properly implement an object-oriented type
set where a dependent table object uses a REF referencing a master
table object, two methods should be created. The first method, which
for convenience we will call the get_ref method, and a
second, which we will call the give_ref method will be
created. The first will reside in the dependent table object type
specification and the second will reside in the master table object
type specification. As its name implies the whole purpose of the
first method is to request the value of a specific REF from the
master table. The whole purpose of the second method is to receive
the request for the REF, get the requested REF from the master table
object and return the REF to the calling method. For this example we
have two object tables, EMPLOYEES and JOB_SITES that are related as
is shown in figure 1.