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:
- Start the New Virtual Table Definition wizard in the administration console:
- In the domain navigation pane, select the object store.
- In the object store navigation pane, select the .
- On the Virtual Table Definitions tab, click
New.
- Specify a name for the virtual table definition that you want to create.
- 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.
- Specify whether the virtual table handler is implemented as a Java™ component.
- 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).
- 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.
- Complete the wizard.