1 8 9 package com.sleepycat.bind.tuple; 10 11 import com.sleepycat.bind.EntityBinding; 12 import com.sleepycat.je.DatabaseEntry; 13 14 30 public abstract class TupleTupleBinding extends TupleBase 31 implements EntityBinding { 32 33 36 public TupleTupleBinding() { 37 } 38 39 public Object entryToObject(DatabaseEntry key, DatabaseEntry data) { 41 42 return entryToObject(TupleBinding.entryToInput(key), 43 TupleBinding.entryToInput(data)); 44 } 45 46 public void objectToKey(Object object, DatabaseEntry key) { 48 49 TupleOutput output = getTupleOutput(object); 50 objectToKey(object, output); 51 outputToEntry(output, key); 52 } 53 54 public void objectToData(Object object, DatabaseEntry data) { 56 57 TupleOutput output = getTupleOutput(object); 58 objectToData(object, output); 59 outputToEntry(output, data); 60 } 61 62 64 74 public abstract Object entryToObject(TupleInput keyInput, 75 TupleInput dataInput); 76 77 85 public abstract void objectToKey(Object object, TupleOutput output); 86 87 95 public abstract void objectToData(Object object, TupleOutput output); 96 } 97 | Popular Tags |