Berkeley DB version 4.2.52

## com.sleepycat.bdb.bind.tuple
Class TupleTupleMarshalledKeyExtractor

    java.lang.Object
      |
      +--com.sleepycat.bdb.bind.tuple.TupleTupleKeyExtractor
            |
            +--com.sleepycat.bdb.bind.tuple.TupleTupleMarshalledKeyExtractor

All Implemented Interfaces:
  KeyExtractor

public class TupleTupleMarshalledKeyExtractor
extends TupleTupleKeyExtractor

A concrete key extractor that works in conjunction with a `TupleTupleMarshalledBinding`. This key extractor works by calling the methods of the `MarshalledTupleKeyEntity` interface to extract and clear the index key data.

Note that a marshalled tuple key extractor is somewhat less efficient than a non-marshalled key tuple extractor because more conversions are needed. A marshalled key extractor must convert the data to an object in order to extract the key data, while an unmarshalled key extractor does not.

Constructor Summary
`TupleTupleMarshalledKeyExtractor(TupleTupleMarshalledBinding binding, TupleFormat indexKeyFormat, String keyName, boolean usePrimaryKey, boolean useValue)` Creates a tuple-tuple marshalled key extractor.

Method Summary
`void` `clearIndexKey(TupleInput valueInput, TupleOutput valueOutput)` Clears the index key in the tuple value data.
`void` `extractIndexKey(TupleInput primaryKeyInput, TupleInput valueInput, TupleOutput indexKeyOutput)` Extracts the index key data from primary key tuple and value tuple data.

Methods inherited from class com.sleepycat.bdb.bind.tuple.TupleTupleKeyExtractor
`clearIndexKey, extractIndexKey, getIndexKeyFormat, getPrimaryKeyFormat, getValueFormat`

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

Constructor Detail

### TupleTupleMarshalledKeyExtractor

    public TupleTupleMarshalledKeyExtractor(TupleTupleMarshalledBinding binding,
                                            TupleFormat indexKeyFormat,
                                            String keyName,
                                            boolean usePrimaryKey,
                                            boolean useValue)

  Creates a tuple-tuple marshalled key extractor.

Parameters:
  `binding` - is the binding used for the tuple-tuple entity.
  `indexKeyFormat` - is the index key format.
  `keyName` - is the key name passed to the `MarshalledTupleKeyEntity.marshalIndexKey(java.lang.String, com.sleepycat.bdb.bind.tuple.TupleOutput)` method to identify the index key.
  `usePrimaryKey` - is true if the primary key data is used to construct the index key.
  `useValue` - is true if the value data is used to construct the index key.

Method Detail

### extractIndexKey

    public void extractIndexKey(TupleInput primaryKeyInput,
                                TupleInput valueInput,
                                TupleOutput indexKeyOutput)
                         throws IOException

  Description copied from class: `TupleTupleKeyExtractor`
  Extracts the index key data from primary key tuple and value tuple data.

  Specified by:
    `extractIndexKey` in class `TupleTupleKeyExtractor`
  Parameters:
    `primaryKeyInput` - is the `TupleInput` for the primary key data, or null if no primary key data is used to construct the index key.
    `valueInput` - is the `TupleInput` for the value data, or null if no value data is used to construct the index key.
    `indexKeyOutput` - is the destination index key tuple. For index keys which are optionally present, no tuple data should be output to indicate that the key is not present or null.
    `IOException`

### clearIndexKey

    public void clearIndexKey(TupleInput valueInput,
                              TupleOutput valueOutput)
                       throws IOException

  Description copied from class: `TupleTupleKeyExtractor`
  Clears the index key in the tuple value data. The valueInput should be read and then written to the valueOutput, clearing the index key in the

  Specified by:
    `clearIndexKey` in class `TupleTupleKeyExtractor`
  Parameters:
    `valueInput` - is the `TupleInput` for the value data.
    `valueOutput` - is the destination `TupleOutput`.
    `IOException`

Berkeley DB version 4.2.52

Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.