Main Page | Class Hierarchy | Data Structures | Directories | File List | Data Fields | Related Pages

TupleTupleBinding.java

00001 /*-
00002  * See the file LICENSE for redistribution information.
00003  *
00004  * Copyright (c) 2000-2005
00005  *      Sleepycat Software.  All rights reserved.
00006  *
00007  * $Id: TupleTupleBinding.java,v 12.2 2005/08/01 20:25:16 mark Exp $
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     // javadoc is inherited
00041     public Object entryToObject(DatabaseEntry key, DatabaseEntry data) {
00042 
00043         return entryToObject(TupleBinding.entryToInput(key),
00044                              TupleBinding.entryToInput(data));
00045     }
00046 
00047     // javadoc is inherited
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     // javadoc is inherited
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     // abstract methods
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 }

Generated on Sun Dec 25 12:14:30 2005 for Berkeley DB 4.4.16 by  doxygen 1.4.2