Real Time Information Director User Documentation
    RTID Metadata Language 
Hewlett-Packard Company  22  529618-002   
The following excerpt comes from the bottom of the same document definition: 
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 SplitRecord("SALES_ORDER_FLOW", new Links(new String[] { 
 "SALES_ORDER_NO","PRECEDING_DOCUMENT_NO", 
 "SALES_ORDER_ITEM_NO","PRECEDING_DOCUMENT_ITEM_NO"})), 
 new RelatedRecords("RL_SPEC_SO_DT_EV_OVRRD"), 
 new RelatedRecords("SLS_ORD_SCHEDULE_DT",new RelatedRecords[]{ 
 new HistoryRecord("SLS_ORD_SCH_DT_HIST_STG") 
 }) 
 }) 
 }); 
// Metadata Constructor: 
public Orders05() 
  throws MetadataInconsistency, SQLException  { 
 super(documentRecord, idocSegment); 
} 
} 
Notice the construction of the DocumentRecord, which is largely the same constructor as 
in the example of a native document. The additional tables mentioned in this example 
were omitted from first example for simplicity. 
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 SplitRecord("SALES_ORDER_FLOW", new Links(new String[] { 
 "SALES_ORDER_NO","PRECEDING_DOCUMENT_NO", 
 "SALES_ORDER_ITEM_NO","PRECEDING_DOCUMENT_ITEM_NO"})), 
 new RelatedRecords("RL_SPEC_SO_DT_EV_OVRRD"), 
 new RelatedRecords("SLS_ORD_SCHEDULE_DT",new RelatedRecords[]{ 
 new HistoryRecord("SLS_ORD_SCH_DT_HIST_STG") 
 }) 
 }) 
}); 
// Metadata Constructor: 
public Orders05() 
  throws MetadataInconsistency, SQLException  { 
 super(documentRecord, idocSegment); 
} 
} 
The array of related records includes two split records. The second, 
SALES_ORDER_FLOW, contains a Links object, which says to link the column 
SALES_ORDER_NO in the SALES_ORDER_DETAIL to the column 
PRECEDING_DOCUMENT_NO in the SALES_ORDER_FLOW, and the column 
SALES_ORDER_ITEM_NO in the SALES_ORDER_DETAIL to the column 
PRECEDING_DOCUMENT_ITEM_NO in the SALES_ORDER_FLOW. 










