/**
* Create the data bindings and collection views.
*/
public SampleViews(SampleDatabase db) {
TupleSerialDbFactory factory = db.getFactory();
// Create map views for all stores and indices.
// StoredSortedMap is used since the stores and indices are ordered
// (they use the DB_BTREE access method).
//
partMap =
factory.newSortedMap(db.getPartStore(),
PartKey.class, true);
supplierMap =
factory.newSortedMap(db.getSupplierStore(),
SupplierKey.class, true);
shipmentMap =
factory.newSortedMap(db.getShipmentStore(),
ShipmentKey.class, true);
shipmentByPartMap =
factory.newSortedMap(db.getShipmentByPartIndex(),
PartKey.class, true);
shipmentBySupplierMap =
factory.newSortedMap(db.getShipmentBySupplierIndex(),
SupplierKey.class, true);
supplierByCityMap =
factory.newSortedMap(db.getSupplierByCityIndex(),
String.class, true);
}