O'Reilly logo

.NET Patterns: Architecture, Design, and Process by Christian Thilmany

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Schema Indexer

Intent

To be able to index, create a set of lookup keys, and provide a means of data retrieval for Schema Fields (above) and the Poly Model composite pattern.

Problem

When using the Poly Model pattern, unless you know the transaction ID key of the stored record, you will have a difficult time retrieving that data. Traversing each record, reading its XML instance data, then performing an XPath query on the returned XML would take a prohibitive amount of time. The Schema Indexer, a child pattern to the Poly Model, performs this task by adding an additional step to each transaction's save operation.

If you recalled during the StoreTransaction operation in the first section, there was a call to StoreKeys(). (StoreKeys() will be shown ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required