KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sleepycat > bind > tuple > MarshalledTupleEntry


1 /*-
2  * See the file LICENSE for redistribution information.
3  *
4  * Copyright (c) 2000,2006 Oracle. All rights reserved.
5  *
6  * $Id: MarshalledTupleEntry.java,v 1.21 2006/10/30 21:14:08 bostic Exp $
7  */

8
9 package com.sleepycat.bind.tuple;
10
11 /**
12  * A marshalling interface implemented by key, data or entity classes that
13  * are represented as tuples.
14  *
15  * <p>Key classes implement this interface to marshal their key entry. Data or
16  * entity classes implement this interface to marshal their data entry.
17  * Implementations of this interface must have a public no arguments
18  * constructor so that they can be instantiated by a binding, prior to calling
19  * the {@link #unmarshalEntry} method.</p>
20  *
21  * <p>Note that implementing this interface is not necessary when the object is
22  * a Java simple type, for example: String, Integer, etc. These types can be
23  * used with built-in bindings returned by {@link
24  * TupleBinding#getPrimitiveBinding}.</p>
25  *
26  * @author Mark Hayes
27  * @see TupleTupleMarshalledBinding
28  */

29 public interface MarshalledTupleEntry {
30
31     /**
32      * Construct the key or data tuple entry from the key or data object.
33      *
34      * @param dataOutput is the output tuple.
35      */

36     void marshalEntry(TupleOutput dataOutput);
37
38     /**
39      * Construct the key or data object from the key or data tuple entry.
40      *
41      * @param dataInput is the input tuple.
42      */

43     void unmarshalEntry(TupleInput dataInput);
44 }
45
Popular Tags