Package com.sleepycat.bdb.collection

Examples of com.sleepycat.bdb.collection.StoredMap


        store = new DataStore(openDb(STORE_FILE),
                              keyFormat, valueFormat, null);

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


     * to create a read-only collection.
     */
    public StoredMap newMap(DataStore store, Class keyClass,
                            boolean writeAllowed) {

        return new StoredMap(store,
                        getKeyBinding(keyClass),
                        getEntityBinding(store),
                        writeAllowed);
    }
View Full Code Here

     * to create a read-only collection.
     */
    public StoredMap newMap(DataIndex index, Class keyClass,
                            boolean writeAllowed) {

        return new StoredMap(index,
                        getKeyBinding(keyClass),
                        getEntityBinding(index.getStore()),
                        writeAllowed);
    }
View Full Code Here

            }
            keySet = new StoredSortedKeySet(store, keyBinding, true);
            map = smap;
        } else {
            if (isEntityBinding) {
                map = new StoredMap(store, keyBinding, entityBinding, true);
                valueSet = new StoredValueSet(store, entityBinding, true);
            } else {
                map = new StoredMap(store, keyBinding, valueBinding, true);
                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, true);
        } else {
            map = new StoredMap(store, keyBinding, valueBinding, true);
        }
        imap = map;
        smap = null;
        // create primary list
        if (testStore.hasRecNumAccess()) {
            if (isEntityBinding) {
                list = new StoredList(store, entityBinding, true);
            } else {
                list = new StoredList(store, valueBinding, true);
            }
            ilist = list;
        }

        setAutoCommit();
        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);
                valueSet = new StoredSortedValueSet(index, valueBinding, true);
            }
            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.getPartStore(),
                          partKeyBinding, partValueBinding, true);
        supplierMap =
            new StoredMap(db.getSupplierStore(),
                          supplierKeyBinding, supplierValueBinding, true);
        shipmentMap =
            new StoredMap(db.getShipmentStore(),
                          shipmentKeyBinding, shipmentValueBinding, true);
        shipmentByPartMap =
            new StoredMap(db.getShipmentByPartIndex(),
                          partKeyBinding, shipmentValueBinding, true);
        shipmentBySupplierMap =
            new StoredMap(db.getShipmentBySupplierIndex(),
                          supplierKeyBinding, shipmentValueBinding, true);
        supplierByCityMap =
            new StoredMap(db.getSupplierByCityIndex(),
                          cityKeyBinding, supplierValueBinding, 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.getPartStore(),
                          partKeyBinding, partValueBinding, true);
        supplierMap =
            new StoredMap(db.getSupplierStore(),
                          supplierKeyBinding, supplierValueBinding, true);
        shipmentMap =
            new StoredMap(db.getShipmentStore(),
                          shipmentKeyBinding, shipmentValueBinding, 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.getPartStore(),
                          partKeyBinding, partValueBinding, true);
        supplierMap =
            new StoredMap(db.getSupplierStore(),
                          supplierKeyBinding, supplierValueBinding, true);
        shipmentMap =
            new StoredMap(db.getShipmentStore(),
                          shipmentKeyBinding, shipmentValueBinding, true);
        shipmentByPartMap =
            new StoredMap(db.getShipmentByPartIndex(),
                          partKeyBinding, shipmentValueBinding, true);
        shipmentBySupplierMap =
            new StoredMap(db.getShipmentBySupplierIndex(),
                          supplierKeyBinding, shipmentValueBinding, true);
        supplierByCityMap =
            new StoredMap(db.getSupplierByCityIndex(),
                          cityKeyBinding, supplierValueBinding, true);
    }
View Full Code Here

TOP

Related Classes of com.sleepycat.bdb.collection.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.