Real Time Information Director User Documentation
    RTID Metadata Language 
Hewlett-Packard Company  12  529618-002   
The Director automatically constructs the prepared SQL statements required to select, 
insert, and delete these records. 
package com.hp.rtsc.documents; 
import com.hp.rtsc.metadata.*; 
import java.sql.SQLException; 
public class NativeOrders extends NativeDocumentDefinition { 
  private static DocumentRecord documentRecord = 
  new DocumentRecord("SALES_ORDER", new RelatedRecords[] { 
 new RelatedRecords("ROLE_SPEC_SLS_ORD_EVENT"), 
 new RelatedRecords("SALES_ORDER_DETAIL", new RelatedRecords[]{ 
 new SplitRecord("SLS_ORD_SPEC_BUSINESS"), 
 new RelatedRecords("RL_SPEC_SO_DT_EV_OVRRD"), 
 new RelatedRecords("SLS_ORD_SCHEDULE_DT") 
 }) 
 }); 
  public NativeOrders() 
 throws MetadataInconsistency, SQLException  { 
 super(documentRecord, "NATIVEORDERS"); 
 } 
} 
Near the end of the document definition is the constructor of the NativeOrders class. 
This constructor calls the superclass constructor with the documentRecord already 
constructed, and with the name of this document, “NATIVEORDERS”. 
Specifying a Native Document 
As the example illustrates, to specify a Native Document, you create a class that has a 
unique name and extends NativeDocumentDefinition. 
Then you construct a DocumentRecord to specify the document content metadata. Here 
you enumerate and show the relations among records associated with the document, 
using parameters described in “DocumentRecord,” below. 
You implement a constructor for your Native Document. This constructor calls the 
superclass constructor with a reference to the document record, the name of the 
document, and possibly various update and query options. The name of the document 
must be unique; it is the top-level XML tag in the document. The additional options 
weren’t shown in the example, which was simple, but are listed in “Update and Query 
Options for Document Definitions,” below. 










