00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 package com.sleepycat.bind.tuple;
00011
00012 import com.sleepycat.bind.EntityBinding;
00013 import com.sleepycat.db.DatabaseEntry;
00014
00031 public abstract class TupleTupleBinding extends TupleBase
00032 implements EntityBinding {
00033
00037 public TupleTupleBinding() {
00038 }
00039
00040
00041 public Object entryToObject(DatabaseEntry key, DatabaseEntry data) {
00042
00043 return entryToObject(TupleBinding.entryToInput(key),
00044 TupleBinding.entryToInput(data));
00045 }
00046
00047
00048 public void objectToKey(Object object, DatabaseEntry key) {
00049
00050 TupleOutput output = getTupleOutput(object);
00051 objectToKey(object, output);
00052 outputToEntry(output, key);
00053 }
00054
00055
00056 public void objectToData(Object object, DatabaseEntry data) {
00057
00058 TupleOutput output = getTupleOutput(object);
00059 objectToData(object, output);
00060 outputToEntry(output, data);
00061 }
00062
00063
00064
00075 public abstract Object entryToObject(TupleInput keyInput,
00076 TupleInput dataInput);
00077
00086 public abstract void objectToKey(Object object, TupleOutput output);
00087
00096 public abstract void objectToData(Object object, TupleOutput output);
00097 }