Berkeley DB Java Edition version 3.2.13

## com.sleepycat.bind.tuple
Class TupleTupleBinding

    java.lang.Object
      com.sleepycat.bind.tuple.TupleBase
          com.sleepycat.bind.tuple.TupleTupleBinding

All Implemented Interfaces:
  EntityBinding

Direct Known Subclasses:
  TupleTupleMarshalledBinding

    public abstract class TupleTupleBinding

extends TupleBase
implements EntityBinding

An abstract `EntityBinding` that treats an entity's key entry and data entry as tuples.

This class takes care of converting the entries to/from `TupleInput` and `TupleOutput` objects. Its three abstract methods must be implemented by a concrete subclass to convert between tuples and entity objects.

- `entryToObject(TupleInput,TupleInput)`
- `objectToKey(Object,TupleOutput)`
- `objectToData(Object,TupleOutput)`

Author:
  Mark Hayes

Constructor Summary
`TupleTupleBinding()` Creates a tuple-tuple entity binding.

Method Summary
`Object` `entryToObject(DatabaseEntry key, DatabaseEntry data)` Converts key and data entry buffers into an entity Object.
`abstract Object` `entryToObject(TupleInput keyInput, TupleInput dataInput)` Constructs an entity object from `TupleInput` key and data entries.
`void` `objectToData(Object object, DatabaseEntry data)` Extracts the data entry from an entity Object.
`abstract void` `objectToData(Object object, TupleOutput output)` Extracts a key tuple from an entity object.
`void` `objectToKey(Object object, DatabaseEntry key)` Extracts the key entry from an entity Object.
`abstract void` `objectToKey(Object object, TupleOutput output)` Extracts a key tuple from an entity object.

Methods inherited from class com.sleepycat.bind.tuple.TupleBase
`entryToInput, getTupleBufferSize, getTupleOutput, inputToEntry, newOutput, newOutput, outputToEntry, setTupleBufferSize`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### TupleTupleBinding

    public TupleTupleBinding()

  Creates a tuple-tuple entity binding.

Method Detail

### entryToObject

    public Object entryToObject(DatabaseEntry key,
                                DatabaseEntry data)

  Description copied from interface: `EntityBinding`
  Converts key and data entry buffers into an entity Object.

  Specified by:
    `entryToObject` in interface `EntityBinding`
  Parameters:
    `key` - is the source key entry.
    `data` - is the source data entry.
  Returns:
    the resulting Object.

### objectToKey

    public void objectToKey(Object object,
                            DatabaseEntry key)

  Description copied from interface: `EntityBinding`
  Extracts the key entry from an entity Object.

  Specified by:
    `objectToKey` in interface `EntityBinding`
  Parameters:
    `object` - is the source Object.
    `key` - is the destination entry buffer.

### objectToData

    public void objectToData(Object object,
                             DatabaseEntry data)

  Description copied from interface: `EntityBinding`
  Extracts the data entry from an entity Object.

  Specified by:
    `objectToData` in interface `EntityBinding`
  Parameters:
    `object` - is the source Object.
    `data` - is the destination entry buffer.

### entryToObject

    public abstract Object entryToObject(TupleInput keyInput,
                                         TupleInput dataInput)

  Constructs an entity object from `TupleInput` key and data entries.

  Parameters:
    `keyInput` - is the `TupleInput` key entry object.
    `dataInput` - is the `TupleInput` data entry object.
  Returns:
    the entity object constructed from the key and data.

### objectToKey

    public abstract void objectToKey(Object object,
                                     TupleOutput output)

  Extracts a key tuple from an entity object.

  Parameters:
    `object` - is the entity object.
    `output` - is the `TupleOutput` to which the key should be written.

### objectToData

    public abstract void objectToData(Object object,
                                      TupleOutput output)

  Extracts a key tuple from an entity object.

  Parameters:
    `object` - is the entity object.
    `output` - is the `TupleOutput` to which the data should be written.

Berkeley DB Java Edition version 3.2.13

Copyright 1996,2006 Oracle. All rights reserved.