001 /** 002 * Licensed to the Apache Software Foundation (ASF) under one or more 003 * contributor license agreements. See the NOTICE file distributed with 004 * this work for additional information regarding copyright ownership. 005 * The ASF licenses this file to You under the Apache License, Version 2.0 006 * (the "License"); you may not use this file except in compliance with 007 * the License. You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017 package org.apache.geronimo.samples.daytrader.client.ws; 018 019 public class MarketSummaryDataBeanWS { 020 private java.math.BigDecimal TSIA; 021 private java.math.BigDecimal openTSIA; 022 private double volume; 023 private org.apache.geronimo.samples.daytrader.client.ws.QuoteDataBean[] topGainers; 024 private org.apache.geronimo.samples.daytrader.client.ws.QuoteDataBean[] topLosers; 025 private java.util.Calendar summaryDate; 026 027 public MarketSummaryDataBeanWS() { 028 } 029 030 public String toString() { 031 String ret = "\n\tMarket Summary at: " + getSummaryDate() 032 + "\n\t\t TSIA:" + getTSIA() 033 + "\n\t\t openTSIA:" + getOpenTSIA() 034 + "\n\t\t volume:" + getVolume() 035 ; 036 037 if ( (getTopGainers()==null) || (getTopLosers()==null) ) 038 return ret; 039 ret += "\n\t\t Current Top Gainers:"; 040 for (int ii = 0; ii < topGainers.length; ii++) { 041 QuoteDataBean quoteData = topGainers[ii]; 042 ret += ( "\n\t\t\t" + quoteData.toString() ); 043 } 044 ret += "\n\t\t Current Top Losers:"; 045 for (int ii = 0; ii < topLosers.length; ii++) { 046 QuoteDataBean quoteData = topLosers[ii]; 047 ret += ( "\n\t\t\t" + quoteData.toString() ); 048 } 049 return ret; 050 } 051 052 public java.math.BigDecimal getTSIA() { 053 return TSIA; 054 } 055 056 public void setTSIA(java.math.BigDecimal TSIA) { 057 this.TSIA = TSIA; 058 } 059 060 public java.math.BigDecimal getOpenTSIA() { 061 return openTSIA; 062 } 063 064 public void setOpenTSIA(java.math.BigDecimal openTSIA) { 065 this.openTSIA = openTSIA; 066 } 067 068 public double getVolume() { 069 return volume; 070 } 071 072 public void setVolume(double volume) { 073 this.volume = volume; 074 } 075 076 public org.apache.geronimo.samples.daytrader.client.ws.QuoteDataBean[] getTopGainers() { 077 return topGainers; 078 } 079 080 public void setTopGainers(org.apache.geronimo.samples.daytrader.client.ws.QuoteDataBean[] topGainers) { 081 this.topGainers = topGainers; 082 } 083 084 public org.apache.geronimo.samples.daytrader.client.ws.QuoteDataBean[] getTopLosers() { 085 return topLosers; 086 } 087 088 public void setTopLosers(org.apache.geronimo.samples.daytrader.client.ws.QuoteDataBean[] topLosers) { 089 this.topLosers = topLosers; 090 } 091 092 public java.util.Calendar getSummaryDate() { 093 return summaryDate; 094 } 095 096 public void setSummaryDate(java.util.Calendar summaryDate) { 097 this.summaryDate = summaryDate; 098 } 099 100 }