Real Time Information Director User Documentation

RTID Metadata Language
Hewlett-Packard Company 68 529618-002
new EnrichedRecord("CHECKOUT",
new PartitionedSystemKey("CHECKOUTID", "CHECKOUTPID",
checkoutDispenser,
new NaturalKeyAffinity("CARDID",
partitionParameters)));
The Checkout record is further enriched with an Alias, for use in joins.
public static EnrichedRecord aliasedCheckoutRecord =
checkoutRecord.enrich(new Alias("CO"));
Now another record, CheckoutItem, is enriched with the artificial key that represents the
Checkout (CHECKOUTID). The key dispenser is the same one used to enrich the
Checkout record. In this case, the partitioning strategy is SystemKeyAffinity, ensuring
that records representing checked out items are stored in the same partition as the records
representing the checkout transaction.
public static EnrichedRecord checkoutItemRecord =
new EnrichedRecord("CHECKOUTITEM",
new PartitionedKey("CHECKOUTPID", partitionParameters,
new SystemKeyAffinity("CHECKOUTID",
checkoutDispenser)));
Here is an example of how the enriched record, checkoutRecord, and other enriched
records specified in Library.java, are invoked in the Checkout document definition,
Checkout.java:
public static final DocumentRecord documentRecord =
new DocumentRecord(Library.checkoutRecord, new
RelatedRecords[] {
new SplitRecord(Library.libraryCardRecord, new
DependentLinks("CARDID")),
new SplitRecord(Library.branchRecord, new
DependentLinks("BRANCHID")),
new
RelatedRecords(Library.checkoutItemRecord.enrich(new
VirtualColumn("ISBN")), new RelatedRecords[] {
new SplitRecord(Library.itemRecord.enrich(new
CheckoutItemEnrichment()), new DependentLinks("ITEMID")),
new SplitRecord(Library.titleRecord, new
DependentLinks("ISBN"))
})
});
Examples: Queries
Some enrichments are especially useful for extracting information from the data store in
response to queries.