001: /*
002: * $Id: StockQuote.java 11394 2008-03-17 15:18:29Z tcarlson $
003: * --------------------------------------------------------------------------------------
004: * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com
005: *
006: * The software in this package is published under the terms of the CPAL v1.0
007: * license, a copy of which has been included with this distribution in the
008: * LICENSE.txt file.
009: */
010:
011: package org.mule.example.stockquote;
012:
013: import java.io.Serializable;
014:
015: /**
016: * A stock Quote object that is crated from the xml returned from the
017: * http://www.webservicex.net/stockquote.asmx service
018: */
019: public class StockQuote implements Serializable {
020: private static final long serialVersionUID = -3579080716991795218L;
021:
022: private String symbol;
023: private String last;
024: private String change;
025: private String open;
026: private String high;
027: private String low;
028: private String volume;
029: private String previousClose;
030: private String name;
031: private String date;
032:
033: public String getSymbol() {
034: return symbol;
035: }
036:
037: public void setSymbol(String symbol) {
038: this .symbol = symbol;
039: }
040:
041: public String getLast() {
042: return last;
043: }
044:
045: public void setLast(String last) {
046: this .last = last;
047: }
048:
049: public String getChange() {
050: return change;
051: }
052:
053: public void setChange(String change) {
054: this .change = change;
055: }
056:
057: public String getOpen() {
058: return open;
059: }
060:
061: public void setOpen(String open) {
062: this .open = open;
063: }
064:
065: public String getHigh() {
066: return high;
067: }
068:
069: public void setHigh(String high) {
070: this .high = high;
071: }
072:
073: public String getLow() {
074: return low;
075: }
076:
077: public void setLow(String low) {
078: this .low = low;
079: }
080:
081: public String getVolume() {
082: return volume;
083: }
084:
085: public void setVolume(String volume) {
086: this .volume = volume;
087: }
088:
089: public String getPreviousClose() {
090: return previousClose;
091: }
092:
093: public void setPreviousClose(String previousClose) {
094: this .previousClose = previousClose;
095: }
096:
097: public String getName() {
098: return name;
099: }
100:
101: public void setName(String name) {
102: this .name = name;
103: }
104:
105: public String getDate() {
106: return date;
107: }
108:
109: public void setDate(String date) {
110: this .date = date;
111: }
112:
113: @Override
114: public String toString() {
115: return LocaleMessage.getStockQuoteMessage(symbol, name, date,
116: last, change, open, high, low, volume, previousClose);
117: }
118: }
|