Real Time Information Director User Documentation

RTID Metadata Language
Hewlett-Packard Company 50 529618-002
Because you cannot reload a Java class once it has been loaded into the JVM, a substitute
document definition must have a new name, not the same name as the document
definition it replaces.
A substitute document cannot replace a variant or aliased document definition. You
replace a variant or an aliased document definition by deploying a new variant or aliased
document definition.
To specify a substitute document, you create a class that has a unique name and extends
SubstituteDocumentDefinition.
You implement a constructor for your substitute document. This constructor calls the
superclass with the following parameters:
IDocSegment idocSegment. This parameter contains the format metadata for the
document.
Update and query options. See “Update and Query Options for Document
Definitions.”
Example:
Here is an example of a document definition that replaces or substitutes for another base
document class. The new class extends SubstituteDocumentDefinition.
The superclass constructor refers to the format metadata (idocSegment), which in turn
specifies the base document ORDERS05.
package com.hp.rtsc.documents;
import com.hp.rtsc.metadata.*;
import com.hp.rtsc.metadata.format.*;
import java.sql.SQLException;
// Metadata class to define an ORDERS05 IDoc.
public class Orders05v3 extends SubstituteDocumentDefinition {
private static final IDocSegment idocSegment =
new IDocSegment("ORDERS05", "SALES_ORDER", new Segment[] {
IDOC.HEADER,
new Segment("E1EDK01", new FieldElement[] {
// Metadata Constructor:
public IhubOrders05()
throws MetadataInconsistency, SQLException {
super(idocSegment);
}
}