|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sleepycat.bind.tuple.TupleBase
com.sleepycat.bind.tuple.TupleTupleKeyCreator
public abstract class TupleTupleKeyCreator
An abstract key creator that uses a tuple key and a tuple data entry. This
class takes care of converting the key and data entry to/from TupleInput
and TupleOutput
objects.
The following abstract method must be implemented by a concrete subclass
to create the index key using these objects
Constructor Summary | |
---|---|
TupleTupleKeyCreator()
Creates a tuple-tuple key creator. |
Method Summary | |
---|---|
boolean |
createSecondaryKey(SecondaryDatabase db,
DatabaseEntry primaryKeyEntry,
DatabaseEntry dataEntry,
DatabaseEntry indexKeyEntry)
|
abstract boolean |
createSecondaryKey(TupleInput primaryKeyInput,
TupleInput dataInput,
TupleOutput indexKeyOutput)
Creates the index key from primary key tuple and data tuple. |
boolean |
nullifyForeignKey(SecondaryDatabase db,
DatabaseEntry dataEntry)
|
boolean |
nullifyForeignKey(TupleInput dataInput,
TupleOutput dataOutput)
Clears the index key in the tuple data entry. |
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 |
---|
public TupleTupleKeyCreator()
Method Detail |
---|
public boolean createSecondaryKey(SecondaryDatabase db, DatabaseEntry primaryKeyEntry, DatabaseEntry dataEntry, DatabaseEntry indexKeyEntry) throws DatabaseException
createSecondaryKey
in interface SecondaryKeyCreator
DatabaseException
public boolean nullifyForeignKey(SecondaryDatabase db, DatabaseEntry dataEntry) throws DatabaseException
DatabaseException
public abstract boolean createSecondaryKey(TupleInput primaryKeyInput, TupleInput dataInput, TupleOutput indexKeyOutput)
primaryKeyInput
- is the TupleInput
for the primary key
entry.dataInput
- is the TupleInput
for the data entry.indexKeyOutput
- is the destination index key tuple.
public boolean nullifyForeignKey(TupleInput dataInput, TupleOutput dataOutput)
The secondary key should be output or removed by this method such
that 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.
dataInput
- is the TupleInput
for the data entry.dataOutput
- is the destination TupleOutput
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |