public class TupleSerialMarshalledKeyCreator<D extends MarshalledTupleKeyEntity> extends TupleSerialKeyCreator<D>
TupleSerialMarshalledBinding. This key creator works by calling the
methods of the MarshalledTupleKeyEntity interface to create and
clear the index key fields.dataBinding| Constructor and Description |
|---|
TupleSerialMarshalledKeyCreator(TupleSerialMarshalledBinding<D> binding,
java.lang.String keyName)
Creates a tuple-serial marshalled key creator.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
createSecondaryKey(TupleInput primaryKeyInput,
D dataInput,
TupleOutput indexKeyOutput)
Creates the index key entry from primary key tuple entry and
deserialized data entry.
|
D |
nullifyForeignKey(D dataInput)
Clears the index key in the deserialized data entry.
|
createSecondaryKey, nullifyForeignKeyentryToInput, getTupleBufferSize, getTupleOutput, inputToEntry, newOutput, newOutput, outputToEntry, setTupleBufferSizepublic TupleSerialMarshalledKeyCreator(TupleSerialMarshalledBinding<D> binding, java.lang.String keyName)
binding - is the binding used for the tuple-serial entity.keyName - is the key name passed to the MarshalledTupleKeyEntity.marshalSecondaryKey(java.lang.String, com.sleepycat.bind.tuple.TupleOutput) method to identify the
index key.public boolean createSecondaryKey(TupleInput primaryKeyInput, D dataInput, TupleOutput indexKeyOutput)
TupleSerialKeyCreatorcreateSecondaryKey in class TupleSerialKeyCreator<D extends MarshalledTupleKeyEntity>primaryKeyInput - is the TupleInput for the primary key
entry, or null if no primary key entry is used to construct the index
key.dataInput - is the deserialized data entry, or null if no data
entry is used to construct the index key.indexKeyOutput - is the destination index key tuple. For index
keys which are optionally present, no tuple entry should be output to
indicate that the key is not present or null.public D nullifyForeignKey(D dataInput)
TupleSerialKeyCreatorOn entry the data parameter contains the index key to be cleared. It
should be changed by this method such that TupleSerialKeyCreator.createSecondaryKey(com.sleepycat.db.SecondaryDatabase, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry)
will return false. Other fields in the data object should remain
unchanged.
nullifyForeignKey in class TupleSerialKeyCreator<D extends MarshalledTupleKeyEntity>dataInput - is the source and destination deserialized data
entry.Copyright (c) 1996, 2016 Oracle and/or its affiliates. All rights reserved.