KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > openedit > store > OrderState


1 /*
2  * Created on Nov 2, 2004
3  */

4 package com.openedit.store;
5
6 /**
7  * @author dbrown
8  *
9  */

10 public class OrderState
11 {
12     protected boolean fieldOk;
13     protected String JavaDoc fieldId;
14     
15     protected String JavaDoc fieldDescription;
16     public String JavaDoc getDescription()
17     {
18         if ( fieldDescription == null)
19         {
20             return "No Order Details Available";
21         }
22         return fieldDescription;
23     }
24     public void setDescription(String JavaDoc inDescription)
25     {
26         fieldDescription = inDescription;
27     }
28     public boolean isOk()
29     {
30         return fieldOk;
31     }
32     public void setOk(boolean inOk)
33     {
34         fieldOk = inOk;
35     }
36
37     public String JavaDoc toString()
38     {
39         return getDescription();
40     }
41     public String JavaDoc getId()
42     {
43         return fieldId;
44     }
45     public void setId(String JavaDoc inId)
46     {
47         fieldId = inId;
48     }
49     public OrderState copy()
50     {
51         OrderState state = new OrderState();
52         state.setId( getId());
53         state.setOk(isOk());
54         state.setDescription(getDescription());
55         return state;
56     }
57 }
58
Popular Tags