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

SupplierKey.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: SupplierKey.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 SupplierKey implements MarshalledTupleEntry {
00026 
00027     private String number;
00028 
00029     public SupplierKey(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 "[SupplierKey: number=" + number + ']';
00042     }
00043 
00044     // --- MarshalledTupleEntry implementation ---
00045 
00046     public SupplierKey() {
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:27 2005 for Berkeley DB 4.4.16 by  doxygen 1.4.2