1 8 9 package com.sleepycat.bind.serial; 10 11 import com.sleepycat.bind.tuple.MarshalledTupleKeyEntity; 12 import com.sleepycat.bind.tuple.TupleInput; 13 import com.sleepycat.bind.tuple.TupleOutput; 14 15 31 public class TupleSerialMarshalledBinding extends TupleSerialBinding { 32 33 43 public TupleSerialMarshalledBinding(ClassCatalog classCatalog, 44 Class baseClass) { 45 46 this(new SerialBinding(classCatalog, baseClass)); 47 } 48 49 55 public TupleSerialMarshalledBinding(SerialBinding dataBinding) { 56 57 super(dataBinding); 58 } 59 60 public Object entryToObject(TupleInput tupleInput, Object javaInput) { 62 63 67 MarshalledTupleKeyEntity entity = (MarshalledTupleKeyEntity) javaInput; 68 69 if (tupleInput != null) { entity.unmarshalPrimaryKey(tupleInput); 71 } 72 return entity; 73 } 74 75 public void objectToKey(Object object, TupleOutput output) { 77 78 80 MarshalledTupleKeyEntity entity = (MarshalledTupleKeyEntity) object; 81 entity.marshalPrimaryKey(output); 82 } 83 84 public Object objectToData(Object object) { 86 87 90 return object; 91 } 92 } 93 | Popular Tags |