com.sleepycat.bind.tuple

Class LongBinding

public class LongBinding extends TupleBinding

A concrete TupleBinding for a Long primitive wrapper or a long primitive.

There are two ways to use this class:

  1. When using the com.sleepycat.db package directly, the static methods in this class can be used to convert between primitive values and DatabaseEntry objects.
  2. When using the com.sleepycat.collections package, an instance of this class can be used with any stored collection. The easiest way to obtain a binding instance is with the TupleBinding method.
Method Summary
static longentryToLong(DatabaseEntry entry)
Converts an entry buffer into a simple long value.
ObjectentryToObject(TupleInput input)
protected TupleOutputgetTupleOutput(Object object)
static voidlongToEntry(long val, DatabaseEntry entry)
Converts a simple long value into an entry buffer.
voidobjectToEntry(Object object, TupleOutput output)

Method Detail

entryToLong

public static long entryToLong(DatabaseEntry entry)
Converts an entry buffer into a simple long value.

Parameters: entry is the source entry buffer.

Returns: the resulting value.

entryToObject

public Object entryToObject(TupleInput input)

getTupleOutput

protected TupleOutput getTupleOutput(Object object)

longToEntry

public static void longToEntry(long val, DatabaseEntry entry)
Converts a simple long value into an entry buffer.

Parameters: val is the source value. entry is the destination entry buffer.

objectToEntry

public void objectToEntry(Object object, TupleOutput output)