View Javadoc
1   /*
2    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
3    * The software in this package is published under the terms of the CPAL v1.0
4    * license, a copy of which has been included with this distribution in the
5    * LICENSE.txt file.
6    */
7   package org.mule.example.stockquote;
8   
9   import java.io.Serializable;
10  
11  /**
12   * A stock Quote object that is crated from the xml returned from the
13   * http://www.webservicex.net/stockquote.asmx service
14   */
15  public class StockQuote implements Serializable
16  {
17      private static final long serialVersionUID = -3579080716991795218L;
18  
19      private String symbol;
20      private String last;
21      private String change;
22      private String open;
23      private String high;
24      private String low;
25      private String volume;
26      private String previousClose;
27      private String name;
28      private String date;
29  
30      public String getSymbol()
31      {
32          return symbol;
33      }
34  
35      public void setSymbol(String symbol)
36      {
37          this.symbol = symbol;
38      }
39  
40      public String getLast()
41      {
42          return last;
43      }
44  
45      public void setLast(String last)
46      {
47          this.last = last;
48      }
49  
50      public String getChange()
51      {
52          return change;
53      }
54  
55      public void setChange(String change)
56      {
57          this.change = change;
58      }
59  
60      public String getOpen()
61      {
62          return open;
63      }
64  
65      public void setOpen(String open)
66      {
67          this.open = open;
68      }
69  
70      public String getHigh()
71      {
72          return high;
73      }
74  
75      public void setHigh(String high)
76      {
77          this.high = high;
78      }
79  
80      public String getLow()
81      {
82          return low;
83      }
84  
85      public void setLow(String low)
86      {
87          this.low = low;
88      }
89  
90      public String getVolume()
91      {
92          return volume;
93      }
94  
95      public void setVolume(String volume)
96      {
97          this.volume = volume;
98      }
99  
100     public String getPreviousClose()
101     {
102         return previousClose;
103     }
104 
105     public void setPreviousClose(String previousClose)
106     {
107         this.previousClose = previousClose;
108     }
109 
110     public String getName()
111     {
112         return name;
113     }
114 
115     public void setName(String name)
116     {
117         this.name = name;
118     }
119 
120     public String getDate()
121     {
122         return date;
123     }
124 
125     public void setDate(String date)
126     {
127         this.date = date;
128     }
129 
130     @Override
131     public String toString()
132     {
133         return LocaleMessage.getStockQuoteMessage(symbol, name, date, last, change, open, high,
134             low, volume, previousClose);
135     }
136 }