Package com.sleepycat.db

Examples of com.sleepycat.db.Db.open()


        // duplicates are allowed they should always be sorted to allow for
        // efficient joins.
        //
        Db cityIndexDb = new Db(env, 0);
        cityIndexDb.setFlags(Db.DB_DUPSORT);
        cityIndexDb.open(null, SUPPLIER_CITY_INDEX, null,
                         Db.DB_BTREE, flags, 0);
        supplierByCityIndex = new DataIndex(supplierStore, cityIndexDb,
                                        cityKeyFormat, cityExtractor);

        Db partIndexDb = new Db(env, 0);
View Full Code Here


        // In this sample, the stores are opened as sorted and no duplicate
        // keys allowed.  Duplicate keys are not allowed for any entity
        // with indexes or foreign key relationships.
        //
        Db partDb = new Db(env, 0);
        partDb.open(null, PART_STORE, null, Db.DB_BTREE, flags, 0);
        partStore = factory.newDataStore(partDb, Part.class, null);

        Db supplierDb = new Db(env, 0);
        supplierDb.open(null, SUPPLIER_STORE, null, Db.DB_BTREE, flags, 0);
        supplierStore = factory.newDataStore(supplierDb, Supplier.class, null);
View Full Code Here

        supplierByCityIndex = new DataIndex(supplierStore, cityIndexDb,
                                        cityKeyFormat, cityExtractor);

        Db partIndexDb = new Db(env, 0);
        partIndexDb.setFlags(Db.DB_DUPSORT);
        partIndexDb.open(null, SHIPMENT_PART_INDEX, null,
                         Db.DB_BTREE, flags, 0);
        shipmentByPartIndex = new ForeignKeyIndex(shipmentStore, partIndexDb,
                                        partExtractor, partStore,
                                        ForeignKeyIndex.ON_DELETE_CASCADE);
View Full Code Here

        Db partDb = new Db(env, 0);
        partDb.open(null, PART_STORE, null, Db.DB_BTREE, flags, 0);
        partStore = factory.newDataStore(partDb, Part.class, null);

        Db supplierDb = new Db(env, 0);
        supplierDb.open(null, SUPPLIER_STORE, null, Db.DB_BTREE, flags, 0);
        supplierStore = factory.newDataStore(supplierDb, Supplier.class, null);

        Db shipmentDb = new Db(env, 0);
        shipmentDb.open(null, SHIPMENT_STORE, null, Db.DB_BTREE, flags, 0);
        shipmentStore = factory.newDataStore(shipmentDb, Shipment.class, null);
View Full Code Here

        Db supplierDb = new Db(env, 0);
        supplierDb.open(null, SUPPLIER_STORE, null, Db.DB_BTREE, flags, 0);
        supplierStore = factory.newDataStore(supplierDb, Supplier.class, null);

        Db shipmentDb = new Db(env, 0);
        shipmentDb.open(null, SHIPMENT_STORE, null, Db.DB_BTREE, flags, 0);
        shipmentStore = factory.newDataStore(shipmentDb, Shipment.class, null);

        // Open the ForeignKeyIndex, along with the associated the Berkeley
        // DB database, for the part and supplier indices of the shipment
        // store.
View Full Code Here

                                        partExtractor, partStore,
                                        ForeignKeyIndex.ON_DELETE_CASCADE);

        Db supplierIndexDb = new Db(env, 0);
        supplierIndexDb.setFlags(Db.DB_DUPSORT);
        supplierIndexDb.open(null, SHIPMENT_SUPPLIER_INDEX, null,
                             Db.DB_BTREE, flags, 0);
        shipmentBySupplierIndex = new ForeignKeyIndex(shipmentStore,
                                        supplierIndexDb,
                                        supplierExtractor, supplierStore,
                                        ForeignKeyIndex.ON_DELETE_CASCADE);
View Full Code Here

        // keys.  Duplicate keys are allowed since more than one shipment
        // may exist for the same supplier or part.
        //
        Db cityIndexDb = new Db(env, 0);
        cityIndexDb.setFlags(Db.DB_DUPSORT);
        cityIndexDb.open(null, SUPPLIER_CITY_INDEX, null, Db.DB_BTREE,
                         flags, 0);
        supplierByCityIndex = factory.newDataIndex(supplierStore,
                                            cityIndexDb, Supplier.CITY_KEY,
                                            false, true);
View Full Code Here

                                            cityIndexDb, Supplier.CITY_KEY,
                                            false, true);

        Db partIndexDb = new Db(env, 0);
        partIndexDb.setFlags(Db.DB_DUPSORT);
        partIndexDb.open(null, SHIPMENT_PART_INDEX, null, Db.DB_BTREE,
                         flags, 0);
        shipmentByPartIndex = factory.newForeignKeyIndex(shipmentStore,
                                            partIndexDb, Shipment.PART_KEY,
                                            false, true, partStore,
                                            ForeignKeyIndex.ON_DELETE_CASCADE);
View Full Code Here

                                            false, true, partStore,
                                            ForeignKeyIndex.ON_DELETE_CASCADE);

        Db supplierIndexDb = new Db(env, 0);
        supplierIndexDb.setFlags(Db.DB_DUPSORT);
        supplierIndexDb.open(null, SHIPMENT_SUPPLIER_INDEX, null, Db.DB_BTREE,
                             flags, 0);
        shipmentBySupplierIndex = factory.newForeignKeyIndex(shipmentStore,
                                            supplierIndexDb,
                                            Shipment.SUPPLIER_KEY,
                                            false, true, supplierStore,
View Full Code Here

        // to provide ordered keys, since ordering is meaningful when the tuple
        // data format is used.  Duplicate keys are not allowed for any entity
        // with indexes or foreign key relationships.
        //
        Db partDb = new Db(env, 0);
        partDb.open(null, PART_STORE, null, Db.DB_BTREE, flags, 0);
        partStore = new DataStore(partDb, partKeyFormat,
                                  partValueFormat, null);

        Db supplierDb = new Db(env, 0);
        supplierDb.open(null, SUPPLIER_STORE, null, Db.DB_BTREE, flags, 0);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.