geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jb...@apache.org
Subject svn commit: r898859 [1/2] - in /geronimo/sandbox/jbohn/daytrader-bp-new/modules: daytrader-api/ daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/api/ daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/persistence/ daytra...
Date Wed, 13 Jan 2010 17:51:09 GMT
Author: jbohn
Date: Wed Jan 13 17:51:05 2010
New Revision: 898859

URL: http://svn.apache.org/viewvc?rev=898859&view=rev
Log:
add interfaces for DataBeans under api bundle, rename DataBeans to IMPL names, and update everything as appropriately

Added:
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/persistence/
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/persistence/api/
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/persistence/api/AccountDataBean.java   (with props)
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/persistence/api/AccountProfileDataBean.java   (with props)
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/persistence/api/HoldingDataBean.java   (with props)
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/persistence/api/MarketSummaryDataBean.java   (with props)
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/persistence/api/OrderDataBean.java   (with props)
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/persistence/api/QuoteDataBean.java   (with props)
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/persistence/api/RunStatsDataBean.java   (with props)
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-beans/src/main/java/org/apache/geronimo/samples/daytrader/beans/AccountDataBeanImpl.java
      - copied, changed from r898362, geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-beans/src/main/java/org/apache/geronimo/samples/daytrader/beans/AccountDataBean.java
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-beans/src/main/java/org/apache/geronimo/samples/daytrader/beans/AccountProfileDataBeanImpl.java
      - copied, changed from r898362, geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-beans/src/main/java/org/apache/geronimo/samples/daytrader/beans/AccountProfileDataBean.java
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-beans/src/main/java/org/apache/geronimo/samples/daytrader/beans/HoldingDataBeanImpl.java
      - copied, changed from r898362, geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-beans/src/main/java/org/apache/geronimo/samples/daytrader/beans/HoldingDataBean.java
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-beans/src/main/java/org/apache/geronimo/samples/daytrader/beans/OrderDataBeanImpl.java
      - copied, changed from r898362, geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-beans/src/main/java/org/apache/geronimo/samples/daytrader/beans/OrderDataBean.java
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-beans/src/main/java/org/apache/geronimo/samples/daytrader/beans/QuoteDataBeanImpl.java
      - copied, changed from r898362, geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-beans/src/main/java/org/apache/geronimo/samples/daytrader/beans/QuoteDataBean.java
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/AccountDataBeanImpl.java
      - copied, changed from r898362, geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/AccountDataBean.java
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/AccountProfileDataBeanImpl.java
      - copied, changed from r898362, geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/AccountProfileDataBean.java
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/HoldingDataBeanImpl.java
      - copied, changed from r898362, geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/HoldingDataBean.java
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/OrderDataBeanImpl.java
      - copied, changed from r898362, geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/OrderDataBean.java
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/QuoteDataBeanImpl.java
      - copied, changed from r898362, geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/QuoteDataBean.java
Removed:
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-beans/src/main/java/org/apache/geronimo/samples/daytrader/beans/AccountDataBean.java
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-beans/src/main/java/org/apache/geronimo/samples/daytrader/beans/AccountProfileDataBean.java
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-beans/src/main/java/org/apache/geronimo/samples/daytrader/beans/HoldingDataBean.java
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-beans/src/main/java/org/apache/geronimo/samples/daytrader/beans/MarketSummaryDataBean.java
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-beans/src/main/java/org/apache/geronimo/samples/daytrader/beans/OrderDataBean.java
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-beans/src/main/java/org/apache/geronimo/samples/daytrader/beans/QuoteDataBean.java
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-beans/src/main/java/org/apache/geronimo/samples/daytrader/beans/RunStatsDataBean.java
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/AccountDataBean.java
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/AccountProfileDataBean.java
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/HoldingDataBean.java
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/MarketSummaryDataBean.java
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/OrderDataBean.java
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/QuoteDataBean.java
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/RunStatsDataBean.java
Modified:
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/pom.xml
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/api/TradeDBManager.java
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/api/TradeServices.java
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/api/TradeServicesManager.java
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-beans/pom.xml
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-core/pom.xml
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-core/src/main/java/org/apache/geronimo/samples/daytrader/core/TradeDBManagerImpl.java
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-core/src/main/java/org/apache/geronimo/samples/daytrader/core/TradeServicesManagerImpl.java
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-entities/pom.xml
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-entities/src/main/resources/META-INF/persistence.xml
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-persist-jdbc/pom.xml
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-persist-jdbc/src/main/java/org/apache/geronimo/samples/daytrader/persist/jdbc/TradeJDBCDirect.java
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-persist-jpa/pom.xml
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-persist-jpa/src/main/java/org/apache/geronimo/samples/daytrader/persist/jpa/TradeJPADirect.java
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-web/pom.xml
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-web/src/main/java/org/apache/geronimo/samples/daytrader/web/TradeBuildDB.java
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-web/src/main/java/org/apache/geronimo/samples/daytrader/web/TradeConfigServlet.java
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-web/src/main/java/org/apache/geronimo/samples/daytrader/web/TradeScenarioServlet.java
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-web/src/main/java/org/apache/geronimo/samples/daytrader/web/TradeServletAction.java
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/PingJDBCRead.java
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-web/src/main/java/org/apache/geronimo/samples/daytrader/web/prims/PingJDBCWrite.java
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-web/src/main/resources/PingJspEL.jsp
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-web/src/main/resources/account.jsp
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-web/src/main/resources/accountImg.jsp
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-web/src/main/resources/displayQuote.jsp
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-web/src/main/resources/marketSummary.jsp
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-web/src/main/resources/order.jsp
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-web/src/main/resources/orderImg.jsp
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-web/src/main/resources/portfolio.jsp
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-web/src/main/resources/portfolioImg.jsp
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-web/src/main/resources/quote.jsp
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-web/src/main/resources/quoteImg.jsp
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-web/src/main/resources/runStats.jsp
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-web/src/main/resources/tradehome.jsp
    geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-web/src/main/resources/tradehomeImg.jsp

Modified: geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/pom.xml?rev=898859&r1=898858&r2=898859&view=diff
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/pom.xml (original)
+++ geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/pom.xml Wed Jan 13 17:51:05 2010
@@ -37,6 +37,7 @@
             <version>${pom.version}</version>
             <scope>provided</scope>
         </dependency>
+<!--
         <dependency>
             <groupId>org.apache.geronimo.daytrader.modules</groupId>
             <artifactId>daytrader-entities</artifactId>
@@ -48,6 +49,7 @@
             <artifactId>geronimo-jpa_1.0_spec</artifactId>
             <scope>provided</scope>
         </dependency>
+-->
     </dependencies>
 
     <build>
@@ -66,11 +68,12 @@
                         <Bundle-SymbolicName>${pom.groupId}.${pom.artifactId}</Bundle-SymbolicName>
                         <Bundle-Version>${pom.version}</Bundle-Version>
                         <Export-Package>
-                            org.apache.geronimo.samples.daytrader.api;version=1.0.0
+                            org.apache.geronimo.samples.daytrader.api;version=1.0.0,
+                            org.apache.geronimo.samples.daytrader.persistence.api;version=1.0.0
                         </Export-Package>
                         <Import-Package>
-                            <!--org.apache.geronimo.samples.daytrader.api;version=1.0,-->
-                            org.apache.geronimo.samples.daytrader.beans;version=1.0,
+                            org.apache.geronimo.samples.daytrader.api;version=1.0,
+                            <!--org.apache.geronimo.samples.daytrader.beans;version=1.0,-->
                             org.apache.geronimo.samples.daytrader.util;version=1.0
                         </Import-Package>
                     </instructions>

Modified: geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/api/TradeDBManager.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/api/TradeDBManager.java?rev=898859&r1=898858&r2=898859&view=diff
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/api/TradeDBManager.java (original)
+++ geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/api/TradeDBManager.java Wed Jan 13 17:51:05 2010
@@ -16,7 +16,7 @@
  */
 package org.apache.geronimo.samples.daytrader.api;
 
-import org.apache.geronimo.samples.daytrader.beans.RunStatsDataBean;
+import org.apache.geronimo.samples.daytrader.persistence.api.RunStatsDataBean;
 
 /**
   * TradeDBManager interface centralizes and simplifies the DB

Modified: geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/api/TradeServices.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/api/TradeServices.java?rev=898859&r1=898858&r2=898859&view=diff
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/api/TradeServices.java (original)
+++ geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/api/TradeServices.java Wed Jan 13 17:51:05 2010
@@ -22,12 +22,12 @@
 import java.rmi.RemoteException;
 import java.util.Collection;
 
-import org.apache.geronimo.samples.daytrader.beans.AccountDataBean;
-import org.apache.geronimo.samples.daytrader.beans.AccountProfileDataBean;
-import org.apache.geronimo.samples.daytrader.beans.HoldingDataBean;
-import org.apache.geronimo.samples.daytrader.beans.MarketSummaryDataBean;
-import org.apache.geronimo.samples.daytrader.beans.OrderDataBean;
-import org.apache.geronimo.samples.daytrader.beans.QuoteDataBean;
+import org.apache.geronimo.samples.daytrader.persistence.api.AccountDataBean;
+import org.apache.geronimo.samples.daytrader.persistence.api.AccountProfileDataBean;
+import org.apache.geronimo.samples.daytrader.persistence.api.HoldingDataBean;
+import org.apache.geronimo.samples.daytrader.persistence.api.MarketSummaryDataBean;
+import org.apache.geronimo.samples.daytrader.persistence.api.OrderDataBean;
+import org.apache.geronimo.samples.daytrader.persistence.api.QuoteDataBean;
 
 /**
   * TradeServices interface specifies the business methods provided by the Trade online broker application.
@@ -223,9 +223,13 @@
 	 * Update userID's account profile information using the provided AccountProfileDataBean object
 	 *
 	 * @param userID the account userID to lookup
-	 * @param User account profile data in AccountProfileDataBean
+         * @param password the updated password
+         * @param fullName the updated fullName
+         * @param address the updated address
+         * @param address the updated email
+         * @param the updated creditcard
 	 */
-   public AccountProfileDataBean updateAccountProfile(AccountProfileDataBean profileData) throws Exception, RemoteException;                              
+   public AccountProfileDataBean updateAccountProfile(String userID, String password, String fullName, String address, String email, String creditcard) throws Exception, RemoteException;                              
 
 
 	/**

Modified: geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/api/TradeServicesManager.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/api/TradeServicesManager.java?rev=898859&r1=898858&r2=898859&view=diff
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/api/TradeServicesManager.java (original)
+++ geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/api/TradeServicesManager.java Wed Jan 13 17:51:05 2010
@@ -19,7 +19,7 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.geronimo.samples.daytrader.beans.MarketSummaryDataBean;
+import org.apache.geronimo.samples.daytrader.persistence.api.MarketSummaryDataBean;
 
 /**
   * TradeServicesManager interface provides an interface to be

Added: geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/persistence/api/AccountDataBean.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/persistence/api/AccountDataBean.java?rev=898859&view=auto
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/persistence/api/AccountDataBean.java (added)
+++ geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/persistence/api/AccountDataBean.java Wed Jan 13 17:51:05 2010
@@ -0,0 +1,77 @@
+/**
+ *  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.persistence.api;
+
+import java.math.BigDecimal;
+import java.util.Collection;
+import java.util.Date;
+
+public interface AccountDataBean {
+    
+    public String toString();
+
+    public String toHTML();
+
+    public Integer getAccountID();
+
+    public void setAccountID(Integer accountID);
+
+    public int getLoginCount();
+
+    public void setLoginCount(int loginCount);
+
+    public int getLogoutCount();
+
+    public void setLogoutCount(int logoutCount);
+
+    public Date getLastLogin();
+
+    public void setLastLogin(Date lastLogin);
+
+    public Date getCreationDate();
+
+    public void setCreationDate(Date creationDate);
+
+    public BigDecimal getBalance();
+
+    public void setBalance(BigDecimal balance);
+
+    public BigDecimal getOpenBalance();
+
+    public void setOpenBalance(BigDecimal openBalance);
+
+    public String getProfileID();
+
+    public void setProfileID(String profileID);
+
+    public Collection<OrderDataBean> getOrders();
+
+    public void setOrders(Collection<OrderDataBean> orders);
+    
+    public Collection<HoldingDataBean> getHoldings();
+
+    public void setHoldings(Collection<HoldingDataBean> holdings);
+
+    public AccountProfileDataBean getProfile();
+
+    public void setProfile(AccountProfileDataBean profile);
+
+    public void login(String password);
+
+    public void logout();
+
+}
\ No newline at end of file

Propchange: geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/persistence/api/AccountDataBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/persistence/api/AccountDataBean.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/persistence/api/AccountDataBean.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/persistence/api/AccountProfileDataBean.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/persistence/api/AccountProfileDataBean.java?rev=898859&view=auto
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/persistence/api/AccountProfileDataBean.java (added)
+++ geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/persistence/api/AccountProfileDataBean.java Wed Jan 13 17:51:05 2010
@@ -0,0 +1,53 @@
+/**
+ *  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.persistence.api;
+
+public interface AccountProfileDataBean {
+
+    public String toString();
+
+    public String toHTML();
+
+    public String getUserID();
+
+    public void setUserID(String userID);
+
+    public String getPassword();
+
+    public void setPassword(String password);
+
+    public String getFullName();
+
+    public void setFullName(String fullName);
+
+    public String getAddress();
+
+    public void setAddress(String address);
+
+    public String getEmail();
+
+    public void setEmail(String email);
+
+    public String getCreditCard();
+
+    public void setCreditCard(String creditCard);
+
+    public AccountDataBean getAccount();
+
+    public void setAccount(AccountDataBean account);
+    
+}

Propchange: geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/persistence/api/AccountProfileDataBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/persistence/api/AccountProfileDataBean.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/persistence/api/AccountProfileDataBean.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/persistence/api/HoldingDataBean.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/persistence/api/HoldingDataBean.java?rev=898859&view=auto
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/persistence/api/HoldingDataBean.java (added)
+++ geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/persistence/api/HoldingDataBean.java Wed Jan 13 17:51:05 2010
@@ -0,0 +1,56 @@
+/**
+ *  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.persistence.api;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+public interface HoldingDataBean {
+
+    public String toString();
+
+    public String toHTML();
+
+    public Integer getHoldingID();
+
+    public void setHoldingID(Integer holdingID);
+
+    public double getQuantity();
+
+    public void setQuantity(double quantity);
+
+    public BigDecimal getPurchasePrice();
+
+    public void setPurchasePrice(BigDecimal purchasePrice);
+
+    public Date getPurchaseDate();
+
+    public void setPurchaseDate(Date purchaseDate);
+
+    public String getQuoteID();
+
+    public void setQuoteID(String quoteID);
+
+    public AccountDataBean getAccount();
+
+    public void setAccount(AccountDataBean account);
+    
+    public QuoteDataBean getQuote();
+
+    public void setQuote(QuoteDataBean quote);
+
+}

Propchange: geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/persistence/api/HoldingDataBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/persistence/api/HoldingDataBean.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/persistence/api/HoldingDataBean.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/persistence/api/MarketSummaryDataBean.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/persistence/api/MarketSummaryDataBean.java?rev=898859&view=auto
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/persistence/api/MarketSummaryDataBean.java (added)
+++ geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/persistence/api/MarketSummaryDataBean.java Wed Jan 13 17:51:05 2010
@@ -0,0 +1,238 @@
+/**
+ *  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.persistence.api;
+
+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;
+import org.apache.geronimo.samples.daytrader.util.TradeConfig;
+
+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;
+	}
+
+}

Propchange: geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/persistence/api/MarketSummaryDataBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/persistence/api/MarketSummaryDataBean.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/persistence/api/MarketSummaryDataBean.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/persistence/api/OrderDataBean.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/persistence/api/OrderDataBean.java?rev=898859&view=auto
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/persistence/api/OrderDataBean.java (added)
+++ geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/persistence/api/OrderDataBean.java Wed Jan 13 17:51:05 2010
@@ -0,0 +1,89 @@
+/**
+ *  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.persistence.api;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+public interface OrderDataBean {
+
+    public String toString();
+
+    public String toHTML();
+
+    public Integer getOrderID();
+
+    public void setOrderID(Integer orderID);
+
+    public String getOrderType();
+
+    public void setOrderType(String orderType);
+
+    public String getOrderStatus();
+
+    public void setOrderStatus(String orderStatus);
+
+    public Date getOpenDate();
+
+    public void setOpenDate(Date openDate);
+
+    public Date getCompletionDate();
+
+    public void setCompletionDate(Date completionDate);
+
+    public double getQuantity();
+
+    public void setQuantity(double quantity);
+
+    public BigDecimal getPrice();
+
+    public void setPrice(BigDecimal price);
+
+    public BigDecimal getOrderFee();
+
+    public void setOrderFee(BigDecimal orderFee);
+
+    public String getSymbol();
+
+    public void setSymbol(String symbol);
+
+    public AccountDataBean getAccount();
+
+    public void setAccount(AccountDataBean account);
+
+    public QuoteDataBean getQuote();
+
+    public void setQuote(QuoteDataBean quote);
+
+    public HoldingDataBean getHolding();
+
+    public void setHolding(HoldingDataBean holding);
+
+    public boolean isBuy();
+
+    public boolean isSell();
+
+    public boolean isOpen();
+
+    public boolean isCompleted();
+
+    public boolean isCancelled();
+
+    public void cancel();
+
+}
+

Propchange: geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/persistence/api/OrderDataBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/persistence/api/OrderDataBean.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/persistence/api/OrderDataBean.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/persistence/api/QuoteDataBean.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/persistence/api/QuoteDataBean.java?rev=898859&view=auto
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/persistence/api/QuoteDataBean.java (added)
+++ geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/persistence/api/QuoteDataBean.java Wed Jan 13 17:51:05 2010
@@ -0,0 +1,59 @@
+/**
+ *  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.persistence.api;
+
+import java.math.BigDecimal;
+
+public interface QuoteDataBean {
+    
+    public String toString();
+
+    public String toHTML();
+
+    public String getSymbol();
+
+    public void setSymbol(String symbol);
+
+    public String getCompanyName();
+
+    public void setCompanyName(String companyName);
+
+    public BigDecimal getPrice();
+
+    public void setPrice(BigDecimal price);
+
+    public BigDecimal getOpen();
+
+    public void setOpen(BigDecimal open);
+
+    public BigDecimal getLow();
+
+    public void setLow(BigDecimal low);
+
+    public BigDecimal getHigh();
+
+    public void setHigh(BigDecimal high);
+
+    public double getChange();
+
+    public void setChange(double change);
+
+    public double getVolume();
+
+    public void setVolume(double volume);
+
+}

Propchange: geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/persistence/api/QuoteDataBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/persistence/api/QuoteDataBean.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/persistence/api/QuoteDataBean.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/persistence/api/RunStatsDataBean.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/persistence/api/RunStatsDataBean.java?rev=898859&view=auto
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/persistence/api/RunStatsDataBean.java (added)
+++ geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/persistence/api/RunStatsDataBean.java Wed Jan 13 17:51:05 2010
@@ -0,0 +1,255 @@
+/**
+ *  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.persistence.api;
+
+
+import java.io.Serializable;
+
+public class RunStatsDataBean implements Serializable
+{
+	//Constructors
+	public RunStatsDataBean(){ }
+
+	// count of trade users in the database (users w/ userID like 'uid:%')
+	private int tradeUserCount;
+	// count of trade stocks in the database (stocks w/ symbol like 's:%')
+	private int tradeStockCount;
+	
+	// count of new registered users in this run (users w/ userID like 'ru:%') -- random user
+	private int newUserCount;
+	
+	// sum of logins by trade users
+	private int sumLoginCount;
+	// sum of logouts by trade users	
+	private int sumLogoutCount;
+
+	// count of holdings of trade users	
+	private int holdingCount;
+
+	// count of orders of trade users		
+	private int orderCount;	
+	// count of buy orders of trade users			
+	private int buyOrderCount;
+	// count of sell orders of trade users			
+	private int sellOrderCount;
+	// count of cancelled orders of trade users			
+	private int cancelledOrderCount;
+	// count of open orders of trade users			
+	private int openOrderCount;
+	// count of orders deleted during this trade Reset
+	private int deletedOrderCount;
+
+	public String toString()
+	{
+		return "\n\tRunStatsData for reset at " + new java.util.Date()
+			+ "\n\t\t      tradeUserCount: " + getTradeUserCount()
+			+ "\n\t\t        newUserCount: " + getNewUserCount()
+			+ "\n\t\t       sumLoginCount: " + getSumLoginCount()
+			+ "\n\t\t      sumLogoutCount: " + getSumLogoutCount()
+			+ "\n\t\t        holdingCount: " + getHoldingCount()
+			+ "\n\t\t          orderCount: " + getOrderCount()
+			+ "\n\t\t       buyOrderCount: " + getBuyOrderCount()
+			+ "\n\t\t      sellOrderCount: " + getSellOrderCount()
+			+ "\n\t\t cancelledOrderCount: " + getCancelledOrderCount()
+			+ "\n\t\t      openOrderCount: " + getOpenOrderCount()
+			+ "\n\t\t   deletedOrderCount: " + getDeletedOrderCount()
+			;
+	}
+
+
+	/**
+	 * Gets the tradeUserCount
+	 * @return Returns a int
+	 */
+	public int getTradeUserCount() {
+		return tradeUserCount;
+	}
+	/**
+	 * Sets the tradeUserCount
+	 * @param tradeUserCount The tradeUserCount to set
+	 */
+	public void setTradeUserCount(int tradeUserCount) {
+		this.tradeUserCount = tradeUserCount;
+	}
+
+	/**
+	 * Gets the newUserCount
+	 * @return Returns a int
+	 */
+	public int getNewUserCount() {
+		return newUserCount;
+	}
+	/**
+	 * Sets the newUserCount
+	 * @param newUserCount The newUserCount to set
+	 */
+	public void setNewUserCount(int newUserCount) {
+		this.newUserCount = newUserCount;
+	}
+
+	/**
+	 * Gets the sumLoginCount
+	 * @return Returns a int
+	 */
+	public int getSumLoginCount() {
+		return sumLoginCount;
+	}
+	/**
+	 * Sets the sumLoginCount
+	 * @param sumLoginCount The sumLoginCount to set
+	 */
+	public void setSumLoginCount(int sumLoginCount) {
+		this.sumLoginCount = sumLoginCount;
+	}
+
+	/**
+	 * Gets the sumLogoutCount
+	 * @return Returns a int
+	 */
+	public int getSumLogoutCount() {
+		return sumLogoutCount;
+	}
+	/**
+	 * Sets the sumLogoutCount
+	 * @param sumLogoutCount The sumLogoutCount to set
+	 */
+	public void setSumLogoutCount(int sumLogoutCount) {
+		this.sumLogoutCount = sumLogoutCount;
+	}
+
+	/**
+	 * Gets the holdingCount
+	 * @return Returns a int
+	 */
+	public int getHoldingCount() {
+		return holdingCount;
+	}
+	/**
+	 * Sets the holdingCount
+	 * @param holdingCount The holdingCount to set
+	 */
+	public void setHoldingCount(int holdingCount) {
+		this.holdingCount = holdingCount;
+	}
+
+	/**
+	 * Gets the buyOrderCount
+	 * @return Returns a int
+	 */
+	public int getBuyOrderCount() {
+		return buyOrderCount;
+	}
+	/**
+	 * Sets the buyOrderCount
+	 * @param buyOrderCount The buyOrderCount to set
+	 */
+	public void setBuyOrderCount(int buyOrderCount) {
+		this.buyOrderCount = buyOrderCount;
+	}
+
+	/**
+	 * Gets the sellOrderCount
+	 * @return Returns a int
+	 */
+	public int getSellOrderCount() {
+		return sellOrderCount;
+	}
+	/**
+	 * Sets the sellOrderCount
+	 * @param sellOrderCount The sellOrderCount to set
+	 */
+	public void setSellOrderCount(int sellOrderCount) {
+		this.sellOrderCount = sellOrderCount;
+	}
+
+	/**
+	 * Gets the cancelledOrderCount
+	 * @return Returns a int
+	 */
+	public int getCancelledOrderCount() {
+		return cancelledOrderCount;
+	}
+	/**
+	 * Sets the cancelledOrderCount
+	 * @param cancelledOrderCount The cancelledOrderCount to set
+	 */
+	public void setCancelledOrderCount(int cancelledOrderCount) {
+		this.cancelledOrderCount = cancelledOrderCount;
+	}
+
+	/**
+	 * Gets the openOrderCount
+	 * @return Returns a int
+	 */
+	public int getOpenOrderCount() {
+		return openOrderCount;
+	}
+	/**
+	 * Sets the openOrderCount
+	 * @param openOrderCount The openOrderCount to set
+	 */
+	public void setOpenOrderCount(int openOrderCount) {
+		this.openOrderCount = openOrderCount;
+	}
+
+	/**
+	 * Gets the deletedOrderCount
+	 * @return Returns a int
+	 */
+	public int getDeletedOrderCount() {
+		return deletedOrderCount;
+	}
+	/**
+	 * Sets the deletedOrderCount
+	 * @param deletedOrderCount The deletedOrderCount to set
+	 */
+	public void setDeletedOrderCount(int deletedOrderCount) {
+		this.deletedOrderCount = deletedOrderCount;
+	}
+
+	/**
+	 * Gets the orderCount
+	 * @return Returns a int
+	 */
+	public int getOrderCount() {
+		return orderCount;
+	}
+	/**
+	 * Sets the orderCount
+	 * @param orderCount The orderCount to set
+	 */
+	public void setOrderCount(int orderCount) {
+		this.orderCount = orderCount;
+	}
+
+	/**
+	 * Gets the tradeStockCount
+	 * @return Returns a int
+	 */
+	public int getTradeStockCount() {
+		return tradeStockCount;
+	}
+	/**
+	 * Sets the tradeStockCount
+	 * @param tradeStockCount The tradeStockCount to set
+	 */
+	public void setTradeStockCount(int tradeStockCount) {
+		this.tradeStockCount = tradeStockCount;
+	}
+
+}
+

Propchange: geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/persistence/api/RunStatsDataBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/persistence/api/RunStatsDataBean.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-api/src/main/java/org/apache/geronimo/samples/daytrader/persistence/api/RunStatsDataBean.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-beans/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-beans/pom.xml?rev=898859&r1=898858&r2=898859&view=diff
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-beans/pom.xml (original)
+++ geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-beans/pom.xml Wed Jan 13 17:51:05 2010
@@ -33,6 +33,12 @@
     <dependencies>
         <dependency>
             <groupId>org.apache.geronimo.daytrader.modules</groupId>
+            <artifactId>daytrader-api</artifactId>
+            <version>${pom.version}</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.daytrader.modules</groupId>
             <artifactId>daytrader-util</artifactId>
             <version>${pom.version}</version>
             <scope>provided</scope>
@@ -59,6 +65,7 @@
                         <Import-Package>
                             org.apache.geronimo.samples.daytrader.beans;version=1.0,
                             org.apache.geronimo.samples.daytrader.util;version=1.0,
+                            org.apache.geronimo.samples.daytrader.persistence.api;version=1.0,
                         </Import-Package>
                     </instructions>
                 </configuration>

Copied: geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-beans/src/main/java/org/apache/geronimo/samples/daytrader/beans/AccountDataBeanImpl.java (from r898362, geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-beans/src/main/java/org/apache/geronimo/samples/daytrader/beans/AccountDataBean.java)
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-beans/src/main/java/org/apache/geronimo/samples/daytrader/beans/AccountDataBeanImpl.java?p2=geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-beans/src/main/java/org/apache/geronimo/samples/daytrader/beans/AccountDataBeanImpl.java&p1=geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-beans/src/main/java/org/apache/geronimo/samples/daytrader/beans/AccountDataBean.java&r1=898362&r2=898859&rev=898859&view=diff
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-beans/src/main/java/org/apache/geronimo/samples/daytrader/beans/AccountDataBean.java (original)
+++ geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-beans/src/main/java/org/apache/geronimo/samples/daytrader/beans/AccountDataBeanImpl.java Wed Jan 13 17:51:05 2010
@@ -24,9 +24,13 @@
 
 import org.apache.geronimo.samples.daytrader.util.Log;
 import org.apache.geronimo.samples.daytrader.util.TradeConfig;
+import org.apache.geronimo.samples.daytrader.persistence.api.AccountDataBean;
+import org.apache.geronimo.samples.daytrader.persistence.api.AccountProfileDataBean;
+import org.apache.geronimo.samples.daytrader.persistence.api.HoldingDataBean;
+import org.apache.geronimo.samples.daytrader.persistence.api.OrderDataBean;
 
 
-public class AccountDataBean implements Serializable {
+public class AccountDataBeanImpl implements AccountDataBean, Serializable {
     
     private Integer accountID;              /* accountID */
     
@@ -64,10 +68,10 @@
     
     private String profileID;
 
-    public AccountDataBean() {
+    public AccountDataBeanImpl() {
     }
 
-    public AccountDataBean(Integer accountID,
+    public AccountDataBeanImpl(Integer accountID,
             int loginCount,
             int logoutCount,
             Date lastLogin,
@@ -85,7 +89,7 @@
         setProfileID(profileID);
     }
 
-    public AccountDataBean(int loginCount,
+    public AccountDataBeanImpl(int loginCount,
             int logoutCount,
             Date lastLogin,
             Date creationDate,
@@ -102,7 +106,7 @@
     }
 
     public static AccountDataBean getRandomInstance() {
-        return new AccountDataBean(new Integer(TradeConfig.rndInt(100000)), //accountID
+        return new AccountDataBeanImpl(new Integer(TradeConfig.rndInt(100000)), //accountID
                 TradeConfig.rndInt(10000), //loginCount
                 TradeConfig.rndInt(10000), //logoutCount
                 new java.util.Date(), //lastLogin
@@ -263,10 +267,10 @@
     @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)) {
+        if (!(object instanceof AccountDataBeanImpl)) {
             return false;
         }
-        AccountDataBean other = (AccountDataBean)object;
+        AccountDataBeanImpl other = (AccountDataBeanImpl)object;
         if (this.accountID != other.accountID && (this.accountID == null || !this.accountID.equals(other.accountID))) return false;
         return true;
     }

Copied: geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-beans/src/main/java/org/apache/geronimo/samples/daytrader/beans/AccountProfileDataBeanImpl.java (from r898362, geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-beans/src/main/java/org/apache/geronimo/samples/daytrader/beans/AccountProfileDataBean.java)
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-beans/src/main/java/org/apache/geronimo/samples/daytrader/beans/AccountProfileDataBeanImpl.java?p2=geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-beans/src/main/java/org/apache/geronimo/samples/daytrader/beans/AccountProfileDataBeanImpl.java&p1=geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-beans/src/main/java/org/apache/geronimo/samples/daytrader/beans/AccountProfileDataBean.java&r1=898362&r2=898859&rev=898859&view=diff
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-beans/src/main/java/org/apache/geronimo/samples/daytrader/beans/AccountProfileDataBean.java (original)
+++ geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-beans/src/main/java/org/apache/geronimo/samples/daytrader/beans/AccountProfileDataBeanImpl.java Wed Jan 13 17:51:05 2010
@@ -18,9 +18,11 @@
 
 import org.apache.geronimo.samples.daytrader.util.Log;
 import org.apache.geronimo.samples.daytrader.util.TradeConfig;
+import org.apache.geronimo.samples.daytrader.persistence.api.AccountDataBean;
+import org.apache.geronimo.samples.daytrader.persistence.api.AccountProfileDataBean;
 
 
-public class AccountProfileDataBean implements java.io.Serializable {
+public class AccountProfileDataBeanImpl implements AccountProfileDataBean, java.io.Serializable {
 
     
     private String userID;              /* userID */
@@ -46,10 +48,10 @@
 //    @Version
 //    private Integer optLock;
 
-    public AccountProfileDataBean() {
+    public AccountProfileDataBeanImpl() {
     }
 
-    public AccountProfileDataBean(String userID,
+    public AccountProfileDataBeanImpl(String userID,
             String password,
             String fullName,
             String address,
@@ -64,7 +66,7 @@
     }
 
     public static AccountProfileDataBean getRandomInstance() {
-        return new AccountProfileDataBean(
+        return new AccountProfileDataBeanImpl(
                 TradeConfig.rndUserID(),                        // userID
                 TradeConfig.rndUserID(),                        // passwd
                 TradeConfig.rndFullName(),                      // fullname
@@ -164,10 +166,10 @@
     @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)) {
+        if (!(object instanceof AccountProfileDataBeanImpl)) {
             return false;
         }
-        AccountProfileDataBean other = (AccountProfileDataBean)object;
+        AccountProfileDataBeanImpl other = (AccountProfileDataBeanImpl)object;
         if (this.userID != other.userID && (this.userID == null || !this.userID.equals(other.userID))) return false;
         return true;
     }

Copied: geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-beans/src/main/java/org/apache/geronimo/samples/daytrader/beans/HoldingDataBeanImpl.java (from r898362, geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-beans/src/main/java/org/apache/geronimo/samples/daytrader/beans/HoldingDataBean.java)
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-beans/src/main/java/org/apache/geronimo/samples/daytrader/beans/HoldingDataBeanImpl.java?p2=geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-beans/src/main/java/org/apache/geronimo/samples/daytrader/beans/HoldingDataBeanImpl.java&p1=geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-beans/src/main/java/org/apache/geronimo/samples/daytrader/beans/HoldingDataBean.java&r1=898362&r2=898859&rev=898859&view=diff
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-beans/src/main/java/org/apache/geronimo/samples/daytrader/beans/HoldingDataBean.java (original)
+++ geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-beans/src/main/java/org/apache/geronimo/samples/daytrader/beans/HoldingDataBeanImpl.java Wed Jan 13 17:51:05 2010
@@ -22,9 +22,12 @@
 
 import org.apache.geronimo.samples.daytrader.util.Log;
 import org.apache.geronimo.samples.daytrader.util.TradeConfig;
+import org.apache.geronimo.samples.daytrader.persistence.api.AccountDataBean;
+import org.apache.geronimo.samples.daytrader.persistence.api.HoldingDataBean;
+import org.apache.geronimo.samples.daytrader.persistence.api.QuoteDataBean;
 
 
-public class HoldingDataBean implements Serializable {
+public class HoldingDataBeanImpl implements HoldingDataBean, Serializable {
 
     /* persistent/relationship fields */
 
@@ -52,10 +55,10 @@
 //    @Version
 //    private Integer optLock;
 
-    public HoldingDataBean() {
+    public HoldingDataBeanImpl() {
     }
 
-    public HoldingDataBean(Integer holdingID,
+    public HoldingDataBeanImpl(Integer holdingID,
             double quantity,
             BigDecimal purchasePrice,
             Date purchaseDate,
@@ -67,7 +70,7 @@
         setQuoteID(quoteID);
     }
 
-    public HoldingDataBean(double quantity,
+    public HoldingDataBeanImpl(double quantity,
             BigDecimal purchasePrice,
             Date purchaseDate,
             AccountDataBean account,
@@ -80,7 +83,7 @@
     }
 
     public static HoldingDataBean getRandomInstance() {
-        return new HoldingDataBean(
+        return new HoldingDataBeanImpl(
                 new Integer(TradeConfig.rndInt(100000)),     //holdingID
                 TradeConfig.rndQuantity(),                     //quantity
                 TradeConfig.rndBigDecimal(1000.0f),             //purchasePrice
@@ -186,10 +189,10 @@
     @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)) {
+        if (!(object instanceof HoldingDataBeanImpl)) {
             return false;
         }
-        HoldingDataBean other = (HoldingDataBean) object;
+        HoldingDataBeanImpl other = (HoldingDataBeanImpl) object;
         if (this.holdingID != other.holdingID && (this.holdingID == null || !this.holdingID.equals(other.holdingID))) return false;
         return true;
     }

Copied: geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-beans/src/main/java/org/apache/geronimo/samples/daytrader/beans/OrderDataBeanImpl.java (from r898362, geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-beans/src/main/java/org/apache/geronimo/samples/daytrader/beans/OrderDataBean.java)
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-beans/src/main/java/org/apache/geronimo/samples/daytrader/beans/OrderDataBeanImpl.java?p2=geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-beans/src/main/java/org/apache/geronimo/samples/daytrader/beans/OrderDataBeanImpl.java&p1=geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-beans/src/main/java/org/apache/geronimo/samples/daytrader/beans/OrderDataBean.java&r1=898362&r2=898859&rev=898859&view=diff
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-beans/src/main/java/org/apache/geronimo/samples/daytrader/beans/OrderDataBean.java (original)
+++ geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-beans/src/main/java/org/apache/geronimo/samples/daytrader/beans/OrderDataBeanImpl.java Wed Jan 13 17:51:05 2010
@@ -22,10 +22,13 @@
 
 import org.apache.geronimo.samples.daytrader.util.Log;
 import org.apache.geronimo.samples.daytrader.util.TradeConfig;
+import org.apache.geronimo.samples.daytrader.persistence.api.AccountDataBean;
+import org.apache.geronimo.samples.daytrader.persistence.api.HoldingDataBean;
+import org.apache.geronimo.samples.daytrader.persistence.api.OrderDataBean;
+import org.apache.geronimo.samples.daytrader.persistence.api.QuoteDataBean;
 
 
-public class OrderDataBean implements Serializable
-{
+public class OrderDataBeanImpl implements OrderDataBean, Serializable {
 
           
     private Integer orderID;            /* orderID */
@@ -62,10 +65,10 @@
 
     private String symbol;
 
-    public OrderDataBean() {        
+    public OrderDataBeanImpl() {        
     }
 
-    public OrderDataBean(Integer orderID,
+    public OrderDataBeanImpl(Integer orderID,
                             String orderType,
                             String orderStatus,
                             Date openDate,
@@ -86,7 +89,7 @@
         setSymbol(symbol);
     }
     
-    public OrderDataBean(String orderType,
+    public OrderDataBeanImpl(String orderType,
             String orderStatus,
             Date openDate,
             Date completionDate,
@@ -108,7 +111,7 @@
     }
 
     public static OrderDataBean getRandomInstance() {
-        return new OrderDataBean(
+        return new OrderDataBeanImpl(
             new Integer(TradeConfig.rndInt(100000)),
             TradeConfig.rndBoolean() ? "buy" : "sell",
             "open",
@@ -312,10 +315,10 @@
     @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)) {
+        if (!(object instanceof OrderDataBeanImpl)) {
             return false;
         }
-        OrderDataBean other = (OrderDataBean)object;
+        OrderDataBeanImpl other = (OrderDataBeanImpl)object;
         if (this.orderID != other.orderID && (this.orderID == null || !this.orderID.equals(other.orderID))) return false;
         return true;
     }

Copied: geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-beans/src/main/java/org/apache/geronimo/samples/daytrader/beans/QuoteDataBeanImpl.java (from r898362, geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-beans/src/main/java/org/apache/geronimo/samples/daytrader/beans/QuoteDataBean.java)
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-beans/src/main/java/org/apache/geronimo/samples/daytrader/beans/QuoteDataBeanImpl.java?p2=geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-beans/src/main/java/org/apache/geronimo/samples/daytrader/beans/QuoteDataBeanImpl.java&p1=geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-beans/src/main/java/org/apache/geronimo/samples/daytrader/beans/QuoteDataBean.java&r1=898362&r2=898859&rev=898859&view=diff
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-beans/src/main/java/org/apache/geronimo/samples/daytrader/beans/QuoteDataBean.java (original)
+++ geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-beans/src/main/java/org/apache/geronimo/samples/daytrader/beans/QuoteDataBeanImpl.java Wed Jan 13 17:51:05 2010
@@ -22,9 +22,10 @@
 
 import org.apache.geronimo.samples.daytrader.util.Log;
 import org.apache.geronimo.samples.daytrader.util.TradeConfig;
+import org.apache.geronimo.samples.daytrader.persistence.api.QuoteDataBean;
 
 
-public class QuoteDataBean implements Serializable {
+public class QuoteDataBeanImpl implements QuoteDataBean, Serializable {
     
     private String symbol;          /* symbol */
     
@@ -51,10 +52,10 @@
     
     
     
-    public QuoteDataBean() {
+    public QuoteDataBeanImpl() {
     }
 
-    public QuoteDataBean(String symbol, String companyName, double volume,
+    public QuoteDataBeanImpl(String symbol, String companyName, double volume,
             BigDecimal price, BigDecimal open, BigDecimal low,
             BigDecimal high, double change) {
         setSymbol(symbol);
@@ -68,7 +69,7 @@
     }
 
     public static QuoteDataBean getRandomInstance() {
-        return new QuoteDataBean(
+        return new QuoteDataBeanImpl(
                 TradeConfig.rndSymbol(),                 //symbol
                 TradeConfig.rndSymbol() + " Incorporated",         //Company Name
                 TradeConfig.rndFloat(100000),            //volume
@@ -80,8 +81,8 @@
         );
     }
 
-    //Create a "zero" value quoteDataBean for the given symbol
-    public QuoteDataBean(String symbol) {
+    //Create a "zero" value QuoteDataBeanImpl for the given symbol
+    public QuoteDataBeanImpl(String symbol) {
         setSymbol(symbol);
     }
 
@@ -187,10 +188,10 @@
     @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)) {
+        if (!(object instanceof QuoteDataBeanImpl)) {
             return false;
         }
-        QuoteDataBean other = (QuoteDataBean)object;
+        QuoteDataBeanImpl other = (QuoteDataBeanImpl)object;
         if (this.symbol != other.symbol && (this.symbol == null || !this.symbol.equals(other.symbol))) return false;
         return true;
     }

Modified: geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-core/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-core/pom.xml?rev=898859&r1=898858&r2=898859&view=diff
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-core/pom.xml (original)
+++ geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-core/pom.xml Wed Jan 13 17:51:05 2010
@@ -39,6 +39,13 @@
         </dependency>
         <dependency>
             <groupId>org.apache.geronimo.daytrader.modules</groupId>
+            <artifactId>daytrader-api</artifactId>
+            <version>${pom.version}</version>
+            <scope>provided</scope>
+        </dependency>
+<!--
+        <dependency>
+            <groupId>org.apache.geronimo.daytrader.modules</groupId>
             <artifactId>daytrader-entities</artifactId>
             <version>${pom.version}</version>
             <scope>provided</scope>
@@ -49,6 +56,7 @@
             <version>${pom.version}</version>
             <scope>provided</scope>
         </dependency>
+-->
     </dependencies>
 
     <build>
@@ -67,11 +75,12 @@
                         <Bundle-SymbolicName>${pom.groupId}.${pom.artifactId}</Bundle-SymbolicName>
                         <Bundle-Version>${pom.version}</Bundle-Version>
                         <Export-Package>
-                            <!--org.apache.geronimo.samples.daytrader.core.spi;version=1.0.0-->
+                            <!--org.apache.geronimo.samples.daytrader.core;version=1.0.0-->
                         </Export-Package>
                         <Import-Package>
                             org.apache.geronimo.samples.daytrader.api;version=1.0,
-                            org.apache.geronimo.samples.daytrader.beans;version=1.0,
+                            <!--org.apache.geronimo.samples.daytrader.beans;version=1.0,-->
+                            org.apache.geronimo.samples.daytrader.persistence.api;version=1.0,
                             org.apache.geronimo.samples.daytrader.util;version=1.0,
                             javax.naming,
                             javax.sql

Modified: geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-core/src/main/java/org/apache/geronimo/samples/daytrader/core/TradeDBManagerImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-core/src/main/java/org/apache/geronimo/samples/daytrader/core/TradeDBManagerImpl.java?rev=898859&r1=898858&r2=898859&view=diff
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-core/src/main/java/org/apache/geronimo/samples/daytrader/core/TradeDBManagerImpl.java (original)
+++ geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-core/src/main/java/org/apache/geronimo/samples/daytrader/core/TradeDBManagerImpl.java Wed Jan 13 17:51:05 2010
@@ -20,7 +20,7 @@
 
 import javax.sql.DataSource;
 
-import org.apache.geronimo.samples.daytrader.beans.RunStatsDataBean;
+import org.apache.geronimo.samples.daytrader.persistence.api.RunStatsDataBean;
 import org.apache.geronimo.samples.daytrader.util.Log;
 import org.apache.geronimo.samples.daytrader.util.MDBStats;
 import org.apache.geronimo.samples.daytrader.util.TradeConfig;

Modified: geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-core/src/main/java/org/apache/geronimo/samples/daytrader/core/TradeServicesManagerImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-core/src/main/java/org/apache/geronimo/samples/daytrader/core/TradeServicesManagerImpl.java?rev=898859&r1=898858&r2=898859&view=diff
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-core/src/main/java/org/apache/geronimo/samples/daytrader/core/TradeServicesManagerImpl.java (original)
+++ geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-core/src/main/java/org/apache/geronimo/samples/daytrader/core/TradeServicesManagerImpl.java Wed Jan 13 17:51:05 2010
@@ -21,7 +21,7 @@
 import java.util.List;
 import java.util.Map;
 
-import org.apache.geronimo.samples.daytrader.beans.MarketSummaryDataBean;
+import org.apache.geronimo.samples.daytrader.persistence.api.MarketSummaryDataBean;
 import org.apache.geronimo.samples.daytrader.util.Log;
 import org.apache.geronimo.samples.daytrader.util.TradeConfig;
 import org.apache.geronimo.samples.daytrader.api.TradeServicesManager;
@@ -54,7 +54,8 @@
     // This lock is used to serialize market summary operations.
     private static final Integer marketSummaryLock = new Integer(0);
     private static long nextMarketSummary = System.currentTimeMillis();
-    private static MarketSummaryDataBean cachedMSDB = MarketSummaryDataBean.getRandomInstance();
+//    private static MarketSummaryDataBean cachedMSDB = MarketSummaryDataBean.getRandomInstance();
+    private static MarketSummaryDataBean cachedMSDB = null; 
     
     /**
       * TradeServicesManagerImpl null constructor

Modified: geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-entities/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-entities/pom.xml?rev=898859&r1=898858&r2=898859&view=diff
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-entities/pom.xml (original)
+++ geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-entities/pom.xml Wed Jan 13 17:51:05 2010
@@ -33,6 +33,12 @@
     <dependencies>
         <dependency>
             <groupId>org.apache.geronimo.daytrader.modules</groupId>
+            <artifactId>daytrader-api</artifactId>
+            <version>${pom.version}</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.daytrader.modules</groupId>
             <artifactId>daytrader-util</artifactId>
             <version>${pom.version}</version>
             <scope>provided</scope>
@@ -127,6 +133,7 @@
                         <Import-Package>
                             org.apache.geronimo.samples.daytrader.beans;version=1.0,
                             org.apache.geronimo.samples.daytrader.util;version=1.0,
+                            org.apache.geronimo.samples.daytrader.persistence.api;version=1.0,
                             org.apache.openjpa.enhance;version=1.3.0,
                             org.apache.openjpa.util;version=1.3.0,
                             javax.persistence;version=1.0.0

Copied: geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/AccountDataBeanImpl.java (from r898362, geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/AccountDataBean.java)
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/AccountDataBeanImpl.java?p2=geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/AccountDataBeanImpl.java&p1=geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/AccountDataBean.java&r1=898362&r2=898859&rev=898859&view=diff
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/AccountDataBean.java (original)
+++ geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/AccountDataBeanImpl.java Wed Jan 13 17:51:05 2010
@@ -41,6 +41,10 @@
 
 import org.apache.geronimo.samples.daytrader.util.Log;
 import org.apache.geronimo.samples.daytrader.util.TradeConfig;
+import org.apache.geronimo.samples.daytrader.persistence.api.AccountDataBean;
+import org.apache.geronimo.samples.daytrader.persistence.api.AccountProfileDataBean;
+import org.apache.geronimo.samples.daytrader.persistence.api.HoldingDataBean;
+import org.apache.geronimo.samples.daytrader.persistence.api.OrderDataBean;
 
 @Entity (name = "accountejb")
 @Table(name = "accountejb")
@@ -55,7 +59,7 @@
         @NamedQuery(name = "accountejb.findByLastlogin", query = "SELECT a FROM accountejb a WHERE a.lastLogin = :lastlogin"),
         @NamedQuery(name = "accountejb.findByLogincount", query = "SELECT a FROM accountejb a WHERE a.loginCount = :logincount")
     })
-public class AccountDataBean implements Serializable {
+public class AccountDataBeanImpl implements AccountDataBean, Serializable {
 	
 	/* Accessor methods for persistent fields */
     @TableGenerator(
@@ -108,10 +112,10 @@
     @Transient
     private String profileID;
 
-    public AccountDataBean() {
+    public AccountDataBeanImpl() {
     }
 
-    public AccountDataBean(Integer accountID,
+    public AccountDataBeanImpl(Integer accountID,
             int loginCount,
             int logoutCount,
             Date lastLogin,
@@ -129,7 +133,7 @@
         setProfileID(profileID);
     }
 
-    public AccountDataBean(int loginCount,
+    public AccountDataBeanImpl(int loginCount,
             int logoutCount,
             Date lastLogin,
             Date creationDate,
@@ -146,7 +150,7 @@
     }
 
     public static AccountDataBean getRandomInstance() {
-        return new AccountDataBean(new Integer(TradeConfig.rndInt(100000)), //accountID
+        return new AccountDataBeanImpl(new Integer(TradeConfig.rndInt(100000)), //accountID
                 TradeConfig.rndInt(10000), //loginCount
                 TradeConfig.rndInt(10000), //logoutCount
                 new java.util.Date(), //lastLogin
@@ -307,10 +311,10 @@
     @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)) {
+        if (!(object instanceof AccountDataBeanImpl)) {
             return false;
         }
-        AccountDataBean other = (AccountDataBean)object;
+        AccountDataBeanImpl other = (AccountDataBeanImpl)object;
         if (this.accountID != other.accountID && (this.accountID == null || !this.accountID.equals(other.accountID))) return false;
         return true;
     }

Copied: geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/AccountProfileDataBeanImpl.java (from r898362, geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/AccountProfileDataBean.java)
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/AccountProfileDataBeanImpl.java?p2=geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/AccountProfileDataBeanImpl.java&p1=geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/AccountProfileDataBean.java&r1=898362&r2=898859&rev=898859&view=diff
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/AccountProfileDataBean.java (original)
+++ geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/AccountProfileDataBeanImpl.java Wed Jan 13 17:51:05 2010
@@ -27,6 +27,8 @@
 
 import org.apache.geronimo.samples.daytrader.util.Log;
 import org.apache.geronimo.samples.daytrader.util.TradeConfig;
+import org.apache.geronimo.samples.daytrader.persistence.api.AccountDataBean;
+import org.apache.geronimo.samples.daytrader.persistence.api.AccountProfileDataBean;
 
 @Entity(name = "accountprofileejb")
 @Table(name =  "accountprofileejb")
@@ -38,7 +40,7 @@
         @NamedQuery(name = "accountprofileejb.findByCreditcard", query = "SELECT a FROM accountprofileejb a WHERE a.creditCard = :creditcard"),
         @NamedQuery(name = "accountprofileejb.findByFullname", query = "SELECT a FROM accountprofileejb a WHERE a.fullName = :fullname")
     })
-public class AccountProfileDataBean implements java.io.Serializable {
+public class AccountProfileDataBeanImpl implements AccountProfileDataBean, java.io.Serializable {
 
 	@Id
     @Column(name = "USERID", nullable = false)
@@ -66,10 +68,10 @@
 //    @Version
 //    private Integer optLock;
 
-    public AccountProfileDataBean() {
+    public AccountProfileDataBeanImpl() {
     }
 
-    public AccountProfileDataBean(String userID,
+    public AccountProfileDataBeanImpl(String userID,
             String password,
             String fullName,
             String address,
@@ -84,7 +86,7 @@
     }
 
     public static AccountProfileDataBean getRandomInstance() {
-        return new AccountProfileDataBean(
+        return new AccountProfileDataBeanImpl(
                 TradeConfig.rndUserID(),                        // userID
                 TradeConfig.rndUserID(),                        // passwd
                 TradeConfig.rndFullName(),                      // fullname
@@ -184,10 +186,10 @@
     @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)) {
+        if (!(object instanceof AccountProfileDataBeanImpl)) {
             return false;
         }
-        AccountProfileDataBean other = (AccountProfileDataBean)object;
+        AccountProfileDataBeanImpl other = (AccountProfileDataBeanImpl)object;
         if (this.userID != other.userID && (this.userID == null || !this.userID.equals(other.userID))) return false;
         return true;
     }

Copied: geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/HoldingDataBeanImpl.java (from r898362, geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/HoldingDataBean.java)
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/HoldingDataBeanImpl.java?p2=geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/HoldingDataBeanImpl.java&p1=geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/HoldingDataBean.java&r1=898362&r2=898859&rev=898859&view=diff
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/HoldingDataBean.java (original)
+++ geronimo/sandbox/jbohn/daytrader-bp-new/modules/daytrader-entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/HoldingDataBeanImpl.java Wed Jan 13 17:51:05 2010
@@ -36,6 +36,9 @@
 
 import org.apache.geronimo.samples.daytrader.util.Log;
 import org.apache.geronimo.samples.daytrader.util.TradeConfig;
+import org.apache.geronimo.samples.daytrader.persistence.api.AccountDataBean;
+import org.apache.geronimo.samples.daytrader.persistence.api.HoldingDataBean;
+import org.apache.geronimo.samples.daytrader.persistence.api.QuoteDataBean;
 
 @Entity(name = "holdingejb")
 @Table(name = "holdingejb")
@@ -45,7 +48,7 @@
 		@NamedQuery(name = "holdingejb.findByQuantity", query = "SELECT h FROM holdingejb h WHERE h.quantity = :quantity"),
 		@NamedQuery(name = "holdingejb.findByPurchasedate", query = "SELECT h FROM holdingejb h WHERE h.purchaseDate = :purchasedate"),
 		@NamedQuery(name = "holdingejb.holdingsByUserID", query = "SELECT h FROM holdingejb h where h.account.profile.userID = :userID") })
-public class HoldingDataBean implements Serializable {
+public class HoldingDataBeanImpl implements HoldingDataBean, Serializable {
 
 	/* persistent/relationship fields */
 
@@ -76,10 +79,10 @@
 	// @Version
 	// private Integer optLock;
 
-	public HoldingDataBean() {
+	public HoldingDataBeanImpl() {
 	}
 
-	public HoldingDataBean(Integer holdingID, double quantity,
+	public HoldingDataBeanImpl(Integer holdingID, double quantity,
 			BigDecimal purchasePrice, Date purchaseDate, String quoteID) {
 		setHoldingID(holdingID);
 		setQuantity(quantity);
@@ -88,7 +91,7 @@
 		setQuoteID(quoteID);
 	}
 
-	public HoldingDataBean(double quantity, BigDecimal purchasePrice,
+	public HoldingDataBeanImpl(double quantity, BigDecimal purchasePrice,
 			Date purchaseDate, AccountDataBean account, QuoteDataBean quote) {
 		setQuantity(quantity);
 		setPurchasePrice(purchasePrice);
@@ -98,7 +101,7 @@
 	}
 
 	public static HoldingDataBean getRandomInstance() {
-		return new HoldingDataBean(new Integer(TradeConfig.rndInt(100000)), // holdingID
+		return new HoldingDataBeanImpl(new Integer(TradeConfig.rndInt(100000)), // holdingID
 				TradeConfig.rndQuantity(), // quantity
 				TradeConfig.rndBigDecimal(1000.0f), // purchasePrice
 				new java.util.Date(TradeConfig.rndInt(Integer.MAX_VALUE)), // purchaseDate
@@ -200,10 +203,10 @@
 	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)) {
+		if (!(object instanceof HoldingDataBeanImpl)) {
 			return false;
 		}
-		HoldingDataBean other = (HoldingDataBean) object;
+		HoldingDataBeanImpl other = (HoldingDataBeanImpl) object;
 		if (this.holdingID != other.holdingID
 				&& (this.holdingID == null || !this.holdingID
 						.equals(other.holdingID)))



Mime
View raw message