Creating virtual tables

A virtual table is a search extension mechanism. You can use custom code to create a virtual table that is dynamic and consists of a subset of rows from a logical table of an underlying Content Platform Engine object class. The virtual table can also include additional columns that represent information associated with the underlying objects. You can query a virtual table in the same way as the underlying class.

Before you begin

You need to implement a virtual table handler so that you create a virtual table. For more information, contact IBM Support.

About this task

You create a virtual table with a virtual table definition, which references the implemented virtual table handler. The virtual table handler defines the name of the virtual table in the following format: name-space::name. This name must be used in the search expression to reference the virtual table. The name of a virtual table and the name of the virtual table definition for that table can be different.

Procedure

To create a virtual table definition:

  1. Start the New Virtual Table Definition wizard in the administration console:
    1. In the domain navigation pane, select the object store.
    2. In the object store navigation pane, select the Event, Actions, Processes > Virtual Table Definitions > folder.
    3. On the Virtual Table Definitions tab, click New.
  2. Specify a name for the virtual table definition that you want to create.
  3. Select a class that is associated with the virtual table definition.
    You can select either the parent class or a subclass that you created for the virtual table definition.
  4. Specify whether the virtual table handler is implemented as a Java™ component.
    1. If you selected JavaScript, click Next to enter the virtual table script. You can open and modify a script or add code to the default code stubs. A virtual table handler that is implemented as JavaScript can fail in some WebLogic configurations. To resolve the problem, see JavaScript action handler fails (WebLogic application server).
    2. If you selected Class, enter the name of the primary Java class for the virtual table handler. If the Java class is contained in a package, qualify the Java class name with the package it is contained in.

      To configure the code module that contains the virtual table handler, select Configure Code Module before you click Next. If you do not select this option, the required Java class or JAR file must be on the local Content Platform Engine application server and must be in the application server class path.

  5. Complete the wizard.