Examples of TupleSerialDbFactory


Examples of com.sleepycat.bdb.factory.TupleSerialDbFactory

        int openFlags = Db.DB_CREATE;
        if (testEnv.isTxnMode())
            openFlags |= Db.DB_AUTO_COMMIT;

        catalog = new StoredClassCatalog(env, "catalog.db", null, openFlags);
        factory = new TupleSerialDbFactory(catalog);
        assertSame(catalog, factory.getCatalog());

        int type = isSorted ? Db.DB_BTREE : Db.DB_HASH;
        Db db;
View Full Code Here

Examples of com.sleepycat.bdb.factory.TupleSerialDbFactory

    private void createDatabase()
        throws Exception {

        catalog = new StoredClassCatalog(env, "catalog.db", null,
                                         Db.DB_CREATE | Db.DB_AUTO_COMMIT);
        factory = new TupleSerialDbFactory(catalog);
        assertSame(catalog, factory.getCatalog());

        store = factory.newDataStore(openDb("store.db", false),
                                        MarshalledObject.class, null);
View Full Code Here

Examples of com.sleepycat.bdb.factory.TupleSerialDbFactory

    private void createDatabase()
        throws Exception {

        catalog = new StoredClassCatalog(env, "catalog.db", null, openFlags);
        factory = new TupleSerialDbFactory(catalog);
        assertSame(catalog, factory.getCatalog());

        store1 = factory.newDataStore(openDb("store1.db"),
                                        MarshalledObject.class, null);
View Full Code Here

Examples of com.sleepycat.bdb.factory.TupleSerialDbFactory

        // Use the TupleSerialDbFactory for a Serial/Tuple-based database
        // where marshalling interfaces are used.  This opens the Serial
        // class catalog automatically.
        //
        factory = new TupleSerialDbFactory(javaCatalog);

        // Open the Berkeley DB database, along with the associated
        // DataStore, for the part, supplier and shipment stores.
        // In this sample, the stores are opened as sorted and no duplicate
        // keys allowed.  Duplicate keys are not allowed for any entity
View Full Code Here

Examples of com.sleepycat.bdb.factory.TupleSerialDbFactory

    /**
     * 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);
    }
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.