KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > collections > ship > marshal > MarshalledKey


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

8
9 package collections.ship.marshal;
10
11 import com.sleepycat.bind.tuple.TupleInput;
12 import com.sleepycat.bind.tuple.TupleOutput;
13
14 /**
15  * MarshalledKey is implemented by key objects and called by {@link
16  * SampleViews.MarshalledKeyBinding}. In this sample, MarshalledKey is
17  * implemented by {@link PartKey}, {@link SupplierKey}, and {@link
18  * ShipmentKey}. This interface is package-protected rather than public to
19  * hide the marshalling interface from other users of the data objects. Note
20  * that a MarshalledKey must also have a no arguments constructor so
21  * that it can be instantiated by the binding.
22  *
23  * @author Mark Hayes
24  */

25 interface MarshalledKey {
26
27     /**
28      * Construct the key tuple entry from the key object.
29      */

30     void marshalKey(TupleOutput keyOutput);
31
32     /**
33      * Construct the key object from the key tuple entry.
34      */

35     void unmarshalKey(TupleInput keyInput);
36 }
37
Popular Tags