Package com.sleepycat.collections

Examples of com.sleepycat.collections.StoredMap


                                                  String.class);
        SerialBinding valueBinding = new SerialBinding(catalog,
                                                    TestSerial.class);
        store = openDb(STORE_FILE, false);

        map = new StoredMap(store, keyBinding, valueBinding, true);
    }
View Full Code Here


                                                  String.class);
        SerialBinding valueBinding = new SerialBinding(catalog,
                                                    TestSerial.class);
        store = openDb(STORE_FILE);

        map = new StoredMap(store, keyBinding, valueBinding, true);
    }
View Full Code Here

            }
            keySet = new StoredSortedKeySet(store, keyBinding, true);
            map = smap;
        } else {
            if (isEntityBinding) {
                map = new StoredMap(store, keyBinding, entityBinding,
                                    testStore.getKeyAssigner());
                valueSet = new StoredValueSet(store, entityBinding, true);
            } else {
                map = new StoredMap(store, keyBinding, valueBinding,
                                    testStore.getKeyAssigner());
                valueSet = new StoredValueSet(store, valueBinding, true);
            }
            smap = null;
            keySet = new StoredKeySet(store, keyBinding, true);
View Full Code Here

    void testIndexed()
        throws Exception {

        // create primary map
        if (isEntityBinding) {
            map = new StoredMap(store, keyBinding, entityBinding,
                                testStore.getKeyAssigner());
        } else {
            map = new StoredMap(store, keyBinding, valueBinding,
                                testStore.getKeyAssigner());
        }
        imap = map;
        smap = null;
        // create primary list
        if (testStore.hasRecNumAccess()) {
            if (isEntityBinding) {
                list = new StoredList(store, entityBinding,
                                      testStore.getKeyAssigner());
            } else {
                list = new StoredList(store, valueBinding,
                                      testStore.getKeyAssigner());
            }
            ilist = list;
        }

        addAll();
        readAll();

        // create indexed map (keySet/valueSet)
        if (testStore.isOrdered()) {
            if (isEntityBinding) {
                map = smap = new StoredSortedMap(index, keyBinding,
                                                 entityBinding, true);
                valueSet = new StoredSortedValueSet(index, entityBinding,
                                                    true);
            } else {
                map = smap = new StoredSortedMap(index, keyBinding,
                                                 valueBinding, true);
                // sorted value set is not possible since key cannot be derived
                // for performing subSet, etc.
            }
            keySet = new StoredSortedKeySet(index, keyBinding, true);
        } else {
            if (isEntityBinding) {
                map = new StoredMap(index, keyBinding, entityBinding, true);
                valueSet = new StoredValueSet(index, entityBinding, true);
            } else {
                map = new StoredMap(index, keyBinding, valueBinding, true);
                valueSet = new StoredValueSet(index, valueBinding, true);
            }
            smap = null;
            keySet = new StoredKeySet(index, keyBinding, true);
        }
View Full Code Here

        // StoredSortedMap is not used since the stores and indices are
        // ordered by serialized key objects, which do not provide a very
        // useful ordering.
        //
        partMap =
            new StoredMap(db.getPartDatabase(),
                          partKeyBinding, partDataBinding, true);
        supplierMap =
            new StoredMap(db.getSupplierDatabase(),
                          supplierKeyBinding, supplierDataBinding, true);
        shipmentMap =
            new StoredMap(db.getShipmentDatabase(),
                          shipmentKeyBinding, shipmentDataBinding, true);
    }
View Full Code Here

        // StoredSortedMap is not used since the stores and indices are
        // ordered by serialized key objects, which do not provide a very
        // useful ordering.
        //
        partMap =
            new StoredMap(db.getPartDatabase(),
                          partKeyBinding, partDataBinding, true);
        supplierMap =
            new StoredMap(db.getSupplierDatabase(),
                          supplierKeyBinding, supplierDataBinding, true);
        shipmentMap =
            new StoredMap(db.getShipmentDatabase(),
                          shipmentKeyBinding, shipmentDataBinding, true);
    }
View Full Code Here

            }
            keySet = new StoredSortedKeySet(store, keyBinding, true);
            map = smap;
        } else {
            if (isEntityBinding) {
                map = new StoredMap(store, keyBinding, entityBinding,
                                    testStore.getKeyAssigner());
                valueSet = new StoredValueSet(store, entityBinding, true);
            } else {
                map = new StoredMap(store, keyBinding, valueBinding,
                                    testStore.getKeyAssigner());
                valueSet = new StoredValueSet(store, valueBinding, true);
            }
            smap = null;
            keySet = new StoredKeySet(store, keyBinding, true);
View Full Code Here

    void testIndexed()
        throws Exception {

        // create primary map
        if (isEntityBinding) {
            map = new StoredMap(store, keyBinding, entityBinding,
                                testStore.getKeyAssigner());
        } else {
            map = new StoredMap(store, keyBinding, valueBinding,
                                testStore.getKeyAssigner());
        }
        imap = map;
        smap = null;
        // create primary list
        if (testStore.hasRecNumAccess()) {
            if (isEntityBinding) {
                list = new StoredList(store, entityBinding,
                                      testStore.getKeyAssigner());
            } else {
                list = new StoredList(store, valueBinding,
                                      testStore.getKeyAssigner());
            }
            ilist = list;
        }

        addAll();
        readAll();

        // create indexed map (keySet/valueSet)
        if (testStore.areKeyRangesAllowed()) {
            if (isEntityBinding) {
                map = smap = new StoredSortedMap(index, keyBinding,
                                                 entityBinding, true);
                valueSet = new StoredSortedValueSet(index, entityBinding,
                                                    true);
            } else {
                map = smap = new StoredSortedMap(index, keyBinding,
                                                 valueBinding, true);
                // sorted value set is not possible since key cannot be derived
                // for performing subSet, etc.
            }
            keySet = new StoredSortedKeySet(index, keyBinding, true);
        } else {
            if (isEntityBinding) {
                map = new StoredMap(index, keyBinding, entityBinding, true);
                valueSet = new StoredValueSet(index, entityBinding, true);
            } else {
                map = new StoredMap(index, keyBinding, valueBinding, true);
                valueSet = new StoredValueSet(index, valueBinding, true);
            }
            smap = null;
            keySet = new StoredKeySet(index, keyBinding, true);
        }
View Full Code Here

                                                  String.class);
        SerialBinding valueBinding = new SerialBinding(catalog,
                                                    TestSerial.class);
        store = openDb(STORE_FILE, false);

        map = new StoredMap(store, keyBinding, valueBinding, true);
    }
View Full Code Here

        SerialBinding keyBinding = new SerialBinding(catalog, String.class);
        SerialBinding valueBinding =
      new SerialBinding(catalog, TestSerial.class);
        store = openDb(STORE_FILE);

        map = new StoredMap(store, keyBinding, valueBinding, true);
    }
View Full Code Here

TOP

Related Classes of com.sleepycat.collections.StoredMap

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.