geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jb...@apache.org
Subject svn commit: r831089 [2/2] - in /geronimo/sandbox/jbohn/daytrader-bp: assemblies/web/daytrader-web-jdbc/ assemblies/web/daytrader-web-jdbc/src/main/webapp/WEB-INF/ modules/ modules/core/ modules/core/src/main/java/org/apache/geronimo/samples/daytrader/c...
Date Thu, 29 Oct 2009 21:11:33 GMT
Added: geronimo/sandbox/jbohn/daytrader-bp/modules/entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/AccountProfileDataBean.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp/modules/entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/AccountProfileDataBean.java?rev=831089&view=auto
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp/modules/entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/AccountProfileDataBean.java (added)
+++ geronimo/sandbox/jbohn/daytrader-bp/modules/entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/AccountProfileDataBean.java Thu Oct 29 21:11:32 2009
@@ -0,0 +1,194 @@
+/**
+ *  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.beans;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.FetchType;
+import javax.persistence.Id;
+import javax.persistence.NamedQueries;
+import javax.persistence.NamedQuery;
+import javax.persistence.OneToOne;
+import javax.persistence.Table;
+
+import org.apache.geronimo.samples.daytrader.util.Log;
+import org.apache.geronimo.samples.daytrader.util.TradeConfig;
+
+@Entity(name = "accountprofileejb")
+@Table(name =  "accountprofileejb")
+@NamedQueries( {
+        @NamedQuery(name = "accountprofileejb.findByAddress", query = "SELECT a FROM accountprofileejb a WHERE a.address = :address"),
+        @NamedQuery(name = "accountprofileejb.findByPasswd", query = "SELECT a FROM accountprofileejb a WHERE a.passwd = :passwd"),
+        @NamedQuery(name = "accountprofileejb.findByUserid", query = "SELECT a FROM accountprofileejb a WHERE a.userID = :userid"),
+        @NamedQuery(name = "accountprofileejb.findByEmail", query = "SELECT a FROM accountprofileejb a WHERE a.email = :email"),
+        @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 {
+
+	@Id
+    @Column(name = "USERID", nullable = false)
+    private String userID;              /* userID */
+    
+	@Column(name = "PASSWD")
+    private String passwd;              /* password */
+    
+	@Column(name = "FULLNAME")
+    private String fullName;            /* fullName */
+    
+	@Column(name = "ADDRESS")
+    private String address;             /* address */
+    
+	@Column(name = "email")
+    private String email;               /* email */
+    
+	@Column(name = "creditcard")
+	//why was it credit?
+    private String creditCard;          /* creditCard */
+    
+	@OneToOne(mappedBy="profile", fetch=FetchType.LAZY)
+    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/sandbox/jbohn/daytrader-bp/modules/entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/AccountProfileDataBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

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

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

Added: geronimo/sandbox/jbohn/daytrader-bp/modules/entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/HoldingDataBean.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp/modules/entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/HoldingDataBean.java?rev=831089&view=auto
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp/modules/entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/HoldingDataBean.java (added)
+++ geronimo/sandbox/jbohn/daytrader-bp/modules/entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/HoldingDataBean.java Thu Oct 29 21:11:32 2009
@@ -0,0 +1,213 @@
+/**
+ *  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.beans;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.FetchType;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.NamedQueries;
+import javax.persistence.NamedQuery;
+import javax.persistence.Table;
+import javax.persistence.TableGenerator;
+import javax.persistence.Transient;
+
+import org.apache.geronimo.samples.daytrader.util.Log;
+import org.apache.geronimo.samples.daytrader.util.TradeConfig;
+
+@Entity(name = "holdingejb")
+@Table(name = "holdingejb")
+@NamedQueries( {
+		@NamedQuery(name = "holdingejb.findByPurchaseprice", query = "SELECT h FROM holdingejb h WHERE h.purchasePrice = :purchaseprice"),
+		@NamedQuery(name = "holdingejb.findByHoldingid", query = "SELECT h FROM holdingejb h WHERE h.holdingID = :holdingid"),
+		@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 {
+
+	/* persistent/relationship fields */
+
+	@TableGenerator(name = "holdingIdGen", table = "KEYGENEJB", pkColumnName = "KEYNAME", valueColumnName = "KEYVAL", pkColumnValue = "holding", allocationSize = 1000)
+	@Id
+	@GeneratedValue(strategy = GenerationType.TABLE, generator = "holdingIdGen")
+	@Column(name = "HOLDINGID", nullable = false)
+	private Integer holdingID; /* holdingID */
+
+	@Column(name = "QUANTITY", nullable = false)
+	private double quantity; /* quantity */
+
+	@Column(name = "PURCHASEPRICE")
+	private BigDecimal purchasePrice; /* purchasePrice */
+
+	@Column(name = "PURCHASEDATE")
+	private Date purchaseDate; /* purchaseDate */
+	@Transient
+	private String quoteID; /* Holding() ---> Quote(1) */
+
+	@ManyToOne(fetch = FetchType.LAZY)
+	@JoinColumn(name = "ACCOUNT_ACCOUNTID")
+	private AccountDataBean account;
+	@ManyToOne(fetch = FetchType.EAGER)
+	@JoinColumn(name = "QUOTE_SYMBOL")
+	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/sandbox/jbohn/daytrader-bp/modules/entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/HoldingDataBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

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

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

Added: geronimo/sandbox/jbohn/daytrader-bp/modules/entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/OrderDataBean.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp/modules/entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/OrderDataBean.java?rev=831089&view=auto
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp/modules/entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/OrderDataBean.java (added)
+++ geronimo/sandbox/jbohn/daytrader-bp/modules/entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/OrderDataBean.java Thu Oct 29 21:11:32 2009
@@ -0,0 +1,340 @@
+/**
+ *  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.beans;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.FetchType;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.NamedQueries;
+import javax.persistence.NamedQuery;
+import javax.persistence.OneToOne;
+import javax.persistence.Table;
+import javax.persistence.TableGenerator;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
+import javax.persistence.Transient;
+
+import org.apache.geronimo.samples.daytrader.util.Log;
+import org.apache.geronimo.samples.daytrader.util.TradeConfig;
+
+@Entity(name = "orderejb")
+@Table(name = "orderejb")
+@NamedQueries( {
+    @NamedQuery(name = "orderejb.findByOrderfee", query = "SELECT o FROM orderejb o WHERE o.orderFee = :orderfee"),
+    @NamedQuery(name = "orderejb.findByCompletiondate", query = "SELECT o FROM orderejb o WHERE o.completionDate = :completiondate"),
+    @NamedQuery(name = "orderejb.findByOrdertype", query = "SELECT o FROM orderejb o WHERE o.orderType = :ordertype"),
+    @NamedQuery(name = "orderejb.findByOrderstatus", query = "SELECT o FROM orderejb o WHERE o.orderStatus = :orderstatus"),
+    @NamedQuery(name = "orderejb.findByPrice", query = "SELECT o FROM orderejb o WHERE o.price = :price"),
+    @NamedQuery(name = "orderejb.findByQuantity", query = "SELECT o FROM orderejb o WHERE o.quantity = :quantity"),
+    @NamedQuery(name = "orderejb.findByOpendate", query = "SELECT o FROM orderejb o WHERE o.openDate = :opendate"),
+    @NamedQuery(name = "orderejb.findByOrderid", query = "SELECT o FROM orderejb o WHERE o.orderID = :orderid"),
+    @NamedQuery(name = "orderejb.findByAccountAccountid", query = "SELECT o FROM orderejb o WHERE o.account.accountID = :accountAccountid"),
+    @NamedQuery(name = "orderejb.findByQuoteSymbol", query = "SELECT o FROM orderejb o WHERE o.quote.symbol = :quoteSymbol"),
+    @NamedQuery(name = "orderejb.findByHoldingHoldingid", query = "SELECT o FROM orderejb o WHERE o.holding.holdingID = :holdingHoldingid"),
+    @NamedQuery(name = "orderejb.closedOrders", query = "SELECT o FROM orderejb o WHERE o.orderStatus = 'closed' AND o.account.profile.userID  = :userID"),
+    @NamedQuery(name = "orderejb.completeClosedOrders", query = "UPDATE orderejb o SET o.orderStatus = 'completed' WHERE o.orderStatus = 'closed' AND o.account.profile.userID  = :userID")
+})
+
+public class OrderDataBean implements Serializable {
+
+	@TableGenerator(name = "orderIdGen", table = "KEYGENEJB", pkColumnName = "KEYNAME", valueColumnName = "KEYVAL", pkColumnValue = "order", allocationSize = 1000)
+	@Id
+	@GeneratedValue(strategy = GenerationType.TABLE, generator = "orderIdGen")
+	@Column(name = "ORDERID", nullable = false)
+	private Integer orderID; /* orderID */
+
+	@Column(name = "ORDERTYPE")
+	private String orderType; /* orderType (buy, sell, etc.) */
+
+	@Column(name = "ORDERSTATUS")
+	private String orderStatus; /*
+								 * orderStatus (open, processing, completed,
+								 * closed, cancelled)
+								 */
+	@Column(name = "OPENDATE")
+	@Temporal(TemporalType.TIMESTAMP)
+	private Date openDate; /* openDate (when the order was entered) */
+
+	@Column(name = "COMPLETIONDATE")
+    @Temporal(TemporalType.TIMESTAMP)
+	private Date completionDate; /* completionDate */
+
+	@Column(name = "QUANTITY", nullable = false)
+    	private double quantity; /* quantity */
+
+	@Column(name = "PRICE")
+    private BigDecimal price; /* price */
+
+	@Column(name = "ORDERFEE")
+    private BigDecimal orderFee; /* price */
+
+	@ManyToOne(fetch = FetchType.LAZY)
+	@JoinColumn(name="ACCOUNT_ACCOUNTID")
+    private AccountDataBean account;
+
+	@ManyToOne(fetch = FetchType.EAGER)
+	@JoinColumn(name = "QUOTE_SYMBOL")
+    private QuoteDataBean quote;
+
+	@OneToOne(fetch = FetchType.LAZY)
+	@JoinColumn(name = "HOLDING_HOLDINGID")
+    private HoldingDataBean holding;
+	
+
+	 @Transient
+	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/sandbox/jbohn/daytrader-bp/modules/entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/OrderDataBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

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

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

Added: geronimo/sandbox/jbohn/daytrader-bp/modules/entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/QuoteDataBean.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp/modules/entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/QuoteDataBean.java?rev=831089&view=auto
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp/modules/entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/QuoteDataBean.java (added)
+++ geronimo/sandbox/jbohn/daytrader-bp/modules/entities/src/main/java/org/apache/geronimo/samples/daytrader/beans/QuoteDataBean.java Thu Oct 29 21:11:32 2009
@@ -0,0 +1,229 @@
+/**
+ *  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.beans;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.NamedNativeQueries;
+import javax.persistence.NamedNativeQuery;
+import javax.persistence.NamedQueries;
+import javax.persistence.NamedQuery;
+import javax.persistence.Table;
+
+import org.apache.geronimo.samples.daytrader.util.Log;
+import org.apache.geronimo.samples.daytrader.util.TradeConfig;
+//gerome
+@Entity(name = "quoteejb")
+@Table(name = "quoteejb")
+@NamedQueries({
+    @NamedQuery(name = "quoteejb.allQuotes",query = "SELECT q FROM quoteejb q"),
+    @NamedQuery(name = "quoteejb.quotesByChange",query = "SELECT q FROM quoteejb q WHERE q.symbol LIKE 's:1__' ORDER BY q.change1 DESC"),
+    @NamedQuery(name = "quoteejb.findByLow", query = "SELECT q FROM quoteejb q WHERE q.low = :low"),
+    @NamedQuery(name = "quoteejb.findByOpen1", query = "SELECT q FROM quoteejb q WHERE q.open1 = :open1"),
+    @NamedQuery(name = "quoteejb.findByVolume", query = "SELECT q FROM quoteejb q WHERE q.volume = :volume"),
+    @NamedQuery(name = "quoteejb.findByPrice", query = "SELECT q FROM quoteejb q WHERE q.price = :price"),
+    @NamedQuery(name = "quoteejb.findByHigh", query = "SELECT q FROM quoteejb q WHERE q.high = :high"),
+    @NamedQuery(name = "quoteejb.findByCompanyname", query = "SELECT q FROM quoteejb q WHERE q.companyName = :companyname"),
+    @NamedQuery(name = "quoteejb.findBySymbol", query = "SELECT q FROM quoteejb q WHERE q.symbol = :symbol"),
+    @NamedQuery(name = "quoteejb.findByChange1", query = "SELECT q FROM quoteejb q WHERE q.change1 = :change1")
+})
+@NamedNativeQueries({
+    @NamedNativeQuery(name="quoteejb.quoteForUpdate", query="select * from quoteejb q where q.symbol=? for update",resultClass=org.apache.geronimo.samples.daytrader.beans.QuoteDataBean.class)
+})
+
+public class QuoteDataBean implements Serializable {
+    
+    /**
+	 * 
+	 */
+	private static final long serialVersionUID = 8476917690278143517L;
+	
+	@Id
+    @Column(name = "SYMBOL", nullable = false)
+	private String symbol;          /* symbol */
+    
+	@Column(name = "COMPANYNAME")
+    private String companyName;     /* companyName */
+    
+	@Column(name = "VOLUME", nullable = false)
+    private double volume;          /* volume */
+    
+	@Column(name = "PRICE")
+    private BigDecimal price;       /* price */
+    
+	@Column(name = "OPEN1")
+    private BigDecimal open1;       /* open1 price */
+    
+	@Column(name = "LOW")
+    private BigDecimal low;         /* low price */
+    
+	@Column(name = "HIGH")
+    private BigDecimal high;        /* high price */
+    
+	@Column(name = "CHANGE1", nullable = false)
+    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;
+    }
+}

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

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

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

Added: geronimo/sandbox/jbohn/daytrader-bp/modules/entities/src/main/resources/META-INF/LICENSE
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp/modules/entities/src/main/resources/META-INF/LICENSE?rev=831089&view=auto
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp/modules/entities/src/main/resources/META-INF/LICENSE (added)
+++ geronimo/sandbox/jbohn/daytrader-bp/modules/entities/src/main/resources/META-INF/LICENSE Thu Oct 29 21:11:32 2009
@@ -0,0 +1,203 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed 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.
+

Added: geronimo/sandbox/jbohn/daytrader-bp/modules/entities/src/main/resources/META-INF/NOTICE
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp/modules/entities/src/main/resources/META-INF/NOTICE?rev=831089&view=auto
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp/modules/entities/src/main/resources/META-INF/NOTICE (added)
+++ geronimo/sandbox/jbohn/daytrader-bp/modules/entities/src/main/resources/META-INF/NOTICE Thu Oct 29 21:11:32 2009
@@ -0,0 +1,9 @@
+Apache Geronimo 
+Copyright 2003-2009 The Apache Software Foundation
+
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
+
+Portions of this software were developed at IBM and donated to the 
+ASF under the Apache 2.0 license.  The former work was referred to 
+as Trade 6.

Added: geronimo/sandbox/jbohn/daytrader-bp/modules/entities/src/main/resources/META-INF/persistence.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp/modules/entities/src/main/resources/META-INF/persistence.xml?rev=831089&view=auto
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp/modules/entities/src/main/resources/META-INF/persistence.xml (added)
+++ geronimo/sandbox/jbohn/daytrader-bp/modules/entities/src/main/resources/META-INF/persistence.xml Thu Oct 29 21:11:32 2009
@@ -0,0 +1,52 @@
+<?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.
+-->
+<persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0">
+
+    <persistence-unit transaction-type="RESOURCE_LOCAL" name="daytrader">
+        <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
+          <jta-data-source>javax.sql.DataSource/(osgi.jndi.serviceName=jdbc/TradeDataSource)</jta-data-source> 
+          <non-jta-data-source>javax.sql.DataSource/(osgi.jndi.serviceName=jdbc/NoTxTradeDataSource)</non-jta-data-source> 
+         
+        <class>org.apache.geronimo.samples.daytrader.beans.AccountDataBean</class>
+        <class>org.apache.geronimo.samples.daytrader.beans.AccountProfileDataBean</class>
+        <class>org.apache.geronimo.samples.daytrader.beans.HoldingDataBean</class>
+        <class>org.apache.geronimo.samples.daytrader.beans.OrderDataBean</class>
+        <class>org.apache.geronimo.samples.daytrader.beans.QuoteDataBean</class>
+        <exclude-unlisted-classes>true</exclude-unlisted-classes>
+       
+        <properties>
+            <property name="openjpa.jdbc.DBDictionary" value="derby" />
+            <property name="openjpa.BrokerImpl" value="non-finalizing" /> 
+            <property name="openjpa.Sequence" value="table(Table=OPENJPASEQ, Increment=100)"/>
+            <property name="openjpa.jdbc.UpdateManager" value="com.ibm.ws.persistence.jdbc.kernel.OperationOrderUpdateManager(batchLimit=0)" /> 
+        </properties>
+        
+        
+        <!-- 
+        <properties>
+        <property name="openjpa.ConnectionProperties" value="DriverClassName=com.ibm.db2.jcc.DB2Driver,URL=jdbc:db2://9.12.24.171:50000/TRADE61,MaxActive=50,MaxWait=10000,Username=db2inst1,Password=db2inst1"/>
+        <property name="openjpa.ConnectionDriverName" value="org.apache.commons.dbcp.BasicDataSource"/>
+        <property name="openjpa.jdbc.DBDictionary" value="db2(batchLimit=600)"/>
+        <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema"/>
+        <property name="openjpa.Multithreaded" value="true"/>
+        <property name="openjpa.Compatibility" value="flushBeforeDetach=false"/>
+        <property name="openjpa.jdbc.UpdateManager" value="org.apache.openjpa.jdbc.kernel.BatchingConstraintUpdateManager"/>
+      </properties>
+      -->
+    </persistence-unit>
+</persistence>

Propchange: geronimo/sandbox/jbohn/daytrader-bp/modules/entities/src/main/resources/META-INF/persistence.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/jbohn/daytrader-bp/modules/entities/src/main/resources/META-INF/persistence.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/jbohn/daytrader-bp/modules/entities/src/main/resources/META-INF/persistence.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: geronimo/sandbox/jbohn/daytrader-bp/modules/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp/modules/pom.xml?rev=831089&r1=831088&r2=831089&view=diff
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp/modules/pom.xml (original)
+++ geronimo/sandbox/jbohn/daytrader-bp/modules/pom.xml Thu Oct 29 21:11:32 2009
@@ -33,6 +33,7 @@
     <modules>
         <module>util</module>
         <module>beans</module>
+        <module>entities</module>
         <module>core</module>
         <module>web</module>
     </modules>

Modified: geronimo/sandbox/jbohn/daytrader-bp/modules/util/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp/modules/util/pom.xml?rev=831089&r1=831088&r2=831089&view=diff
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp/modules/util/pom.xml (original)
+++ geronimo/sandbox/jbohn/daytrader-bp/modules/util/pom.xml Thu Oct 29 21:11:32 2009
@@ -75,7 +75,8 @@
                             org.apache.avalon.framework.logger;resolution:=optional,
                             org.apache.log;resolution:=optional,
                             org.apache.log4j;resolution:=optional,
-                            *
+                            <!--*-->
+                            javax.naming
                         </Import-Package>
                     </instructions>
                 </configuration>

Modified: geronimo/sandbox/jbohn/daytrader-bp/modules/util/src/main/java/org/apache/geronimo/samples/daytrader/util/ServiceUtilities.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp/modules/util/src/main/java/org/apache/geronimo/samples/daytrader/util/ServiceUtilities.java?rev=831089&r1=831088&r2=831089&view=diff
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp/modules/util/src/main/java/org/apache/geronimo/samples/daytrader/util/ServiceUtilities.java (original)
+++ geronimo/sandbox/jbohn/daytrader-bp/modules/util/src/main/java/org/apache/geronimo/samples/daytrader/util/ServiceUtilities.java Thu Oct 29 21:11:32 2009
@@ -26,7 +26,7 @@
  */
 public class ServiceUtilities {
 
-    private static String prefix = "osgi:services/";
+    private static String prefix = "aries:services/";
 
 
     /**

Modified: geronimo/sandbox/jbohn/daytrader-bp/modules/web/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jbohn/daytrader-bp/modules/web/pom.xml?rev=831089&r1=831088&r2=831089&view=diff
==============================================================================
--- geronimo/sandbox/jbohn/daytrader-bp/modules/web/pom.xml (original)
+++ geronimo/sandbox/jbohn/daytrader-bp/modules/web/pom.xml Thu Oct 29 21:11:32 2009
@@ -78,7 +78,7 @@
 -->
         <dependency>
             <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-jpa_3.0_spec</artifactId>
+            <artifactId>geronimo-jpa_1.0_spec</artifactId>
             <scope>provided</scope>
         </dependency>
         <dependency>



Mime
View raw message