Package com.sleepycat.persist.impl

Examples of com.sleepycat.persist.impl.PersistKeyBinding.entryToObject()


        entity.validate(entity2);

        /* Read back the primary key and validate it. */
        PersistKeyBinding keyBinding =
            new PersistKeyBinding(catalog, keyCls.getName(), false);
        Object priKey2 = keyBinding.entryToObject(keyEntry);
        assertEquals(priKey, priKey2);
        keyBinding.objectToEntry(priKey2, keyEntry2);
        assertEquals(keyEntry, keyEntry2);

        /* Check raw entity binding. */
 
View Full Code Here


        entity.validate(entity2);

        /* Check raw key binding. */
        PersistKeyBinding rawKeyBinding =
            new PersistKeyBinding(catalog, keyCls.getName(), true);
        Object rawKey = rawKeyBinding.entryToObject(keyEntry);
        rawKeyBinding.objectToEntry(rawKey, keyEntry2);
        priKey2 = keyBinding.entryToObject(keyEntry2);
        assertEquals(priKey, priKey2);
        assertEquals(keyEntry, keyEntry2);
    }
View Full Code Here

        /* Convert secondary key bytes back to an object. */
        PersistKeyBinding keyBinding =
            new PersistKeyBinding(catalog, keyCls.getName(), false);
        if (isKeyPresent) {
            Object keyValue2 = keyBinding.entryToObject(secKeyEntry);
            assertEquals(keyValue, keyValue2);
            DatabaseEntry secKeyEntry2 = new DatabaseEntry();
            keyBinding.objectToEntry(keyValue2, secKeyEntry2);
            assertEquals(secKeyEntry, secKeyEntry2);
        }
View Full Code Here

        /* Convert secondary key bytes back to objects. */
        PersistKeyBinding keyBinding =
            new PersistKeyBinding(catalog, keyCls.getName(), false);
        Set keyValues2 = new HashSet();
        for (DatabaseEntry secKeyEntry : results) {
            Object keyValue2 = keyBinding.entryToObject(secKeyEntry);
            keyValues2.add(keyValue2);
        }
        assertEquals(keyValues, keyValues2);
    }

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.