geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jb...@apache.org
Subject svn commit: r775187 [1/10] - in /geronimo/daytrader/trunk: ./ daytrader-webonly/ daytrader-webonly/src/ daytrader-webonly/src/main/ daytrader-webonly/src/main/java/ daytrader-webonly/src/main/java/org/ daytrader-webonly/src/main/java/org/apache/ daytra...
Date Fri, 15 May 2009 15:17:45 GMT
Author: jbohn
Date: Fri May 15 15:17:36 2009
New Revision: 775187

URL: http://svn.apache.org/viewvc?rev=775187&view=rev
Log:
DAYTRADER-68 - initial checkin of web only daytrader for tomcat - slightly modified version of patch contributed by Forrest Xia - thanks Forrest

Added:
    geronimo/daytrader/trunk/daytrader-webonly/
    geronimo/daytrader/trunk/daytrader-webonly/README
    geronimo/daytrader/trunk/daytrader-webonly/daytrader-datasource-plan.xml   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/pom.xml   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/
    geronimo/daytrader/trunk/daytrader-webonly/src/main/
    geronimo/daytrader/trunk/daytrader-webonly/src/main/java/
    geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/
    geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/
    geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/
    geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/
    geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/
    geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/AccountDataBean.java   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/AccountProfileDataBean.java   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/HoldingDataBean.java   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/MarketSummaryDataBean.java   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/MarketSummaryDataBeanWS.java   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/OrderDataBean.java   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/QuoteDataBean.java   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/RunStatsDataBean.java   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/TradeAction.java   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/TradeConfig.java   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/TradeServices.java   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/TradeWSAction.java   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/TradeWSServices.java   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/direct/
    geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/direct/KeySequenceDirect.java   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/direct/TradeDirect.java   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/util/
    geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/util/FinancialUtils.java   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/util/KeyBlock.java   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/util/Log.java   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/util/MDBStats.java   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/util/TimerStat.java   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/web/
    geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/web/OrdersAlertFilter.java   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/web/TestServlet.java   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/web/TradeAppServlet.java   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/web/TradeBuildDB.java   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/web/TradeConfigServlet.java   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/web/TradeScenarioServlet.java   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/web/TradeServletAction.java   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/web/TradeWebContextListener.java   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/
    geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/ExplicitGC.java   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/PingBean.java   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/PingJDBCRead.java   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/PingJDBCWrite.java   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/PingServlet.java   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/PingServlet2Include.java   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/PingServlet2IncludeRcv.java   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/PingServlet2JNDI.java   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/PingServlet2Jsp.java   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/PingServlet2Servlet.java   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/PingServlet2ServletRcv.java   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/PingServletWriter.java   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/PingSession1.java   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/PingSession2.java   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/PingSession3.java   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/PingSession3Object.java   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/META-INF/
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/META-INF/LICENSE
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/META-INF/NOTICE
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/META-INF/context.xml   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/PingHtml.html   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/PingJsp.jsp   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/PingJspEL.jsp   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/PingJspEL.jsp.bad
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/PingServlet2Jsp.jsp   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/WEB-INF/
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/WEB-INF/classes/
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/WEB-INF/classes/build.properties   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/WEB-INF/geronimo-web.xml   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/WEB-INF/web.xml   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/account.jsp   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/accountImg.jsp   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/config.jsp   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/configure.html   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/contentHome.html   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/dbscripts/
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/dbscripts/db2/
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/dbscripts/db2/Table.ddl
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/dbscripts/derby/
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/dbscripts/derby/Table.ddl
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/dbscripts/oracle/
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/dbscripts/oracle/Table.ddl
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/displayQuote.jsp   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/docs/
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/docs/benchmarking.html   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/docs/documentation.html   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/docs/glossary.html   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/docs/rtCharacterisitics.html   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/docs/tradeFAQ.html   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/docs/tradeversion.html   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/error.jsp   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/footer.html   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/header.html   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/images/
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/images/DayTraderHead_blue.gif   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/images/DayTraderHead_red.gif   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/images/SOAPconfig.gif   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/images/about.gif   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/images/account.gif   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/images/arrowdown.gif   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/images/arrowup.gif   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/images/bottomRedBar.gif   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/images/configuration.gif   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/images/copyRight.gif   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/images/dayTraderLogo.gif   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/images/faq.gif   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/images/graph.gif   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/images/home.gif   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/images/homeBanner.gif   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/images/line.gif   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/images/logout.gif   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/images/lower_banner.gif   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/images/menuHome.gif   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/images/portfolio.gif   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/images/primitives.gif   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/images/quotes.gif   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/images/reports.gif   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/images/spacer.gif   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/images/ticker-anim.gif   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/images/topRedBar.gif   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/images/topline.jpg   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/images/tradeOverview.png   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/images/tradingAndPortfolios.gif   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/index.html   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/leftMenu.html   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/marketSummary.jsp   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/order.jsp   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/orderImg.jsp   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/portfolio.jsp   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/portfolioImg.jsp   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/quote.jsp   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/quoteImg.jsp   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/register.jsp   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/registerImg.jsp   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/runStats.jsp   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/sample.jsp   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/style.css   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/tradehome.jsp   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/tradehomeImg.jsp   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/web_prmtv.html   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/welcome.jsp   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/main/webapp/welcomeImg.jsp   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/test/
    geronimo/daytrader/trunk/daytrader-webonly/src/test/example/
    geronimo/daytrader/trunk/daytrader-webonly/src/test/example/ejb/
    geronimo/daytrader/trunk/daytrader-webonly/src/test/example/ejb/SanityTest.java   (with props)
    geronimo/daytrader/trunk/daytrader-webonly/src/test/example/web/
    geronimo/daytrader/trunk/daytrader-webonly/src/test/example/web/SanityTest.java   (with props)
Modified:
    geronimo/daytrader/trunk/pom.xml

Added: geronimo/daytrader/trunk/daytrader-webonly/README
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/daytrader-webonly/README?rev=775187&view=auto
==============================================================================
--- geronimo/daytrader/trunk/daytrader-webonly/README (added)
+++ geronimo/daytrader/trunk/daytrader-webonly/README Fri May 15 15:17:36 2009
@@ -0,0 +1,13 @@
+(C) Copyright 2009 The Apache Software Foundation.
+----------------------------------------------------------------------
+
+This is a version of daytrader which is able to running on Tomcat 6. 
+By default, it uses Derby database. You can change src/main/webapp/META-INF/context.xml
+to use other database vendor. Remember that copying database jdbc drivers to tomcat lib
+directory.
+
+After building, just deploy the .war in the target directory to tomcat with context root /daytrader.
+
+Of course, it works as well as on Little-G with Tomcat 6. Before deploying it 
+to Little-G, you need to deploy a datasource first. Refer to daytrader-datasource-plan.xml
+for an example.

Added: geronimo/daytrader/trunk/daytrader-webonly/daytrader-datasource-plan.xml
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/daytrader-webonly/daytrader-datasource-plan.xml?rev=775187&view=auto
==============================================================================
--- geronimo/daytrader/trunk/daytrader-webonly/daytrader-datasource-plan.xml (added)
+++ geronimo/daytrader/trunk/daytrader-webonly/daytrader-datasource-plan.xml Fri May 15 15:17:36 2009
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+<connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2"
+  xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2"
+  xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.2">
+
+  <dep:environment>
+    <dep:moduleId>
+      <dep:groupId>org.apache.geronimo.samples</dep:groupId>
+      <dep:artifactId>daytrader-datasource</dep:artifactId>
+      <dep:version>1.0</dep:version>
+      <dep:type>car</dep:type>
+    </dep:moduleId>
+    <dep:dependencies>
+        <dep:dependency>
+                <dep:groupId>org.apache.geronimo.configs</dep:groupId>
+                <dep:artifactId>system-database</dep:artifactId>
+                <dep:type>car</dep:type>
+        </dep:dependency>
+    </dep:dependencies>
+    <dep:hidden-classes/>
+    <dep:non-overridable-classes/>
+  </dep:environment>
+
+  <resourceadapter>
+
+                <outbound-resourceadapter>
+
+                    <connection-definition>
+
+                        <connectionfactory-interface>javax.sql.DataSource</connectionfactory-interface>
+
+                        <connectiondefinition-instance>
+
+                            <name>jdbc/TradeDataSource</name>
+
+                            <config-property-setting name="UserName"></config-property-setting>
+
+                            <config-property-setting name="Password"></config-property-setting>
+
+                            <config-property-setting name="DatabaseName">DaytraderDatabase</config-property-setting>
+
+                            <config-property-setting name="CreateDatabase">true</config-property-setting>
+
+                            <connectionmanager>
+
+                                <xa-transaction>
+
+                                    <transaction-caching/>
+
+                                </xa-transaction>
+
+                                <single-pool>
+
+                                    <max-size>100</max-size>
+
+                                    <min-size>0</min-size>
+
+                                    <blocking-timeout-milliseconds>5000</blocking-timeout-milliseconds>
+
+                                    <idle-timeout-minutes>30</idle-timeout-minutes>
+
+                                    <match-one/>
+
+                                </single-pool>
+
+                            </connectionmanager>
+
+                        </connectiondefinition-instance>                        
+
+                    </connection-definition>
+
+                </outbound-resourceadapter>
+
+   </resourceadapter>
+
+</connector>
+
+

Propchange: geronimo/daytrader/trunk/daytrader-webonly/daytrader-datasource-plan.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/daytrader/trunk/daytrader-webonly/daytrader-datasource-plan.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/daytrader/trunk/daytrader-webonly/daytrader-datasource-plan.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/daytrader/trunk/daytrader-webonly/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/daytrader-webonly/pom.xml?rev=775187&view=auto
==============================================================================
--- geronimo/daytrader/trunk/daytrader-webonly/pom.xml (added)
+++ geronimo/daytrader/trunk/daytrader-webonly/pom.xml Fri May 15 15:17:36 2009
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    
+    <parent>
+        <artifactId>daytrader</artifactId>
+        <groupId>org.apache.geronimo.daytrader</groupId>
+        <version>2.2-SNAPSHOT</version>
+    </parent>
+    
+    <groupId>org.apache.geronimo.daytrader</groupId>
+    <artifactId>daytrader-web-lite</artifactId>    
+    <packaging>war</packaging>
+    <name>DayTrader :: Web Only</name>
+    <description>A version of Daytrader Web for Tomcat 6</description>
+    
+    <dependencies>
+        
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-jms_1.1_spec</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-servlet_2.5_spec</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-jsp_2.1_spec</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>jstl</groupId>
+            <artifactId>jstl</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-jpa_3.0_spec</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>commons-logging</groupId>
+            <artifactId>commons-logging</artifactId>
+            <!-- we need to include this in the image for logging to work -->
+            <!-- <scope>provided</scope> -->
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.openjpa</groupId>
+            <artifactId>openjpa</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+    		   <groupId>org.apache.geronimo.specs</groupId>
+        		<artifactId>geronimo-annotation_1.0_spec</artifactId>
+        		<!-- <version>1.1.1</version>  -->
+        		<scope>provided</scope>
+	     </dependency>
+        
+    </dependencies>
+    <build>
+        <plugins>
+            
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-war-plugin</artifactId>
+                <configuration>
+                    <resources>
+                        <resource implementation="org.apache.maven.model.Resource">
+                            <filtering>false</filtering>
+                            <directory>
+                                ${basedir}/src/main/webapp/WEB-INF
+                            </directory>
+                            <includes>
+                                <include>web.xml</include>
+                                <include>geronimo-web.xml</include>
+                            </includes>
+                        </resource>
+                    </resources>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+</project>

Propchange: geronimo/daytrader/trunk/daytrader-webonly/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/daytrader/trunk/daytrader-webonly/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/daytrader/trunk/daytrader-webonly/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/AccountDataBean.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/AccountDataBean.java?rev=775187&view=auto
==============================================================================
--- geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/AccountDataBean.java (added)
+++ geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/AccountDataBean.java Fri May 15 15:17:36 2009
@@ -0,0 +1,274 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.samples.daytrader;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.sql.Timestamp;
+import java.util.Collection;
+import java.util.Date;
+
+
+import javax.persistence.*;
+
+import org.apache.geronimo.samples.daytrader.util.Log;
+
+public class AccountDataBean implements Serializable {
+
+    
+    private Integer accountID;              /* accountID */
+    
+    
+    private int loginCount;                 /* loginCount */
+    
+    
+    private int logoutCount;                /* logoutCount */
+    
+    
+    private Date lastLogin;                 /* lastLogin Date */
+    
+    
+    private Date creationDate;              /* creationDate */
+    
+    
+    private BigDecimal balance;             /* balance */
+    
+    
+    private BigDecimal openBalance;         /* open balance */
+    
+    
+    private Collection<OrderDataBean> orders;
+    
+    
+    private Collection<HoldingDataBean> holdings;
+    
+    
+    private AccountProfileDataBean profile;
+
+//    @Version
+//    private Integer optLock;
+
+    /* Accessor methods for relationship fields are only included for the AccountProfile profileID */
+    
+    private String profileID;
+
+    public AccountDataBean() {
+    }
+
+    public AccountDataBean(Integer accountID,
+            int loginCount,
+            int logoutCount,
+            Date lastLogin,
+            Date creationDate,
+            BigDecimal balance,
+            BigDecimal openBalance,
+            String profileID) {
+        setAccountID(accountID);
+        setLoginCount(loginCount);
+        setLogoutCount(logoutCount);
+        setLastLogin(lastLogin);
+        setCreationDate(creationDate);
+        setBalance(balance);
+        setOpenBalance(openBalance);
+        setProfileID(profileID);
+    }
+
+    public AccountDataBean(int loginCount,
+            int logoutCount,
+            Date lastLogin,
+            Date creationDate,
+            BigDecimal balance,
+            BigDecimal openBalance,
+            String profileID) {
+        setLoginCount(loginCount);
+        setLogoutCount(logoutCount);
+        setLastLogin(lastLogin);
+        setCreationDate(creationDate);
+        setBalance(balance);
+        setOpenBalance(openBalance);
+        setProfileID(profileID);
+    }
+
+    public static AccountDataBean getRandomInstance() {
+        return new AccountDataBean(new Integer(TradeConfig.rndInt(100000)), //accountID
+                TradeConfig.rndInt(10000), //loginCount
+                TradeConfig.rndInt(10000), //logoutCount
+                new java.util.Date(), //lastLogin
+                new java.util.Date(TradeConfig.rndInt(Integer.MAX_VALUE)), //creationDate
+                TradeConfig.rndBigDecimal(1000000.0f), //balance
+                TradeConfig.rndBigDecimal(1000000.0f), //openBalance
+                TradeConfig.rndUserID() //profileID
+        );
+    }
+
+    public String toString() {
+        return "\n\tAccount Data for account: " + getAccountID()
+                + "\n\t\t   loginCount:" + getLoginCount()
+                + "\n\t\t  logoutCount:" + getLogoutCount()
+                + "\n\t\t    lastLogin:" + getLastLogin()
+                + "\n\t\t creationDate:" + getCreationDate()
+                + "\n\t\t      balance:" + getBalance()
+                + "\n\t\t  openBalance:" + getOpenBalance()
+                + "\n\t\t    profileID:" + getProfileID()
+                ;
+    }
+
+    public String toHTML() {
+        return "<BR>Account Data for account: <B>" + getAccountID() + "</B>"
+                + "<LI>   loginCount:" + getLoginCount() + "</LI>"
+                + "<LI>  logoutCount:" + getLogoutCount() + "</LI>"
+                + "<LI>    lastLogin:" + getLastLogin() + "</LI>"
+                + "<LI> creationDate:" + getCreationDate() + "</LI>"
+                + "<LI>      balance:" + getBalance() + "</LI>"
+                + "<LI>  openBalance:" + getOpenBalance() + "</LI>"
+                + "<LI>    profileID:" + getProfileID() + "</LI>"
+                ;
+    }
+
+    public void print() {
+        Log.log(this.toString());
+    }
+
+    public Integer getAccountID() {
+        return accountID;
+    }
+
+    public void setAccountID(Integer accountID) {
+        this.accountID = accountID;
+    }
+
+    public int getLoginCount() {
+        return loginCount;
+    }
+
+    public void setLoginCount(int loginCount) {
+        this.loginCount = loginCount;
+    }
+
+    public int getLogoutCount() {
+        return logoutCount;
+    }
+
+    public void setLogoutCount(int logoutCount) {
+        this.logoutCount = logoutCount;
+    }
+
+    public Date getLastLogin() {
+        return lastLogin;
+    }
+
+    public void setLastLogin(Date lastLogin) {
+        this.lastLogin = lastLogin;
+    }
+
+    public Date getCreationDate() {
+        return creationDate;
+    }
+
+    public void setCreationDate(Date creationDate) {
+        this.creationDate = creationDate;
+    }
+
+    public BigDecimal getBalance() {
+        return balance;
+    }
+
+    public void setBalance(BigDecimal balance) {
+        this.balance = balance;
+    }
+
+    public BigDecimal getOpenBalance() {
+        return openBalance;
+    }
+
+    public void setOpenBalance(BigDecimal openBalance) {
+        this.openBalance = openBalance;
+    }
+
+    public String getProfileID() {
+        return profileID;
+    }
+
+    public void setProfileID(String profileID) {
+        this.profileID = profileID;
+    }
+
+    /* Disabled for D185273
+     public String getUserID() {
+         return getProfileID();
+     }
+     */
+
+    public Collection<OrderDataBean> getOrders() {
+        return orders;
+    }
+
+    public void setOrders(Collection<OrderDataBean> orders) {
+        this.orders = orders;
+    }
+    
+    public Collection<HoldingDataBean> getHoldings() {
+        return holdings;
+    }
+
+    public void setHoldings(Collection<HoldingDataBean> holdings) {
+        this.holdings = holdings;
+    }
+
+    public AccountProfileDataBean getProfile() {
+        return profile;
+    }
+
+    public void setProfile(AccountProfileDataBean profile) {
+        this.profile = profile;
+    }
+
+    public void login(String password) {
+        AccountProfileDataBean profile = getProfile();
+        if ((profile == null) || (profile.getPassword().equals(password) == false)) {
+            String error = "AccountBean:Login failure for account: " + getAccountID() +
+                    ((profile == null) ? "null AccountProfile" :
+                            "\n\tIncorrect password-->" + profile.getUserID() + ":" + profile.getPassword());
+            
+        }
+
+        setLastLogin(new Timestamp(System.currentTimeMillis()));
+        setLoginCount(getLoginCount() + 1);
+    }
+
+    public void logout() {
+        setLogoutCount(getLogoutCount() + 1);
+    }
+
+    @Override
+    public int hashCode() {
+        int hash = 0;
+        hash += (this.accountID != null ? this.accountID.hashCode() : 0);
+        return hash;
+    }
+
+    @Override
+    public boolean equals(Object object) {
+        // TODO: Warning - this method won't work in the case the id fields are not set
+        if (!(object instanceof AccountDataBean)) {
+            return false;
+        }
+        AccountDataBean other = (AccountDataBean)object;
+        if (this.accountID != other.accountID && (this.accountID == null || !this.accountID.equals(other.accountID))) return false;
+        return true;
+    }
+}
\ No newline at end of file

Propchange: geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/AccountDataBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/AccountDataBean.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/AccountDataBean.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/AccountProfileDataBean.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/AccountProfileDataBean.java?rev=775187&view=auto
==============================================================================
--- geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/AccountProfileDataBean.java (added)
+++ geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/AccountProfileDataBean.java Fri May 15 15:17:36 2009
@@ -0,0 +1,175 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.samples.daytrader;
+
+import javax.persistence.*;
+
+import org.apache.geronimo.samples.daytrader.util.Log;
+
+
+public class AccountProfileDataBean implements java.io.Serializable {
+
+    
+    private String userID;              /* userID */
+    
+   
+    private String passwd;              /* password */
+    
+    
+    private String fullName;            /* fullName */
+    
+    
+    private String address;             /* address */
+    
+    
+    private String email;               /* email */
+    
+    
+    private String creditCard;          /* creditCard */
+    
+    
+    private AccountDataBean account;
+
+//    @Version
+//    private Integer optLock;
+
+    public AccountProfileDataBean() {
+    }
+
+    public AccountProfileDataBean(String userID,
+            String password,
+            String fullName,
+            String address,
+            String email,
+            String creditCard) {
+        setUserID(userID);
+        setPassword(password);
+        setFullName(fullName);
+        setAddress(address);
+        setEmail(email);
+        setCreditCard(creditCard);
+    }
+
+    public static AccountProfileDataBean getRandomInstance() {
+        return new AccountProfileDataBean(
+                TradeConfig.rndUserID(),                        // userID
+                TradeConfig.rndUserID(),                        // passwd
+                TradeConfig.rndFullName(),                      // fullname
+                TradeConfig.rndAddress(),                       // address
+                TradeConfig.rndEmail(TradeConfig.rndUserID()),  //email
+                TradeConfig.rndCreditCard()                     // creditCard
+        );
+    }
+
+    public String toString() {
+        return "\n\tAccount Profile Data for userID:" + getUserID()
+                + "\n\t\t   passwd:" + getPassword()
+                + "\n\t\t   fullName:" + getFullName()
+                + "\n\t\t    address:" + getAddress()
+                + "\n\t\t      email:" + getEmail()
+                + "\n\t\t creditCard:" + getCreditCard()
+                ;
+    }
+
+    public String toHTML() {
+        return "<BR>Account Profile Data for userID: <B>" + getUserID() + "</B>"
+                + "<LI>   passwd:" + getPassword() + "</LI>"
+                + "<LI>   fullName:" + getFullName() + "</LI>"
+                + "<LI>    address:" + getAddress() + "</LI>"
+                + "<LI>      email:" + getEmail() + "</LI>"
+                + "<LI> creditCard:" + getCreditCard() + "</LI>"
+                ;
+    }
+
+    public void print() {
+        Log.log(this.toString());
+    }
+
+    public String getUserID() {
+        return userID;
+    }
+
+    public void setUserID(String userID) {
+        this.userID = userID;
+    }
+
+    public String getPassword() {
+        return passwd;
+    }
+
+    public void setPassword(String password) {
+        this.passwd = password;
+    }
+
+    public String getFullName() {
+        return fullName;
+    }
+
+    public void setFullName(String fullName) {
+        this.fullName = fullName;
+    }
+
+    public String getAddress() {
+        return address;
+    }
+
+    public void setAddress(String address) {
+        this.address = address;
+    }
+
+    public String getEmail() {
+        return email;
+    }
+
+    public void setEmail(String email) {
+        this.email = email;
+    }
+
+    public String getCreditCard() {
+        return creditCard;
+    }
+
+    public void setCreditCard(String creditCard) {
+        this.creditCard = creditCard;
+    }
+
+    public AccountDataBean getAccount() {
+        return account;
+    }
+
+    public void setAccount(AccountDataBean account) {
+        this.account = account;
+    }
+    
+    @Override
+    public int hashCode() {
+        int hash = 0;
+        hash += (this.userID != null ? this.userID.hashCode() : 0);
+        return hash;
+    }
+
+    @Override
+    public boolean equals(Object object) {
+        // TODO: Warning - this method won't work in the case the id fields are not set
+        if (!(object instanceof AccountProfileDataBean)) {
+            return false;
+        }
+        AccountProfileDataBean other = (AccountProfileDataBean)object;
+        if (this.userID != other.userID && (this.userID == null || !this.userID.equals(other.userID))) return false;
+        return true;
+    }
+}

Propchange: geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/AccountProfileDataBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/AccountProfileDataBean.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/AccountProfileDataBean.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/HoldingDataBean.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/HoldingDataBean.java?rev=775187&view=auto
==============================================================================
--- geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/HoldingDataBean.java (added)
+++ geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/HoldingDataBean.java Fri May 15 15:17:36 2009
@@ -0,0 +1,198 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.samples.daytrader;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+import javax.persistence.*;
+
+
+import org.apache.geronimo.samples.daytrader.util.Log;
+
+
+public class HoldingDataBean implements Serializable {
+
+    /* persistent/relationship fields */
+
+    
+    private Integer holdingID;              /* holdingID */
+    
+    
+    private double quantity;                /* quantity */
+    
+    
+    private BigDecimal purchasePrice;       /* purchasePrice */
+    
+   
+    private Date purchaseDate;              /* purchaseDate */
+    
+    
+    private String quoteID;                 /* Holding(*)  ---> Quote(1) */
+    
+    
+    private AccountDataBean account;
+    
+    
+    private QuoteDataBean quote;
+
+//    @Version
+//    private Integer optLock;
+
+    public HoldingDataBean() {
+    }
+
+    public HoldingDataBean(Integer holdingID,
+            double quantity,
+            BigDecimal purchasePrice,
+            Date purchaseDate,
+            String quoteID) {
+        setHoldingID(holdingID);
+        setQuantity(quantity);
+        setPurchasePrice(purchasePrice);
+        setPurchaseDate(purchaseDate);
+        setQuoteID(quoteID);
+    }
+
+    public HoldingDataBean(double quantity,
+            BigDecimal purchasePrice,
+            Date purchaseDate,
+            AccountDataBean account,
+            QuoteDataBean quote) {
+        setQuantity(quantity);
+        setPurchasePrice(purchasePrice);
+        setPurchaseDate(purchaseDate);
+        setAccount(account);
+        setQuote(quote);
+    }
+
+    public static HoldingDataBean getRandomInstance() {
+        return new HoldingDataBean(
+                new Integer(TradeConfig.rndInt(100000)),     //holdingID
+                TradeConfig.rndQuantity(),                     //quantity
+                TradeConfig.rndBigDecimal(1000.0f),             //purchasePrice
+                new java.util.Date(TradeConfig.rndInt(Integer.MAX_VALUE)), //purchaseDate
+                TradeConfig.rndSymbol()                        // symbol
+        );
+    }
+
+    public String toString() {
+        return "\n\tHolding Data for holding: " + getHoldingID()
+                + "\n\t\t      quantity:" + getQuantity()
+                + "\n\t\t purchasePrice:" + getPurchasePrice()
+                + "\n\t\t  purchaseDate:" + getPurchaseDate()
+                + "\n\t\t       quoteID:" + getQuoteID()
+                ;
+    }
+
+    public String toHTML() {
+        return "<BR>Holding Data for holding: " + getHoldingID() + "</B>"
+                + "<LI>      quantity:" + getQuantity() + "</LI>"
+                + "<LI> purchasePrice:" + getPurchasePrice() + "</LI>"
+                + "<LI>  purchaseDate:" + getPurchaseDate() + "</LI>"
+                + "<LI>       quoteID:" + getQuoteID() + "</LI>"
+                ;
+    }
+
+    public void print() {
+        Log.log(this.toString());
+    }
+
+    public Integer getHoldingID() {
+        return holdingID;
+    }
+
+    public void setHoldingID(Integer holdingID) {
+        this.holdingID = holdingID;
+    }
+
+    public double getQuantity() {
+        return quantity;
+    }
+
+    public void setQuantity(double quantity) {
+        this.quantity = quantity;
+    }
+
+    public BigDecimal getPurchasePrice() {
+        return purchasePrice;
+    }
+
+    public void setPurchasePrice(BigDecimal purchasePrice) {
+        this.purchasePrice = purchasePrice;
+    }
+
+    public Date getPurchaseDate() {
+        return purchaseDate;
+    }
+
+    public void setPurchaseDate(Date purchaseDate) {
+        this.purchaseDate = purchaseDate;
+    }
+
+    public String getQuoteID() {
+        if (quote != null) {
+            return quote.getSymbol();
+        }
+        return quoteID;
+    }
+
+    public void setQuoteID(String quoteID) {
+        this.quoteID = quoteID;
+    }
+
+    public AccountDataBean getAccount() {
+        return account;
+    }
+
+    public void setAccount(AccountDataBean account) {
+        this.account = account;
+    }
+
+    /* Disabled for D185273
+     public String getSymbol() {
+         return getQuoteID();
+     }
+     */
+    
+    public QuoteDataBean getQuote() {
+        return quote;
+    }
+
+    public void setQuote(QuoteDataBean quote) {
+        this.quote = quote;
+    }
+    
+    @Override
+    public int hashCode() {
+        int hash = 0;
+        hash += (this.holdingID != null ? this.holdingID.hashCode() : 0);
+        return hash;
+    }
+
+    @Override
+    public boolean equals(Object object) {
+        // TODO: Warning - this method won't work in the case the id fields are not set
+        if (!(object instanceof HoldingDataBean)) {
+            return false;
+        }
+        HoldingDataBean other = (HoldingDataBean) object;
+        if (this.holdingID != other.holdingID && (this.holdingID == null || !this.holdingID.equals(other.holdingID))) return false;
+        return true;
+    }
+}

Propchange: geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/HoldingDataBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/HoldingDataBean.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/HoldingDataBean.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/MarketSummaryDataBean.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/MarketSummaryDataBean.java?rev=775187&view=auto
==============================================================================
--- geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/MarketSummaryDataBean.java (added)
+++ geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/MarketSummaryDataBean.java Fri May 15 15:17:36 2009
@@ -0,0 +1,237 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.samples.daytrader;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Date;
+import java.util.Iterator;
+
+import org.apache.geronimo.samples.daytrader.util.FinancialUtils;
+import org.apache.geronimo.samples.daytrader.util.Log;
+
+public class MarketSummaryDataBean implements Serializable
+{
+
+	private BigDecimal 	TSIA;			/* Trade Stock Index Average */
+	private BigDecimal 	openTSIA;		/* Trade Stock Index Average at the open */	
+	private double  	volume; 		/* volume of shares traded */
+	private Collection 	topGainers;		/* Collection of top gaining stocks */
+	private Collection 	topLosers;		/* Collection of top losing stocks */	
+	//FUTURE private Collection 	topVolume;		/* Collection of top stocks by volume */		
+	private Date			summaryDate;   /* Date this summary was taken */
+	
+	//cache the gainPercent once computed for this bean
+	private BigDecimal  gainPercent=null;
+
+	public MarketSummaryDataBean(){ }
+	public MarketSummaryDataBean(BigDecimal TSIA,
+							BigDecimal  openTSIA,
+							double		volume,
+							Collection 	topGainers,
+							Collection 	topLosers//, Collection topVolume
+							)
+	{
+		setTSIA(TSIA);
+		setOpenTSIA(openTSIA);
+		setVolume(volume);
+		setTopGainers(topGainers);
+		setTopLosers(topLosers);
+		setSummaryDate(new java.sql.Date(System.currentTimeMillis()));
+		gainPercent = FinancialUtils.computeGainPercent(getTSIA(), getOpenTSIA());
+		
+	}
+	
+	public static MarketSummaryDataBean getRandomInstance() {
+		Collection gain = new ArrayList();
+		Collection lose = new ArrayList();
+		
+		for (int ii = 0; ii < 5; ii++) {
+			QuoteDataBean quote1 = QuoteDataBean.getRandomInstance();
+			QuoteDataBean quote2 = QuoteDataBean.getRandomInstance();
+			
+			gain.add(quote1);
+			lose.add(quote2);
+		}
+		
+		return new MarketSummaryDataBean(
+			TradeConfig.rndBigDecimal(1000000.0f),
+			TradeConfig.rndBigDecimal(1000000.0f),
+			TradeConfig.rndQuantity(),
+			gain,
+			lose
+		);
+	}
+
+	public String toString()
+	{
+		String ret = "\n\tMarket Summary at: " + getSummaryDate()
+			+ "\n\t\t        TSIA:" + getTSIA()
+			+ "\n\t\t    openTSIA:" + getOpenTSIA()
+			+ "\n\t\t        gain:" + getGainPercent()
+			+ "\n\t\t      volume:" + getVolume()
+			;
+
+		if ( (getTopGainers()==null) || (getTopLosers()==null) )
+			return ret;
+		ret += "\n\t\t   Current Top Gainers:";
+		Iterator it = getTopGainers().iterator();
+		while ( it.hasNext() ) 
+		{
+			QuoteDataBean quoteData = (QuoteDataBean) it.next();
+			ret += ( "\n\t\t\t"  + quoteData.toString() );
+		}
+		ret += "\n\t\t   Current Top Losers:";
+		it = getTopLosers().iterator();
+		while ( it.hasNext() ) 
+		{
+			QuoteDataBean quoteData = (QuoteDataBean) it.next();
+			ret += ( "\n\t\t\t"  + quoteData.toString() );
+		}
+		return ret;		
+	}
+	public String toHTML()
+	{
+		String ret = "<BR>Market Summary at: " + getSummaryDate()
+			+ "<LI>        TSIA:" + getTSIA() + "</LI>"
+			+ "<LI>    openTSIA:" + getOpenTSIA() + "</LI>"
+			+ "<LI>      volume:" + getVolume() + "</LI>"
+			;
+		if ( (getTopGainers()==null) || (getTopLosers()==null) )
+			return ret;
+		ret += "<BR> Current Top Gainers:";
+		Iterator it = getTopGainers().iterator();
+		while ( it.hasNext() ) 
+		{
+			QuoteDataBean quoteData = (QuoteDataBean) it.next();
+			ret += ( "<LI>"  + quoteData.toString()  + "</LI>" );
+		}
+		ret += "<BR>   Current Top Losers:";
+		it = getTopLosers().iterator();
+		while ( it.hasNext() ) 
+		{
+			QuoteDataBean quoteData = (QuoteDataBean) it.next();
+			ret += ( "<LI>"  + quoteData.toString()  + "</LI>" );
+		}
+		return ret;
+	}
+	public void print()
+	{
+		Log.log( this.toString() );
+	}	
+	
+	public BigDecimal getGainPercent()
+	{
+		if ( gainPercent == null )
+			gainPercent = FinancialUtils.computeGainPercent(getTSIA(), getOpenTSIA());
+		return gainPercent;
+	}
+
+
+	/**
+	 * Gets the tSIA
+	 * @return Returns a BigDecimal
+	 */
+	public BigDecimal getTSIA() {
+		return TSIA;
+	}
+	/**
+	 * Sets the tSIA
+	 * @param tSIA The tSIA to set
+	 */
+	public void setTSIA(BigDecimal tSIA) {
+		TSIA = tSIA;
+	}
+
+	/**
+	 * Gets the openTSIA
+	 * @return Returns a BigDecimal
+	 */
+	public BigDecimal getOpenTSIA() {
+		return openTSIA;
+	}
+	/**
+	 * Sets the openTSIA
+	 * @param openTSIA The openTSIA to set
+	 */
+	public void setOpenTSIA(BigDecimal openTSIA) {
+		this.openTSIA = openTSIA;
+	}
+
+	/**
+	 * Gets the volume
+	 * @return Returns a BigDecimal
+	 */
+	public double getVolume() {
+		return volume;
+	}
+	/**
+	 * Sets the volume
+	 * @param volume The volume to set
+	 */
+	public void setVolume(double volume) {
+		this.volume = volume;
+	}
+
+	/**
+	 * Gets the topGainers
+	 * @return Returns a Collection
+	 */
+	public Collection getTopGainers() {
+		return topGainers;
+	}
+	/**
+	 * Sets the topGainers
+	 * @param topGainers The topGainers to set
+	 */
+	public void setTopGainers(Collection topGainers) {
+		this.topGainers = topGainers;
+	}
+
+	/**
+	 * Gets the topLosers
+	 * @return Returns a Collection
+	 */
+	public Collection getTopLosers() {
+		return topLosers;
+	}
+	/**
+	 * Sets the topLosers
+	 * @param topLosers The topLosers to set
+	 */
+	public void setTopLosers(Collection topLosers) {
+		this.topLosers = topLosers;
+	}
+
+	/**
+	 * Gets the summaryDate
+	 * @return Returns a Date
+	 */
+	public Date getSummaryDate() {
+		return summaryDate;
+	}
+	/**
+	 * Sets the summaryDate
+	 * @param summaryDate The summaryDate to set
+	 */
+	public void setSummaryDate(Date summaryDate) {
+		this.summaryDate = summaryDate;
+	}
+
+}
\ No newline at end of file

Propchange: geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/MarketSummaryDataBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/MarketSummaryDataBean.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/MarketSummaryDataBean.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/MarketSummaryDataBeanWS.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/MarketSummaryDataBeanWS.java?rev=775187&view=auto
==============================================================================
--- geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/MarketSummaryDataBeanWS.java (added)
+++ geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/MarketSummaryDataBeanWS.java Fri May 15 15:17:36 2009
@@ -0,0 +1,223 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.samples.daytrader;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Collection;
+import java.util.Date;
+
+import org.apache.geronimo.samples.daytrader.util.FinancialUtils;
+import org.apache.geronimo.samples.daytrader.util.Log;
+
+/**
+ * 
+ *
+ * This is a duplicate MarketSummaryDataBean to handle web service handling
+ * of collections.  Instead this class uses typed arrays.
+ */
+public class MarketSummaryDataBeanWS implements Serializable
+{
+
+	private BigDecimal 	TSIA;			/* Trade Stock Index Average */
+	private BigDecimal 	openTSIA;		/* Trade Stock Index Average at the open */	
+	private double  	volume; 		/* volume of shares traded */
+	private QuoteDataBean 	topGainers[];		/* Collection of top gaining stocks */
+	private QuoteDataBean 	topLosers[];		/* Collection of top losing stocks */	
+	private Date			summaryDate;   /* Date this summary was taken */
+	
+	//cache the gainPercent once computed for this bean
+	private BigDecimal  gainPercent=null;
+
+	public MarketSummaryDataBeanWS(){ }
+	public MarketSummaryDataBeanWS(BigDecimal TSIA,
+							BigDecimal  openTSIA,
+							double		volume,
+							QuoteDataBean[] 	topGainers,
+							QuoteDataBean[] 	topLosers//, Collection topVolume
+							)
+	{
+		setTSIA(TSIA);
+		setOpenTSIA(openTSIA);
+		setVolume(volume);
+		setTopGainers(topGainers);
+		setTopLosers(topLosers);
+		setSummaryDate(new java.sql.Date(System.currentTimeMillis()));
+		gainPercent = FinancialUtils.computeGainPercent(getTSIA(), getOpenTSIA());
+		
+	}
+	
+
+	public String toString()
+	{
+		String ret = "\n\tMarket Summary at: " + getSummaryDate()
+			+ "\n\t\t        TSIA:" + getTSIA()
+			+ "\n\t\t    openTSIA:" + getOpenTSIA()
+			//+ "\n\t\t        gain:" + getGainPercent()
+			+ "\n\t\t      volume:" + getVolume()
+			;
+
+		if ( (getTopGainers()==null) || (getTopLosers()==null) )
+			return ret;
+		ret += "\n\t\t   Current Top Gainers:";
+		for (int ii = 0; ii < topGainers.length; ii++) {
+			QuoteDataBean quoteData = topGainers[ii];
+			ret += ( "\n\t\t\t"  + quoteData.toString() );
+		}
+		ret += "\n\t\t   Current Top Losers:";
+		for (int ii = 0; ii < topLosers.length; ii++) {
+			QuoteDataBean quoteData = topLosers[ii];
+			ret += ( "\n\t\t\t"  + quoteData.toString() );
+		}
+		return ret;		
+	}
+	public String toHTML()
+	{
+		String ret = "<BR>Market Summary at: " + getSummaryDate()
+			+ "<LI>        TSIA:" + getTSIA() + "</LI>"
+			+ "<LI>    openTSIA:" + getOpenTSIA() + "</LI>"
+			+ "<LI>      volume:" + getVolume() + "</LI>"
+			;
+		if ( (getTopGainers()==null) || (getTopLosers()==null) )
+			return ret;
+		ret += "<BR> Current Top Gainers:";
+		for (int ii = 0; ii < topGainers.length; ii++) {
+			QuoteDataBean quoteData = topGainers[ii];
+			ret += ( "<LI>"  + quoteData.toString()  + "</LI>" );
+		}
+		ret += "<BR>   Current Top Losers:";
+		for (int ii = 0; ii < topLosers.length; ii++) {
+			QuoteDataBean quoteData = topLosers[ii];
+			ret += ( "<LI>"  + quoteData.toString()  + "</LI>" );
+		}
+		return ret;
+	}
+	public void print()
+	{
+		Log.log( this.toString() );
+	}	
+	
+	
+	/* Disabled for D185273
+	public BigDecimal getGainPercent()
+	{
+		if ( gainPercent == null )
+			gainPercent = FinancialUtils.computeGainPercent(getTSIA(), getOpenTSIA());
+		return gainPercent;
+	}
+	*/
+
+
+	/**
+	 * Gets the tSIA
+	 * @return Returns a BigDecimal
+	 */
+	public BigDecimal getTSIA() {
+		return TSIA;
+	}
+	/**
+	 * Sets the tSIA
+	 * @param tSIA The tSIA to set
+	 */
+	public void setTSIA(BigDecimal tSIA) {
+		TSIA = tSIA;
+	}
+
+	/**
+	 * Gets the openTSIA
+	 * @return Returns a BigDecimal
+	 */
+	public BigDecimal getOpenTSIA() {
+		return openTSIA;
+	}
+	/**
+	 * Sets the openTSIA
+	 * @param openTSIA The openTSIA to set
+	 */
+	public void setOpenTSIA(BigDecimal openTSIA) {
+		this.openTSIA = openTSIA;
+	}
+
+	/**
+	 * Gets the volume
+	 * @return Returns a BigDecimal
+	 */
+	public double getVolume() {
+		return volume;
+	}
+	/**
+	 * Sets the volume
+	 * @param volume The volume to set
+	 */
+	public void setVolume(double volume) {
+		this.volume = volume;
+	}
+
+	/**
+	 * Gets the topGainers
+	 * @return Returns a Collection
+	 */
+	public QuoteDataBean[] getTopGainers() {
+		return topGainers;
+	}
+	/**
+	 * Sets the topGainers
+	 * @param topGainers The topGainers to set
+	 */
+	public void setTopGainers(QuoteDataBean[] topGainers) {
+		this.topGainers = topGainers;
+	}
+
+	/**
+	 * Gets the topLosers
+	 * @return Returns a Collection
+	 */
+	public QuoteDataBean[] getTopLosers() {
+		return topLosers;
+	}
+	/**
+	 * Sets the topLosers
+	 * @param topLosers The topLosers to set
+	 */
+	public void setTopLosers(QuoteDataBean[] topLosers) {
+		this.topLosers = topLosers;
+	}
+
+	/**
+	 * Gets the summaryDate
+	 * @return Returns a Date
+	 */
+	public Date getSummaryDate() {
+		return summaryDate;
+	}
+	/**
+	 * Sets the summaryDate
+	 * @param summaryDate The summaryDate to set
+	 */
+	public void setSummaryDate(Date summaryDate) {
+		this.summaryDate = summaryDate;
+	}
+	
+	public static MarketSummaryDataBeanWS convertBean(org.apache.geronimo.samples.daytrader.MarketSummaryDataBean origBean) {
+		Collection gainCol = origBean.getTopGainers();
+		QuoteDataBean gain[] = (QuoteDataBean[])gainCol.toArray(new QuoteDataBean[0]);
+		Collection loseCol = origBean.getTopLosers();
+		QuoteDataBean lose[] = (QuoteDataBean[])loseCol.toArray(new QuoteDataBean[0]);
+		return new MarketSummaryDataBeanWS(origBean.getTSIA(), origBean.getOpenTSIA(), origBean.getVolume(), gain, lose);
+	}
+
+}
\ No newline at end of file

Propchange: geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/MarketSummaryDataBeanWS.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/MarketSummaryDataBeanWS.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/MarketSummaryDataBeanWS.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/OrderDataBean.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/OrderDataBean.java?rev=775187&view=auto
==============================================================================
--- geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/OrderDataBean.java (added)
+++ geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/OrderDataBean.java Fri May 15 15:17:36 2009
@@ -0,0 +1,326 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.samples.daytrader;
+
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+import javax.persistence.*;
+
+import org.apache.geronimo.samples.daytrader.util.Log;
+
+
+
+public class OrderDataBean implements Serializable
+{
+
+          
+    private Integer orderID;            /* orderID */
+    
+    
+    private String orderType;           /* orderType (buy, sell, etc.) */
+    
+    
+    private String orderStatus;         /* orderStatus (open, processing, completed, closed, cancelled) */
+    
+    
+    private Date openDate;              /* openDate (when the order was entered) */
+    
+    
+    private Date completionDate;		/* completionDate */
+    
+    
+    private double quantity;			/* quantity */
+    
+    
+    private BigDecimal price;				/* price */
+    
+    
+    private BigDecimal orderFee;			/* price */
+    
+    
+    private AccountDataBean account;
+    
+    
+    private QuoteDataBean quote;
+    
+   
+    private HoldingDataBean holding;
+
+    private String symbol;
+
+    public OrderDataBean() {        
+    }
+
+    public OrderDataBean(Integer orderID,
+                            String orderType,
+                            String orderStatus,
+                            Date openDate,
+                            Date completionDate,
+                            double quantity,
+                            BigDecimal price,
+                            BigDecimal orderFee,
+                            String symbol
+                            ) {
+        setOrderID(orderID);
+        setOrderType(orderType);
+        setOrderStatus(orderStatus);
+        setOpenDate(openDate);
+        setCompletionDate(completionDate);
+        setQuantity(quantity);
+        setPrice(price);
+        setOrderFee(orderFee);
+        setSymbol(symbol);
+    }
+    
+    public OrderDataBean(String orderType,
+            String orderStatus,
+            Date openDate,
+            Date completionDate,
+            double quantity,
+            BigDecimal price,
+            BigDecimal orderFee,
+            AccountDataBean account,
+            QuoteDataBean quote, HoldingDataBean holding) {
+        setOrderType(orderType);
+        setOrderStatus(orderStatus);
+        setOpenDate(openDate);
+        setCompletionDate(completionDate);
+        setQuantity(quantity);
+        setPrice(price);
+        setOrderFee(orderFee);
+        setAccount(account);
+        setQuote(quote);
+        setHolding(holding);
+    }
+
+    public static OrderDataBean getRandomInstance() {
+        return new OrderDataBean(
+            new Integer(TradeConfig.rndInt(100000)),
+            TradeConfig.rndBoolean() ? "buy" : "sell",
+            "open",
+            new java.util.Date(TradeConfig.rndInt(Integer.MAX_VALUE)),
+            new java.util.Date(TradeConfig.rndInt(Integer.MAX_VALUE)),
+            TradeConfig.rndQuantity(),
+            TradeConfig.rndBigDecimal(1000.0f),
+            TradeConfig.rndBigDecimal(1000.0f),
+            TradeConfig.rndSymbol()
+        );
+    }
+
+    public String toString()
+    {
+        return "Order " + getOrderID()
+                + "\n\t      orderType: " + getOrderType()
+                + "\n\t    orderStatus: " +	getOrderStatus()
+                + "\n\t       openDate: " +	getOpenDate()
+                + "\n\t completionDate: " +	getCompletionDate()
+                + "\n\t       quantity: " +	getQuantity()
+                + "\n\t          price: " +	getPrice()
+                + "\n\t       orderFee: " +	getOrderFee()
+                + "\n\t         symbol: " +	getSymbol()
+                ;
+    }
+    public String toHTML()
+    {
+        return "<BR>Order <B>" + getOrderID() + "</B>"
+                + "<LI>      orderType: " + getOrderType() + "</LI>"
+                + "<LI>    orderStatus: " +	getOrderStatus() + "</LI>"
+                + "<LI>       openDate: " +	getOpenDate() + "</LI>"
+                + "<LI> completionDate: " +	getCompletionDate() + "</LI>"
+                + "<LI>       quantity: " +	getQuantity() + "</LI>"
+                + "<LI>          price: " +	getPrice() + "</LI>"
+                + "<LI>       orderFee: " +	getOrderFee() + "</LI>"
+                + "<LI>         symbol: " +	getSymbol() + "</LI>"
+                ;
+    }
+
+    public void print()
+    {
+        Log.log( this.toString() );
+    }
+
+    public Integer getOrderID() {
+        return orderID;
+    }
+
+    public void setOrderID(Integer orderID) {
+        this.orderID = orderID;
+    }
+
+    public String getOrderType() {
+        return orderType;
+    }
+
+    public void setOrderType(String orderType) {
+        this.orderType = orderType;
+    }
+
+    public String getOrderStatus() {
+        return orderStatus;
+    }
+
+    public void setOrderStatus(String orderStatus) {
+        this.orderStatus = orderStatus;
+    }
+
+    public Date getOpenDate() {
+        return openDate;
+    }
+
+    public void setOpenDate(Date openDate) {
+        this.openDate = openDate;
+    }
+
+    public Date getCompletionDate() {
+        return completionDate;
+    }
+
+    public void setCompletionDate(Date completionDate) {
+        this.completionDate = completionDate;
+    }
+
+    public double getQuantity() {
+        return quantity;
+    }
+
+    public void setQuantity(double quantity) {
+        this.quantity = quantity;
+    }
+
+
+    public BigDecimal getPrice() {
+        return price;
+    }
+
+    public void setPrice(BigDecimal price) {
+        this.price = price;
+    }
+
+    public BigDecimal getOrderFee() {
+        return orderFee;
+    }
+
+    public void setOrderFee(BigDecimal orderFee) {
+        this.orderFee = orderFee;
+    }
+
+    public String getSymbol() {
+        if (quote != null) {
+            return quote.getSymbol();
+        }
+        return symbol;
+    }
+
+    public void setSymbol(String symbol) {
+        this.symbol = symbol;
+    }
+
+    public AccountDataBean getAccount() {
+        return account;
+    }
+
+    public void setAccount(AccountDataBean account) {
+        this.account = account;
+    }
+
+    public QuoteDataBean getQuote() {
+        return quote;
+    }
+
+    public void setQuote(QuoteDataBean quote) {
+        this.quote = quote;
+    }
+
+    public HoldingDataBean getHolding() {
+        return holding;
+    }
+
+    public void setHolding(HoldingDataBean holding) {
+        this.holding = holding;
+    }
+
+    public boolean isBuy()
+    {
+    	String orderType = getOrderType();
+    	if ( orderType.compareToIgnoreCase("buy") == 0 )
+    		return true;
+    	return false;
+    }
+
+    public boolean isSell()
+    {
+    	String orderType = getOrderType();
+    	if ( orderType.compareToIgnoreCase("sell") == 0 )
+    		return true;
+    	return false;
+    }
+
+    public boolean isOpen()
+    {
+    	String orderStatus = getOrderStatus();
+    	if ( (orderStatus.compareToIgnoreCase("open") == 0) ||
+	         (orderStatus.compareToIgnoreCase("processing") == 0) )
+	    		return true;
+    	return false;
+    }
+
+    public boolean isCompleted()
+    {
+    	String orderStatus = getOrderStatus();
+    	if ( (orderStatus.compareToIgnoreCase("completed") == 0) ||
+	         (orderStatus.compareToIgnoreCase("alertcompleted") == 0)    ||
+	         (orderStatus.compareToIgnoreCase("cancelled") == 0) )
+	    		return true;
+    	return false;
+    }
+
+    public boolean isCancelled()
+    {
+    	String orderStatus = getOrderStatus();
+    	if (orderStatus.compareToIgnoreCase("cancelled") == 0)
+	    		return true;
+    	return false;
+    }
+
+
+	public void cancel()
+	{
+		setOrderStatus("cancelled");
+	}
+
+    @Override
+    public int hashCode() {
+        int hash = 0;
+        hash += (this.orderID != null ? this.orderID.hashCode() : 0);
+        return hash;
+    }
+    
+    @Override
+    public boolean equals(Object object) {
+        // TODO: Warning - this method won't work in the case the id fields are not set
+        if (!(object instanceof OrderDataBean)) {
+            return false;
+        }
+        OrderDataBean other = (OrderDataBean)object;
+        if (this.orderID != other.orderID && (this.orderID == null || !this.orderID.equals(other.orderID))) return false;
+        return true;
+    }
+}
+

Propchange: geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/OrderDataBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/OrderDataBean.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/OrderDataBean.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/QuoteDataBean.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/QuoteDataBean.java?rev=775187&view=auto
==============================================================================
--- geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/QuoteDataBean.java (added)
+++ geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/QuoteDataBean.java Fri May 15 15:17:36 2009
@@ -0,0 +1,201 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.samples.daytrader;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Collection;
+
+import javax.persistence.*;
+
+import org.apache.geronimo.samples.daytrader.util.Log;
+
+
+public class QuoteDataBean implements Serializable {
+
+    
+
+    
+    private String symbol;          /* symbol */
+    
+   
+    private String companyName;     /* companyName */
+    
+    
+    private double volume;          /* volume */
+    
+    
+    private BigDecimal price;       /* price */
+    
+    
+    private BigDecimal open1;       /* open1 price */
+    
+    
+    private BigDecimal low;         /* low price */
+    
+    
+    private BigDecimal high;        /* high price */
+    
+    
+    private double change1;         /* price change */
+    
+    
+    
+    public QuoteDataBean() {
+    }
+
+    public QuoteDataBean(String symbol, String companyName, double volume,
+            BigDecimal price, BigDecimal open, BigDecimal low,
+            BigDecimal high, double change) {
+        setSymbol(symbol);
+        setCompanyName(companyName);
+        setVolume(volume);
+        setPrice(price);
+        setOpen(open);
+        setLow(low);
+        setHigh(high);
+        setChange(change);
+    }
+
+    public static QuoteDataBean getRandomInstance() {
+        return new QuoteDataBean(
+                TradeConfig.rndSymbol(),                 //symbol
+                TradeConfig.rndSymbol() + " Incorporated",         //Company Name
+                TradeConfig.rndFloat(100000),            //volume
+                TradeConfig.rndBigDecimal(1000.0f),     //price
+                TradeConfig.rndBigDecimal(1000.0f),     //open1
+                TradeConfig.rndBigDecimal(1000.0f),     //low
+                TradeConfig.rndBigDecimal(1000.0f),     //high
+                TradeConfig.rndFloat(100000)            //volume
+        );
+    }
+
+    //Create a "zero" value quoteDataBean for the given symbol
+    public QuoteDataBean(String symbol) {
+        setSymbol(symbol);
+    }
+
+    public String toString() {
+        return "\n\tQuote Data for: " + getSymbol()
+                + "\n\t\t companyName: " + getCompanyName()
+                + "\n\t\t      volume: " + getVolume()
+                + "\n\t\t       price: " + getPrice()
+                + "\n\t\t        open1: " + getOpen()
+                + "\n\t\t         low: " + getLow()
+                + "\n\t\t        high: " + getHigh()
+                + "\n\t\t      change1: " + getChange()
+                ;
+    }
+
+    public String toHTML() {
+        return "<BR>Quote Data for: " + getSymbol()
+                + "<LI> companyName: " + getCompanyName() + "</LI>"
+                + "<LI>      volume: " + getVolume() + "</LI>"
+                + "<LI>       price: " + getPrice() + "</LI>"
+                + "<LI>        open1: " + getOpen() + "</LI>"
+                + "<LI>         low: " + getLow() + "</LI>"
+                + "<LI>        high: " + getHigh() + "</LI>"
+                + "<LI>      change1: " + getChange() + "</LI>"
+                ;
+    }
+
+    public void print() {
+        Log.log(this.toString());
+    }
+
+    public String getSymbol() {
+        return symbol;
+    }
+
+    public void setSymbol(String symbol) {
+        this.symbol = symbol;
+    }
+
+    public String getCompanyName() {
+        return companyName;
+    }
+
+    public void setCompanyName(String companyName) {
+        this.companyName = companyName;
+    }
+
+    public BigDecimal getPrice() {
+        return price;
+    }
+
+    public void setPrice(BigDecimal price) {
+        this.price = price;
+    }
+
+    public BigDecimal getOpen() {
+        return open1;
+    }
+
+    public void setOpen(BigDecimal open) {
+        this.open1 = open;
+    }
+
+    public BigDecimal getLow() {
+        return low;
+    }
+
+    public void setLow(BigDecimal low) {
+        this.low = low;
+    }
+
+    public BigDecimal getHigh() {
+        return high;
+    }
+
+    public void setHigh(BigDecimal high) {
+        this.high = high;
+    }
+
+    public double getChange() {
+        return change1;
+    }
+
+    public void setChange(double change) {
+        this.change1 = change;
+    }
+
+    public double getVolume() {
+        return volume;
+    }
+
+    public void setVolume(double volume) {
+        this.volume = volume;
+    }
+
+    @Override
+    public int hashCode() {
+        int hash = 0;
+        hash += (this.symbol != null ? this.symbol.hashCode() : 0);
+        return hash;
+    }
+    
+    @Override
+    public boolean equals(Object object) {
+        // TODO: Warning - this method won't work in the case the id fields are not set
+        if (!(object instanceof QuoteDataBean)) {
+            return false;
+        }
+        QuoteDataBean other = (QuoteDataBean)object;
+        if (this.symbol != other.symbol && (this.symbol == null || !this.symbol.equals(other.symbol))) return false;
+        return true;
+    }
+}
\ No newline at end of file

Propchange: geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/QuoteDataBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/QuoteDataBean.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/daytrader/trunk/daytrader-webonly/src/main/java/org/apache/geronimo/samples/daytrader/QuoteDataBean.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message