Examples of TupleOutput


Examples of com.sleepycat.bind.tuple.TupleOutput

                                      DatabaseEntry primaryKeyEntry,
                                      DatabaseEntry dataEntry,
                                      DatabaseEntry indexKeyEntry)
        throws DatabaseException {

        TupleOutput output = getTupleOutput(null);
        TupleInput primaryKeyInput = entryToInput(primaryKeyEntry);
        Object dataInput = dataBinding.entryToObject(dataEntry);
        if (createSecondaryKey(primaryKeyInput, dataInput, output)) {
            outputToEntry(output, indexKeyEntry);
            return true;
View Full Code Here

Examples of com.sleepycat.bind.tuple.TupleOutput

    }

    public void setUp() {

        SharedTestUtils.printTestName("TupleOrderingTest." + getName());
        out = new TupleOutput();
        prevBuf = null;
    }
View Full Code Here

Examples of com.sleepycat.bind.tuple.TupleOutput

    public void setUp() {

        SharedTestUtils.printTestName("TupleFormatTest." + getName());
        buffer = new DatabaseEntry();
        out = new TupleOutput();
    }
View Full Code Here

Examples of com.sleepycat.bind.tuple.TupleOutput

    void initTuple()
        throws Exception {

        buf = new byte[500];
        to = new TupleOutput(buf);
    }
View Full Code Here

Examples of com.sleepycat.bind.tuple.TupleOutput

  forMoreCoverageTest(binding, val);
    }

    private void forMoreCoverageTest(TupleBinding val1,Object val2) {

        TupleOutput output = new TupleOutput();
        output.writeString("abc");
        val1.objectToEntry(val2, output);
        output.writeString("xyz");

        TupleInput input = new TupleInput(output);
        assertEquals("abc", input.readString());
        Object val3 = val1.entryToObject(input);
        assertEquals("xyz", input.readString());
View Full Code Here

Examples of com.sleepycat.bind.tuple.TupleOutput

    public void testTupleInputBinding() {

        EntryBinding binding = new TupleInputBinding();

        TupleOutput out = new TupleOutput();
        out.writeString("abc");
        binding.objectToEntry(new TupleInput(out), buffer);
        assertEquals(4, buffer.getSize());

        Object result = binding.entryToObject(buffer);
        assertTrue(result instanceof TupleInput);
View Full Code Here

Examples of com.sleepycat.bind.tuple.TupleOutput

        }
    }

    public void testBufferOverride() {

        TupleOutput out = new TupleOutput(new byte[10]);
        CachedOutputBinding binding = new CachedOutputBinding(out);

        binding.used = false;
        binding.objectToEntry("x", buffer);
        assertEquals("x", binding.entryToObject(buffer));
View Full Code Here

Examples of com.sleepycat.bind.tuple.TupleOutput

    }

    // javadoc is inherited
    public void objectToKey(Object object, DatabaseEntry key) {

        TupleOutput output = getTupleOutput(object);
        objectToKey(object, output);
        outputToEntry(output, key);
    }
View Full Code Here

Examples of com.sleepycat.bind.tuple.TupleOutput

                                      DatabaseEntry primaryKeyEntry,
                                      DatabaseEntry dataEntry,
                                      DatabaseEntry indexKeyEntry)
        throws DatabaseException {

        TupleOutput output = getTupleOutput(null);
        TupleInput primaryKeyInput = entryToInput(primaryKeyEntry);
        Object dataInput = dataBinding.entryToObject(dataEntry);
        if (createSecondaryKey(primaryKeyInput, dataInput, output)) {
            outputToEntry(output, indexKeyEntry);
            return true;
View Full Code Here

Examples of com.sleepycat.bind.tuple.TupleOutput

    }

    // javadoc is inherited
    public void objectToKey(Object object, DatabaseEntry key) {

        TupleOutput output = getTupleOutput(object);
        objectToKey(object, output);
        outputToEntry(output, key);
    }
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.