Package com.sleepycat.db

Examples of com.sleepycat.db.SecondaryMultiKeyCreator


        SecondaryKeyMetadata secKeyMeta =
            entityMeta.getSecondaryKeys().get(keyName);
        assertNotNull(secKeyMeta);

        /* Create key creator/nullifier. */
        SecondaryMultiKeyCreator keyCreator = new PersistKeyCreator
            (catalog, entityMeta, keyCls.getName(), secKeyMeta);

        /* Convert entity to bytes. */
        PersistEntityBinding entityBinding =
            new PersistEntityBinding(catalog, entityCls.getName(), false);
        entityBinding.objectToData(entity, dataEntry);
        entityBinding.objectToKey(entity, keyEntry);

        /* Extract secondary key bytes from entity bytes. */
        Set<DatabaseEntry> results = new HashSet<DatabaseEntry>();
        keyCreator.createSecondaryKeys
            (null, keyEntry, dataEntry, results);
        assertEquals(keyValues.size(), results.size());

        /* Convert secondary key bytes back to objects. */
        PersistKeyBinding keyBinding =
View Full Code Here

TOP

Related Classes of com.sleepycat.db.SecondaryMultiKeyCreator

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.