• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/ap/gpl/timemachine/db-4.7.25.NC/examples_java/src/collections/ship/marshal/
1/*-
2 * See the file LICENSE for redistribution information.
3 *
4 * Copyright (c) 2002,2008 Oracle.  All rights reserved.
5 *
6 * $Id: MarshalledKey.java,v 12.7 2008/01/08 20:58:30 bostic Exp $
7 */
8
9package collections.ship.marshal;
10
11import com.sleepycat.bind.tuple.TupleInput;
12import 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 */
25interface 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