public interface MarshalledTupleKeyEntity
MarshalledTupleKeyEntity
objects are instantiated
using Java deserialization, no particular constructor is required by classes
that implement this interface.
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 entry to an object in order to extract the key fields, while an unmarshalled key extractor does not.
Modifier and Type | Method | Description |
---|---|---|
void |
marshalPrimaryKey(TupleOutput keyOutput) |
Extracts the entity's primary key and writes it to the key output.
|
boolean |
marshalSecondaryKey(java.lang.String keyName,
TupleOutput keyOutput) |
Extracts the entity's secondary key and writes it to the key output.
|
boolean |
nullifyForeignKey(java.lang.String keyName) |
Clears the entity's secondary key fields for the given key name.
|
void |
unmarshalPrimaryKey(TupleInput keyInput) |
Completes construction of the entity by setting its primary key from the
stored primary key.
|
void marshalPrimaryKey(TupleOutput keyOutput)
keyOutput
- is the output tuple.void unmarshalPrimaryKey(TupleInput keyInput)
keyInput
- is the input tuple.boolean marshalSecondaryKey(java.lang.String keyName, TupleOutput keyOutput)
keyName
- identifies the secondary key.keyOutput
- is the output tuple.boolean nullifyForeignKey(java.lang.String keyName)
The specified index key should be changed by this method such that
marshalSecondaryKey(java.lang.String, com.sleepycat.bind.tuple.TupleOutput)
for the same key name will return false.
Other fields in the data object should remain unchanged.
If ForeignKeyDeleteAction.NULLIFY
was
specified when opening the secondary database, this method is called
when the entity for this foreign key is deleted. If NULLIFY was not
specified, this method will not be called and may always return
false.
keyName
- identifies the secondary key.Copyright (c) 1996, 2020 Oracle and/or its affiliates. All rights reserved.