Specifying Relational View Options

When you have defined the name of your new relational view, the Relational View Wizard then enables you to specify the inclusion of superschema classes, the synchronization of objects when SQL is executed, and an optional security filter method to screen which objects are visible to which users.

An example of the second sheet of the Relational View Wizard is shown in the following image.

To specify your relational view options

  1. Check the Include Super Schema Classes check box if you want to be able to include superschema classes in your relational view.

    If you select the inclusion of superschema classes, all classes defined in superschemas are included for consideration. By default, superschema classes are not visible and cannot be included in the relational view.

    Subclasses of the Collection class and Window class are not included in your relational view.

  2. The optimal way to manage the cache is to use cache coherency in the ODBC node. If cache coherency is enabled, the Resync Objects on SQLExecute option is ignored.

    If you are not using cache coherency, you can check the Resync Objects on SQLExecute check box if you want objects used in ODBC relational views synchronized when SQL is executed.

  3. If you want to specify a security filter method that is called before an object is exposed, specify the name of the method in the Security Method text box.

    The security method enables you to screen the objects that are visible to specific users.

    If you specify a security filter method, the JADE ODBC driver invokes this method for each object that satisfies the current query before it is added to the result set of the query. The method is passed the name of the current relational view and the name of the user is obtained from the current process object. If this method returns a value of true, the object is added to the result set. If the returned value is false, the object is ignored.

    Your security filter method must first be added to the appropriate class from the Class Browser and must be visible in the schema hierarchy branch in which the relational view is defined. As the security filter method can be reimplemented in subclasses, you would most likely define it at the Object class level.

    The following is an example of a security filter method that allows only a user named "me" to view objects using a relational view named MyRelView.

    isODBCPublic(relViewName: String): Boolean;
    vars
    begin
        if relViewName = "MyRelView" then
            if process.userCode = "me" then
                return true;
            endif;
        endif;
        return false;
    end;
  4. Click the Next > button when you have specified if classes are to be included in your new view.

    Alternatively, click the < Back button to redisplay the previous dialog or the Cancel button to abandon your selections.

When you click the Next > button, the Relational View Wizard then enables you to select the classes to be included in your relational view.