company logo

Explicit access schema

An explicit access schema in OSI can be defined by assigning access paths to expression variables. This allows on one side, accessing to database variables subordinated to one complex access paths, i.e. access paths, which are not simple property paths. On the other side, expressions might be easier to understand, when using an explicit access schema.

The first example below shows a simple access schema for accessing

    (Person)

        children

            children     // grand_children

                name             // gc_name

                age              // gc_age

More details are described in "Special Features".

void     Person::function1()

VARIABLES

  set<Person>      &grand_children = children().children();

  string           &gc_name        = grand_children.name

  int              &gc_age         = grand_children.age

PROCESS

  while ( grand_children.next )

    Print(gc_name,gc_age);  // print attributes for grand child

// the following does not work properly

//   while ( children().children().Next )  // returns all grand children one by one

//     children.children.Print();          // the path variable is different from the one above

}