geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r485965 - in /geronimo/daytrader/trunk: ./ modules/ejb/ modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ modules/streamer/ modules/web/src/main/webapp/dbscripts/derby/ plans/
Date Tue, 12 Dec 2006 00:28:04 GMT
Author: djencks
Date: Mon Dec 11 16:28:03 2006
New Revision: 485965

URL: http://svn.apache.org/viewvc?view=rev&rev=485965
Log:
DAYTRADER-31.  fix openjpa version. Add jpa sequence table to derby ddl.  Mark incorrectly
mapped columns @Transient

Modified:
    geronimo/daytrader/trunk/modules/ejb/pom.xml
    geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/AccountDataBean.java
    geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/AccountProfileDataBean.java
    geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/HoldingDataBean.java
    geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/OrderDataBean.java
    geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/QuoteDataBean.java
    geronimo/daytrader/trunk/modules/streamer/pom.xml
    geronimo/daytrader/trunk/modules/web/src/main/webapp/dbscripts/derby/Table.ddl
    geronimo/daytrader/trunk/plans/daytrader-jpa-plan.xml
    geronimo/daytrader/trunk/pom.xml

Modified: geronimo/daytrader/trunk/modules/ejb/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/modules/ejb/pom.xml?view=diff&rev=485965&r1=485964&r2=485965
==============================================================================
--- geronimo/daytrader/trunk/modules/ejb/pom.xml (original)
+++ geronimo/daytrader/trunk/modules/ejb/pom.xml Mon Dec 11 16:28:03 2006
@@ -81,7 +81,6 @@
         <dependency>
             <groupId>org.apache.openjpa</groupId>
             <artifactId>openjpa-all</artifactId>
-            <version>0.9.6-incubating-SNAPSHOT</version>
             <scope>provided</scope>
         </dependency>
         <dependency>

Modified: geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/AccountDataBean.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/AccountDataBean.java?view=diff&rev=485965&r1=485964&r2=485965
==============================================================================
--- geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/AccountDataBean.java
(original)
+++ geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/AccountDataBean.java
Mon Dec 11 16:28:03 2006
@@ -33,6 +33,7 @@
 import javax.persistence.Table;
 import javax.persistence.JoinColumn;
 import javax.persistence.Column;
+import javax.persistence.Transient;
 
 import org.apache.geronimo.samples.daytrader.util.Log;
 
@@ -53,14 +54,14 @@
     @OneToMany(mappedBy = "account", cascade = CascadeType.ALL)
     private Collection<OrderDataBean> orders;
     @OneToOne(cascade = CascadeType.ALL)
-    @JoinColumn(name = "PROFILE_USERID", referencedColumnName = "userID")
+    @JoinColumn(name = "PROFILE_USERID", referencedColumnName = "USERID")
     @Column(length = 250)
     private AccountProfileDataBean profile;
-    @Version
-    private Integer optLock;
+//    @Version
+//    private Integer optLock;
 
     /* Accessor methods for relationship fields are only included for the AccountProfile
profileID */
-
+    @Transient
     private String profileID;
 
     public AccountDataBean() {

Modified: geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/AccountProfileDataBean.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/AccountProfileDataBean.java?view=diff&rev=485965&r1=485964&r2=485965
==============================================================================
--- geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/AccountProfileDataBean.java
(original)
+++ geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/AccountProfileDataBean.java
Mon Dec 11 16:28:03 2006
@@ -47,10 +47,10 @@
     private String email;                /* email */
     @Column(length=250)
     private String creditCard;            /* creditCard */
-    @OneToOne
+    @OneToOne(mappedBy="profile")
     private AccountDataBean account;
-    @Version
-    private Integer optLock;
+//    @Version
+//    private Integer optLock;
 
     public AccountProfileDataBean() {
     }

Modified: geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/HoldingDataBean.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/HoldingDataBean.java?view=diff&rev=485965&r1=485964&r2=485965
==============================================================================
--- geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/HoldingDataBean.java
(original)
+++ geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/HoldingDataBean.java
Mon Dec 11 16:28:03 2006
@@ -29,6 +29,7 @@
 import javax.persistence.Version;
 import javax.persistence.Table;
 import javax.persistence.Column;
+import javax.persistence.Transient;
 
 import org.apache.geronimo.samples.daytrader.util.Log;
 
@@ -49,15 +50,16 @@
     private double quantity;            /* quantity */
     private BigDecimal purchasePrice;        /* purchasePrice */
     private Date purchaseDate;        /* purchaseDate */
-    @Column(length = 250)
+//    @Column(length = 250)
+    @Transient
     private String quoteID;            /* Holding(*)  ---> Quote(1) */
     @OneToOne
     private AccountDataBean account;
     @OneToOne
     private QuoteDataBean quote;
 
-    @Version
-    private Integer optLock;
+//    @Version
+//    private Integer optLock;
 
     public HoldingDataBean() {
     }

Modified: geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/OrderDataBean.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/OrderDataBean.java?view=diff&rev=485965&r1=485964&r2=485965
==============================================================================
--- geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/OrderDataBean.java
(original)
+++ geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/OrderDataBean.java
Mon Dec 11 16:28:03 2006
@@ -31,6 +31,7 @@
 import javax.persistence.Version;
 import javax.persistence.Table;
 import javax.persistence.Column;
+import javax.persistence.Transient;
 
 import org.apache.geronimo.samples.daytrader.util.Log;
 
@@ -68,11 +69,12 @@
     private QuoteDataBean quote;
     @OneToOne
     private HoldingDataBean holding;
-    @Version
-    private Integer optLock;
+//    @Version
+//    private Integer optLock;
 
 
     /* Fields for relationship fields are not kept in the Data Bean */
+    @Transient
     private String 		symbol;
 
     public OrderDataBean() {}

Modified: geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/QuoteDataBean.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/QuoteDataBean.java?view=diff&rev=485965&r1=485964&r2=485965
==============================================================================
--- geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/QuoteDataBean.java
(original)
+++ geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/QuoteDataBean.java
Mon Dec 11 16:28:03 2006
@@ -52,8 +52,8 @@
     private BigDecimal low;     /* low price */
     private BigDecimal high;    /* high price */
     private double change1;     /* price change */
-    @Version
-    private Integer optLock;
+//    @Version
+//    private Integer optLock;
 
     /* Accessor methods for relationship fields are not kept in the DataBean */
     public QuoteDataBean() {

Modified: geronimo/daytrader/trunk/modules/streamer/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/modules/streamer/pom.xml?view=diff&rev=485965&r1=485964&r2=485965
==============================================================================
--- geronimo/daytrader/trunk/modules/streamer/pom.xml (original)
+++ geronimo/daytrader/trunk/modules/streamer/pom.xml Mon Dec 11 16:28:03 2006
@@ -64,7 +64,6 @@
         <dependency>
             <groupId>org.apache.openjpa</groupId>
             <artifactId>openjpa-all</artifactId>
-            <version>0.9.6-incubating-SNAPSHOT</version>
             <scope>provided</scope>
         </dependency>
     </dependencies>

Modified: geronimo/daytrader/trunk/modules/web/src/main/webapp/dbscripts/derby/Table.ddl
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/modules/web/src/main/webapp/dbscripts/derby/Table.ddl?view=diff&rev=485965&r1=485964&r2=485965
==============================================================================
--- geronimo/daytrader/trunk/modules/web/src/main/webapp/dbscripts/derby/Table.ddl (original)
+++ geronimo/daytrader/trunk/modules/web/src/main/webapp/dbscripts/derby/Table.ddl Mon Dec
11 16:28:03 2006
@@ -22,6 +22,12 @@
 DROP TABLE ACCOUNTEJB;
 DROP TABLE ORDEREJB;
 
+DROP TABLE OPENJPASEQ;
+
+create table OPENJPASEQ
+(id smallint not null primary key,
+sequence_value bigint);
+
 create table holdingejb
 (purchaseprice decimal(10, 2),
 holdingid integer not null,

Modified: geronimo/daytrader/trunk/plans/daytrader-jpa-plan.xml
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/plans/daytrader-jpa-plan.xml?view=diff&rev=485965&r1=485964&r2=485965
==============================================================================
--- geronimo/daytrader/trunk/plans/daytrader-jpa-plan.xml (original)
+++ geronimo/daytrader/trunk/plans/daytrader-jpa-plan.xml Mon Dec 11 16:28:03 2006
@@ -556,7 +556,7 @@
                     <exclude-unlisted-classes/>
                     <properties>
                         <property name="openjpa.jdbc.DBDictionary" value="org.apache.openjpa.jdbc.sql.DerbyDictionary"/>
-                        <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)"/>
+                        <!--<property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)"/>-->
                         <property name="openjpa.Sequence" value="table(Table=OPENJPASEQ,
Increment=100)"/>
                     </properties>
                 </persistence-unit>

Modified: geronimo/daytrader/trunk/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/pom.xml?view=diff&rev=485965&r1=485964&r2=485965
==============================================================================
--- geronimo/daytrader/trunk/pom.xml (original)
+++ geronimo/daytrader/trunk/pom.xml Mon Dec 11 16:28:03 2006
@@ -160,6 +160,12 @@
                 <scope>provided</scope>
             </dependency>
             <dependency>
+                <groupId>org.apache.openjpa</groupId>
+                <artifactId>openjpa-all</artifactId>
+                <version>0.9.6-incubating</version>
+                <scope>provided</scope>
+            </dependency>
+            <dependency>
                 <groupId>commons-logging</groupId>
                 <artifactId>commons-logging</artifactId>
                 <version>1.0.3</version>



Mime
View raw message