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:41 bostic Exp $
00008  */
00009 
00010 package collections.ship.marshal;
00011 
00012 import com.sleepycat.bind.tuple.TupleInput;
00013 import com.sleepycat.bind.tuple.TupleOutput;
00014 
00024 public class SupplierKey implements MarshalledKey {
00025 
00026     private String number;
00027 
00028     public SupplierKey(String number) {
00029 
00030         this.number = number;
00031     }
00032 
00033     public final String getNumber() {
00034 
00035         return number;
00036     }
00037 
00038     public String toString() {
00039 
00040         return "[SupplierKey: number=" + number + ']';
00041     }
00042 
00043     // --- MarshalledKey implementation ---
00044 
00045     SupplierKey() {
00046 
00047         // A no-argument constructor is necessary only to allow the binding to
00048         // instantiate objects of this class.
00049     }
00050 
00051     public void unmarshalKey(TupleInput keyInput) {
00052 
00053         this.number = keyInput.readString();
00054     }
00055 
00056     public void marshalKey(TupleOutput keyOutput) {
00057 
00058         keyOutput.writeString(this.number);
00059     }
00060 }

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