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

PartKey.java

00001 /*-
00002  * See the file LICENSE for redistribution information.
00003  *
00004  * Copyright (c) 2002-2005
00005  *      Sleepycat Software.  All rights reserved.
00006  *
00007  * $Id: PartKey.java,v 12.2 2005/06/16 20:22:32 bostic Exp $
00008  */
00009 
00010 package collections.ship.factory;
00011 
00012 import com.sleepycat.bind.tuple.MarshalledTupleEntry;
00013 import com.sleepycat.bind.tuple.TupleInput;
00014 import com.sleepycat.bind.tuple.TupleOutput;
00015 
00025 public class PartKey implements MarshalledTupleEntry {
00026 
00027     private String number;
00028 
00029     public PartKey(String number) {
00030 
00031         this.number = number;
00032     }
00033 
00034     public final String getNumber() {
00035 
00036         return number;
00037     }
00038 
00039     public String toString() {
00040 
00041         return "[PartKey: number=" + number + ']';
00042     }
00043 
00044     // --- MarshalledTupleEntry implementation ---
00045 
00046     public PartKey() {
00047 
00048         // A no-argument constructor is necessary only to allow the binding to
00049         // instantiate objects of this class.
00050     }
00051 
00052     public void marshalEntry(TupleOutput keyOutput) {
00053 
00054         keyOutput.writeString(this.number);
00055     }
00056 
00057     public void unmarshalEntry(TupleInput keyInput) {
00058 
00059         this.number = keyInput.readString();
00060     }
00061 }

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