Package com.sleepycat.bind.tuple

Examples of com.sleepycat.bind.tuple.LongBinding


        LongBinding.longToEntry(123, entry);
  assertEquals(8, entry.getData().length);
        assertEquals(123, LongBinding.entryToLong(entry));

        new LongBinding().objectToEntry(new Long(123), entry);
  assertEquals(8, entry.getData().length);

        FloatBinding.floatToEntry((float) 123.123, entry);
  assertEquals(4, entry.getData().length);
        assertTrue(((float) 123.123) == FloatBinding.entryToFloat(entry));
View Full Code Here


    private final DirectoryHandler handler;

    public BdbEnvironmentHandlerImpl(DirectoryHandler newHandler) {
        this.handler = newHandler;
        binding.put(String.class, new StringBinding());
        binding.put(Long.class, new LongBinding());
        binding.put(LinkedList.class, new org.jrdf.util.bdb.LongListBinding());
        binding.put(BlankNode.class, new BlankNodeBinding());
        binding.put(Node.class, new NodeBinding());
        binding.put(PredicateNode.class, new NodeBinding());
        binding.put(Triple.class, new TripleBinding());
View Full Code Here

        LongBinding.longToEntry(123, entry);
  assertEquals(8, entry.getData().length);
        assertEquals(123, LongBinding.entryToLong(entry));

        new LongBinding().objectToEntry(new Long(123), entry);
  assertEquals(8, entry.getData().length);

        FloatBinding.floatToEntry((float) 123.123, entry);
  assertEquals(4, entry.getData().length);
        assertTrue(((float) 123.123) == FloatBinding.entryToFloat(entry));
View Full Code Here

        Cursor c  = db.openCursor(tx,null);

        DatabaseEntry key = new DatabaseEntry();
        DatabaseEntry val = new DatabaseEntry();

        LongBinding keyBinding = new LongBinding();
        List<Long> ids = new ArrayList();

        OperationStatus op = null;
        while((op  = c.getNext(key, val, LockMode.DEFAULT)) == OperationStatus.SUCCESS) {
            ids.add(LongBinding.entryToLong(key));
        }
        c.close();

        for (Long id : ids) {
            keyBinding.objectToEntry(id, key);
            db.delete(tx, key);
        }

        tx.commit();
    }
View Full Code Here

            put(context);
        }
    }

    public Iterator<ImportContext> iterator() {
        return new StoredMap<Long, ImportContext>(db, new LongBinding(), importBinding, false)
            .values().iterator();
    }
View Full Code Here

        return key(context.getId());
    }

    DatabaseEntry key(long id) {
        DatabaseEntry key = new DatabaseEntry();
        new LongBinding().objectToEntry(id, key);
        return key;
    }
View Full Code Here

TOP

Related Classes of com.sleepycat.bind.tuple.LongBinding

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.