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;
018    
019    
020    import java.io.Serializable;
021    
022    public class RunStatsDataBean implements Serializable
023    {
024            //Constructors
025            public RunStatsDataBean(){ }
026    
027            // count of trade users in the database (users w/ userID like 'uid:%')
028            private int tradeUserCount;
029            // count of trade stocks in the database (stocks w/ symbol like 's:%')
030            private int tradeStockCount;
031            
032            // count of new registered users in this run (users w/ userID like 'ru:%') -- random user
033            private int newUserCount;
034            
035            // sum of logins by trade users
036            private int sumLoginCount;
037            // sum of logouts by trade users        
038            private int sumLogoutCount;
039    
040            // count of holdings of trade users     
041            private int holdingCount;
042    
043            // count of orders of trade users               
044            private int orderCount; 
045            // count of buy orders of trade users                   
046            private int buyOrderCount;
047            // count of sell orders of trade users                  
048            private int sellOrderCount;
049            // count of cancelled orders of trade users                     
050            private int cancelledOrderCount;
051            // count of open orders of trade users                  
052            private int openOrderCount;
053            // count of orders deleted during this trade Reset
054            private int deletedOrderCount;
055    
056            public String toString()
057            {
058                    return "\n\tRunStatsData for reset at " + new java.util.Date()
059                            + "\n\t\t      tradeUserCount: " + getTradeUserCount()
060                            + "\n\t\t        newUserCount: " + getNewUserCount()
061                            + "\n\t\t       sumLoginCount: " + getSumLoginCount()
062                            + "\n\t\t      sumLogoutCount: " + getSumLogoutCount()
063                            + "\n\t\t        holdingCount: " + getHoldingCount()
064                            + "\n\t\t          orderCount: " + getOrderCount()
065                            + "\n\t\t       buyOrderCount: " + getBuyOrderCount()
066                            + "\n\t\t      sellOrderCount: " + getSellOrderCount()
067                            + "\n\t\t cancelledOrderCount: " + getCancelledOrderCount()
068                            + "\n\t\t      openOrderCount: " + getOpenOrderCount()
069                            + "\n\t\t   deletedOrderCount: " + getDeletedOrderCount()
070                            ;
071            }
072    
073    
074            /**
075             * Gets the tradeUserCount
076             * @return Returns a int
077             */
078            public int getTradeUserCount() {
079                    return tradeUserCount;
080            }
081            /**
082             * Sets the tradeUserCount
083             * @param tradeUserCount The tradeUserCount to set
084             */
085            public void setTradeUserCount(int tradeUserCount) {
086                    this.tradeUserCount = tradeUserCount;
087            }
088    
089            /**
090             * Gets the newUserCount
091             * @return Returns a int
092             */
093            public int getNewUserCount() {
094                    return newUserCount;
095            }
096            /**
097             * Sets the newUserCount
098             * @param newUserCount The newUserCount to set
099             */
100            public void setNewUserCount(int newUserCount) {
101                    this.newUserCount = newUserCount;
102            }
103    
104            /**
105             * Gets the sumLoginCount
106             * @return Returns a int
107             */
108            public int getSumLoginCount() {
109                    return sumLoginCount;
110            }
111            /**
112             * Sets the sumLoginCount
113             * @param sumLoginCount The sumLoginCount to set
114             */
115            public void setSumLoginCount(int sumLoginCount) {
116                    this.sumLoginCount = sumLoginCount;
117            }
118    
119            /**
120             * Gets the sumLogoutCount
121             * @return Returns a int
122             */
123            public int getSumLogoutCount() {
124                    return sumLogoutCount;
125            }
126            /**
127             * Sets the sumLogoutCount
128             * @param sumLogoutCount The sumLogoutCount to set
129             */
130            public void setSumLogoutCount(int sumLogoutCount) {
131                    this.sumLogoutCount = sumLogoutCount;
132            }
133    
134            /**
135             * Gets the holdingCount
136             * @return Returns a int
137             */
138            public int getHoldingCount() {
139                    return holdingCount;
140            }
141            /**
142             * Sets the holdingCount
143             * @param holdingCount The holdingCount to set
144             */
145            public void setHoldingCount(int holdingCount) {
146                    this.holdingCount = holdingCount;
147            }
148    
149            /**
150             * Gets the buyOrderCount
151             * @return Returns a int
152             */
153            public int getBuyOrderCount() {
154                    return buyOrderCount;
155            }
156            /**
157             * Sets the buyOrderCount
158             * @param buyOrderCount The buyOrderCount to set
159             */
160            public void setBuyOrderCount(int buyOrderCount) {
161                    this.buyOrderCount = buyOrderCount;
162            }
163    
164            /**
165             * Gets the sellOrderCount
166             * @return Returns a int
167             */
168            public int getSellOrderCount() {
169                    return sellOrderCount;
170            }
171            /**
172             * Sets the sellOrderCount
173             * @param sellOrderCount The sellOrderCount to set
174             */
175            public void setSellOrderCount(int sellOrderCount) {
176                    this.sellOrderCount = sellOrderCount;
177            }
178    
179            /**
180             * Gets the cancelledOrderCount
181             * @return Returns a int
182             */
183            public int getCancelledOrderCount() {
184                    return cancelledOrderCount;
185            }
186            /**
187             * Sets the cancelledOrderCount
188             * @param cancelledOrderCount The cancelledOrderCount to set
189             */
190            public void setCancelledOrderCount(int cancelledOrderCount) {
191                    this.cancelledOrderCount = cancelledOrderCount;
192            }
193    
194            /**
195             * Gets the openOrderCount
196             * @return Returns a int
197             */
198            public int getOpenOrderCount() {
199                    return openOrderCount;
200            }
201            /**
202             * Sets the openOrderCount
203             * @param openOrderCount The openOrderCount to set
204             */
205            public void setOpenOrderCount(int openOrderCount) {
206                    this.openOrderCount = openOrderCount;
207            }
208    
209            /**
210             * Gets the deletedOrderCount
211             * @return Returns a int
212             */
213            public int getDeletedOrderCount() {
214                    return deletedOrderCount;
215            }
216            /**
217             * Sets the deletedOrderCount
218             * @param deletedOrderCount The deletedOrderCount to set
219             */
220            public void setDeletedOrderCount(int deletedOrderCount) {
221                    this.deletedOrderCount = deletedOrderCount;
222            }
223    
224            /**
225             * Gets the orderCount
226             * @return Returns a int
227             */
228            public int getOrderCount() {
229                    return orderCount;
230            }
231            /**
232             * Sets the orderCount
233             * @param orderCount The orderCount to set
234             */
235            public void setOrderCount(int orderCount) {
236                    this.orderCount = orderCount;
237            }
238    
239            /**
240             * Gets the tradeStockCount
241             * @return Returns a int
242             */
243            public int getTradeStockCount() {
244                    return tradeStockCount;
245            }
246            /**
247             * Sets the tradeStockCount
248             * @param tradeStockCount The tradeStockCount to set
249             */
250            public void setTradeStockCount(int tradeStockCount) {
251                    this.tradeStockCount = tradeStockCount;
252            }
253    
254    }
255