Real Time Information Director User Documentation
RTID Metadata Language
Hewlett-Packard Company 10 529618-002
public NativeOrders()
throws MetadataInconsistency, SQLException {
super(documentRecord, "NATIVEORDERS");
}
}
This native document definition contains most of the data captured from an SAP sales
order document. The class is called NativeOrders and extends the class
NativeDocumentDefinition.
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");
}
}
The metadata constructs a DocumentRecord. The first parameter passed to the
DocumentRecord constructor is the name of the principal table for sales orders, which is
SALES_ORDER. Documents created from this document definition include one
SALES_ORDER record at the top.
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");
}
}
The second parameter passed to the DocumentRecord constructor is an array of
RelatedRecords. Notice that the metadata first constructs the array and then, within
braces ({}), constructs the individual objects within the array.