db-jdo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c..@apache.org
Subject svn commit: r365778 - in /db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/pc/company: Address.java Company.java Department.java Insurance.java Person.java Project.java
Date Wed, 04 Jan 2006 00:23:32 GMT
Author: clr
Date: Tue Jan  3 16:23:30 2006
New Revision: 365778

URL: http://svn.apache.org/viewcvs?rev=365778&view=rev
Log:
JDO-269 allow setting of id for use with pm.newInstance construction of instances

Modified:
    db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/pc/company/Address.java
    db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/pc/company/Company.java
    db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/pc/company/Department.java
    db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/pc/company/Insurance.java
    db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/pc/company/Person.java
    db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/pc/company/Project.java

Modified: db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/pc/company/Address.java
URL: http://svn.apache.org/viewcvs/db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/pc/company/Address.java?rev=365778&r1=365777&r2=365778&view=diff
==============================================================================
--- db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/pc/company/Address.java (original)
+++ db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/pc/company/Address.java Tue Jan  3 16:23:30
2006
@@ -71,7 +71,9 @@
      * @param id the id.
      */
     public void setAddrid(long id) {
-        throw new IllegalStateException("Id is already set.");
+        if (this.addrid != 0)
+            throw new IllegalStateException("Id is already set.");
+        this.addrid = id;
     }
 
     /** 

Modified: db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/pc/company/Company.java
URL: http://svn.apache.org/viewcvs/db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/pc/company/Company.java?rev=365778&r1=365777&r2=365778&view=diff
==============================================================================
--- db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/pc/company/Company.java (original)
+++ db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/pc/company/Company.java Tue Jan  3 16:23:30
2006
@@ -86,7 +86,9 @@
      * @param id the id.
      */
     public void setCompanyid(long id) {
-        throw new IllegalStateException("Id is already set.");
+        if (this.companyid != 0)
+            throw new IllegalStateException("Id is already set.");
+        this.companyid = id;
     }
 
     /**

Modified: db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/pc/company/Department.java
URL: http://svn.apache.org/viewcvs/db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/pc/company/Department.java?rev=365778&r1=365777&r2=365778&view=diff
==============================================================================
--- db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/pc/company/Department.java (original)
+++ db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/pc/company/Department.java Tue Jan  3
16:23:30 2006
@@ -87,7 +87,9 @@
      * @param id the id.
      */
     public void setDeptid(long id) {
-        throw new IllegalStateException("Id is already set.");
+        if (this.deptid != 0)
+            throw new IllegalStateException("Id is already set.");
+        this.deptid = id;
     }
 
     /**

Modified: db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/pc/company/Insurance.java
URL: http://svn.apache.org/viewcvs/db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/pc/company/Insurance.java?rev=365778&r1=365777&r2=365778&view=diff
==============================================================================
--- db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/pc/company/Insurance.java (original)
+++ db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/pc/company/Insurance.java Tue Jan  3 16:23:30
2006
@@ -71,8 +71,10 @@
      * Set the insurance ID.
      * @param insid The insurance ID value.
      */
-    public void setInsid(long insid) {
-        throw new IllegalStateException("Id is already set.");
+    public void setInsid(long id) {
+        if (this.insid != 0) 
+            throw new IllegalStateException("Id is already set.");
+        this.insid = id;
     }
 
     /**

Modified: db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/pc/company/Person.java
URL: http://svn.apache.org/viewcvs/db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/pc/company/Person.java?rev=365778&r1=365777&r2=365778&view=diff
==============================================================================
--- db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/pc/company/Person.java (original)
+++ db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/pc/company/Person.java Tue Jan  3 16:23:30
2006
@@ -90,7 +90,9 @@
      * @param id the id.
      */
     public void setPersonid(long id) {
-        throw new IllegalStateException("Id is already set.");
+        if (this.personid != 0)
+            throw new IllegalStateException("Id is already set.");
+        this.personid = id;
     }
 
     /**

Modified: db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/pc/company/Project.java
URL: http://svn.apache.org/viewcvs/db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/pc/company/Project.java?rev=365778&r1=365777&r2=365778&view=diff
==============================================================================
--- db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/pc/company/Project.java (original)
+++ db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/pc/company/Project.java Tue Jan  3 16:23:30
2006
@@ -62,7 +62,9 @@
      * @param id the id.
      */
     public void setProjid(long id) {
-        throw new IllegalStateException("Id is already set.");
+        if (this.projid != 0)
+            throw new IllegalStateException("Id is already set.");
+        this.projid = id;
     }
 
     /**



Mime
View raw message