You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jdo-commits@db.apache.org by cl...@apache.org on 2006/03/03 20:32:28 UTC

svn commit: r382915 - in /db/jdo/trunk/tck20: maven.xml src/conf/companyPMClass.conf src/conf/configurations.list src/java/org/apache/jdo/tck/pc/company/CompanyFactoryPMClass.java

Author: clr
Date: Fri Mar  3 11:32:26 2006
New Revision: 382915

URL: http://svn.apache.org/viewcvs?rev=382915&view=rev
Log:
JDO-296 Added company factory for pm.newInstance(PCClass)

Added:
    db/jdo/trunk/tck20/src/conf/companyPMClass.conf
    db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/pc/company/CompanyFactoryPMClass.java
Modified:
    db/jdo/trunk/tck20/maven.xml
    db/jdo/trunk/tck20/src/conf/configurations.list

Modified: db/jdo/trunk/tck20/maven.xml
URL: http://svn.apache.org/viewcvs/db/jdo/trunk/tck20/maven.xml?rev=382915&r1=382914&r2=382915&view=diff
==============================================================================
--- db/jdo/trunk/tck20/maven.xml (original)
+++ db/jdo/trunk/tck20/maven.xml Fri Mar  3 11:32:26 2006
@@ -380,6 +380,8 @@
                          value="${jdo.tck.cleanupaftertest}"/>             
             <sysproperty key="jdo.tck.requiredOptions"
                          value="${jdo.tck.requiredOptions}"/>
+            <sysproperty key="jdo.tck.mapping.companyfactory"
+                         value="${jdo.tck.mapping.companyfactory}"/>
                          
             <jvmarg line="${database.runtck.sysproperties}"/>
             <jvmarg line="${iut.runtck.sysproperties}"/>
@@ -439,6 +441,8 @@
                          value="${jdo.tck.cleanupaftertest}"/>
             <sysproperty key="jdo.tck.requiredOptions"
                          value="${jdo.tck.requiredOptions}"/>
+            <sysproperty key="jdo.tck.mapping.companyfactory"
+                         value="${jdo.tck.mapping.companyfactory}"/>
                          
             <jvmarg line="${database.runtck.sysproperties}"/>
             <jvmarg line="${jdori.runtck.sysproperties}"/>

Added: db/jdo/trunk/tck20/src/conf/companyPMClass.conf
URL: http://svn.apache.org/viewcvs/db/jdo/trunk/tck20/src/conf/companyPMClass.conf?rev=382915&view=auto
==============================================================================
--- db/jdo/trunk/tck20/src/conf/companyPMClass.conf (added)
+++ db/jdo/trunk/tck20/src/conf/companyPMClass.conf Fri Mar  3 11:32:26 2006
@@ -0,0 +1,7 @@
+jdo.tck.description = Completeness test with standard mapping, basic testdata with all relationships \
+and embedded objects. 
+jdo.tck.mapping.companyfactory = org.apache.jdo.tck.pc.company.CompanyFactoryPMClass
+jdo.tck.classes = org.apache.jdo.tck.mapping.CompletenessTest
+jdo.tck.testdata = org/apache/jdo/tck/pc/company/companyAllRelationships.xml
+jdo.tck.mapping = 0
+jdo.tck.requiredOptions =

Modified: db/jdo/trunk/tck20/src/conf/configurations.list
URL: http://svn.apache.org/viewcvs/db/jdo/trunk/tck20/src/conf/configurations.list?rev=382915&r1=382914&r2=382915&view=diff
==============================================================================
--- db/jdo/trunk/tck20/src/conf/configurations.list (original)
+++ db/jdo/trunk/tck20/src/conf/configurations.list Fri Mar  3 11:32:26 2006
@@ -16,6 +16,7 @@
                  company1-MRelationships.conf \
                  companyM-MRelationships.conf \
                  companyAllRelationships.conf \
+                 companyPMClass.conf \
                  inheritance1.conf \
                  inheritance2.conf \
                  inheritance3.conf \

Added: db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/pc/company/CompanyFactoryPMClass.java
URL: http://svn.apache.org/viewcvs/db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/pc/company/CompanyFactoryPMClass.java?rev=382915&view=auto
==============================================================================
--- db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/pc/company/CompanyFactoryPMClass.java (added)
+++ db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/pc/company/CompanyFactoryPMClass.java Fri Mar  3 11:32:26 2006
@@ -0,0 +1,69 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * 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.
+ */
+
+package org.apache.jdo.tck.pc.company;
+
+import javax.jdo.PersistenceManager;
+
+/*
+ * CompanyFactoryPMInterface.java
+ *
+ * This class uses the PersistenceManager.newInstance method with the concrete
+ * class as a parameter. 
+ */
+public class CompanyFactoryPMClass 
+        extends CompanyFactoryAbstractImpl {
+    
+    /**
+     * Creates a new instance of CompanyFactoryPMInterface 
+     */
+    public CompanyFactoryPMClass(PersistenceManager pm) {
+        super(pm);
+    }
+    
+    IAddress newAddress() {
+        return (IAddress)pm.newInstance(Address.class);
+    }
+    
+    ICompany newCompany() {
+        return (ICompany)pm.newInstance(Company.class);
+    }
+    
+    IDentalInsurance newDentalInsurance() {
+        return (IDentalInsurance)pm.newInstance(DentalInsurance.class);
+    }
+    
+    IDepartment newDepartment() {
+        return (IDepartment)pm.newInstance(Department.class);
+    }
+    
+    IFullTimeEmployee  newFullTimeEmployee() {
+        return (IFullTimeEmployee)pm.newInstance(FullTimeEmployee.class);
+    }
+    
+    IMedicalInsurance newMedicalInsurance() {
+        return (IMedicalInsurance)pm.newInstance(MedicalInsurance.class);        
+    }
+    
+    IPartTimeEmployee  newPartTimeEmployee() {
+        return (IPartTimeEmployee)pm.newInstance(PartTimeEmployee.class);
+    }
+    
+    IProject newProject() {
+        return (IProject)pm.newInstance(Project.class);
+    }
+
+}