db-jdo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcai...@apache.org
Subject svn commit: r161359 - in incubator/jdo/trunk/tck20/test: jdo/applicationidentity/org/apache/jdo/tck/pc/company/package.jdo jdo/datastoreidentity/org/apache/jdo/tck/pc/company/package.jdo sql/derby/schema1.sql sql/derby/schema2.sql
Date Thu, 14 Apr 2005 22:25:26 GMT
Author: mcaisse
Date: Thu Apr 14 15:25:24 2005
New Revision: 161359

URL: http://svn.apache.org/viewcvs?view=rev&rev=161359
Log:
jdo-7 Checked in mapping & DDL files for company model, but still needs work.

Modified:
    incubator/jdo/trunk/tck20/test/jdo/applicationidentity/org/apache/jdo/tck/pc/company/package.jdo
    incubator/jdo/trunk/tck20/test/jdo/datastoreidentity/org/apache/jdo/tck/pc/company/package.jdo
    incubator/jdo/trunk/tck20/test/sql/derby/schema1.sql
    incubator/jdo/trunk/tck20/test/sql/derby/schema2.sql

Modified: incubator/jdo/trunk/tck20/test/jdo/applicationidentity/org/apache/jdo/tck/pc/company/package.jdo
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck20/test/jdo/applicationidentity/org/apache/jdo/tck/pc/company/package.jdo?view=diff&r1=161358&r2=161359
==============================================================================
--- incubator/jdo/trunk/tck20/test/jdo/applicationidentity/org/apache/jdo/tck/pc/company/package.jdo
(original)
+++ incubator/jdo/trunk/tck20/test/jdo/applicationidentity/org/apache/jdo/tck/pc/company/package.jdo
Thu Apr 14 15:25:24 2005
@@ -1,32 +1,37 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE jdo PUBLIC "-//Sun Microsystems, Inc.//DTD Java Data Objects Metadata 2.0//EN"
"http://java.sun.com/dtd/jdo_2_0.dtd">
-<jdo>
 <!--
 This file contains the schema information when an implementation
 has application identity.
 -->
+<jdo>
     <package name="org.apache.jdo.tck.pc.company">
 
-        <class name="Address"
-            identity-type="application"
-            objectid-class="org.apache.jdo.tck.pc.company.Address$Oid">
-            <field name="addrid" primary-key="true"/>
+        <class name="Address">
+            <field name="addrid" persistence-modifier="none"/>
+            <field name="street"/>
+            <field name="city"/>
+            <field name="state"/>
+            <field name="zipcode"/>
+            <field name="country"/>
         </class>
 
         <class name="Company"
             identity-type="application"
             objectid-class="org.apache.jdo.tck.pc.company.Company$Oid">
             <field name="companyid" primary-key="true"/>
+            <field name="name"/>
+            <field name="founded"/>
+            <field name="address"
+                   persistence-modifier="persistent"/>
             <field name="departments" persistence-modifier="persistent">
                 <collection element-type="org.apache.jdo.tck.pc.company.Department"/>
             </field>
-            <field name="address" embedded="true"/>
         </class>
 
         <class name="DentalInsurance"
             identity-type="application"
-            persistence-capable-superclass="org.apache.jdo.tck.pc.company.Insurance"
-        />
+            persistence-capable-superclass="org.apache.jdo.tck.pc.company.Insurance"/>
 
         <class name="Department"
             identity-type="application"
@@ -59,8 +64,7 @@
 
         <class name="FullTimeEmployee"
             identity-type="application"
-            persistence-capable-superclass="org.apache.jdo.tck.pc.company.Employee"
-        />
+            persistence-capable-superclass="org.apache.jdo.tck.pc.company.Employee"/>
 
         <class name="Insurance"
             identity-type="application"
@@ -75,15 +79,15 @@
 
         <class name="PartTimeEmployee"
             identity-type="application"
-            persistence-capable-superclass="org.apache.jdo.tck.pc.company.Employee"
-        />
+            persistence-capable-superclass="org.apache.jdo.tck.pc.company.Employee"/>
 
         <class name="Person"
             identity-type="application"
             objectid-class="org.apache.jdo.tck.pc.company.Person$Oid">
             <field name="personid" primary-key="true"/>
             <field name="middlename" default-fetch-group="false"/>
-            <field name="address" embedded="true"/>
+            <field name="address"
+                   persistence-modifier="persistent"/>
 	    <field name="phoneNumbers" persistence-modifier="persistent">
                 <map key-type="String" value-type="String"/>
             </field>

Modified: incubator/jdo/trunk/tck20/test/jdo/datastoreidentity/org/apache/jdo/tck/pc/company/package.jdo
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck20/test/jdo/datastoreidentity/org/apache/jdo/tck/pc/company/package.jdo?view=diff&r1=161358&r2=161359
==============================================================================
--- incubator/jdo/trunk/tck20/test/jdo/datastoreidentity/org/apache/jdo/tck/pc/company/package.jdo
(original)
+++ incubator/jdo/trunk/tck20/test/jdo/datastoreidentity/org/apache/jdo/tck/pc/company/package.jdo
Thu Apr 14 15:25:24 2005
@@ -1,21 +1,35 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE jdo PUBLIC "-//Sun Microsystems, Inc.//DTD Java Data Objects Metadata 2.0//EN"
"http://java.sun.com/dtd/jdo_2_0.dtd">
+<!--
+This file contains the schema information when an implementation
+has datastore identity.
+-->
 <jdo>
     <package name="org.apache.jdo.tck.pc.company">
 
-        <class name="Address"/>
+        <class name="Address">
+            <field name="addrid" persistence-modifier="none"/>
+            <field name="street"/>
+            <field name="city"/>
+            <field name="state"/>
+            <field name="zipcode"/>
+            <field name="country"/>
+        </class>
 
-        <class name="Company">
+        <class name="Company" identity-type="datastore">
+            <field name="name"/>
+            <field name="founded"/>
+            <field name="address"
+                   persistence-modifier="persistent"/>
             <field name="departments" persistence-modifier="persistent">
                 <collection element-type="org.apache.jdo.tck.pc.company.Department"/>
             </field>
-            <field name="address" embedded="true"/>                
         </class>
 
-        <class name="DentalInsurance"
-            persistence-capable-superclass="org.apache.jdo.tck.pc.company.Insurance"/>
+        <class name="DentalInsurance" identity-type="datastore"/>
 
-        <class name="Department">
+        <class name="Department" identity-type="datastore">
+            <field name="deptid" persistence-modifier="none"/>
             <field name="employees" persistence-modifier="persistent">
                 <collection element-type="org.apache.jdo.tck.pc.company.Employee"/>
             </field>
@@ -24,8 +38,7 @@
             </field>
         </class>
 
-        <class name="Employee"
-          persistence-capable-superclass="org.apache.jdo.tck.pc.company.Person">
+        <class name="Employee" identity-type="datastore">
             <field name="reviewedProjects" persistence-modifier="persistent">
                 <collection element-type="org.apache.jdo.tck.pc.company.Project"/>
             </field>
@@ -40,26 +53,28 @@
             </field>
         </class>
 
-        <class name="FullTimeEmployee"
-          persistence-capable-superclass="org.apache.jdo.tck.pc.company.Employee"/>
+        <class name="FullTimeEmployee" identity-type="datastore"/>
 
-        <class name="Insurance"/>
+        <class name="Insurance" identity-type="datastore">
+            <field name="insid" persistence-modifier="none"/>
+        </class>
 
-        <class name="MedicalInsurance"
-            persistence-capable-superclass="org.apache.jdo.tck.pc.company.Insurance"/>
+        <class name="MedicalInsurance" identity-type="datastore"/>
 
-        <class name="PartTimeEmployee"
-          persistence-capable-superclass="org.apache.jdo.tck.pc.company.Employee"/>
+        <class name="PartTimeEmployee" identity-type="datastore"/>
 
-        <class name="Person">
+        <class name="Person" identity-type="datastore">
+            <field name="personid" persistence-modifier="none"/>
             <field name="middlename" default-fetch-group="false"/>
-            <field name="address" embedded="true"/>
+            <field name="address"
+                   persistence-modifier="persistent"/>
 	    <field name="phoneNumbers" persistence-modifier="persistent">
                 <map key-type="String" value-type="String"/>
             </field>
         </class>
 
-        <class name="Project">
+        <class name="Project" identity-type="datastore">
+            <field name="projid" persistence-modifier="none"/>
             <field name="reviewers" persistence-modifier="persistent">
                 <collection element-type="org.apache.jdo.tck.pc.company.Employee"/>
             </field>

Modified: incubator/jdo/trunk/tck20/test/sql/derby/schema1.sql
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck20/test/sql/derby/schema1.sql?view=diff&r1=161358&r2=161359
==============================================================================
--- incubator/jdo/trunk/tck20/test/sql/derby/schema1.sql (original)
+++ incubator/jdo/trunk/tck20/test/sql/derby/schema1.sql Thu Apr 14 15:25:24 2005
@@ -1,5 +1,10 @@
 -- SchemaType: application identity
+
 connect 'jdbc:derby:jdotckdb;create=true' user 'tckuser' password 'tckuser';
+
+-------------------------
+-- mylib
+-------------------------
 CREATE TABLE PCPoint (
     ID BIGINT NOT NULL,
     X INTEGER NOT NULL,
@@ -51,5 +56,110 @@
     PrimitiveTypes INTEGER NOT NULL,
     CONSTRAINT PCPNT_PT PRIMARY KEY (ID)
 );
+
+-------------------------
+-- company
+-------------------------
+--CREATE TABLE addresses (
+--    ADDRID INTEGER NOT NULL,
+--    STREET VARCHAR(64) NOT NULL,
+--    CITY VARCHAR(64) NOT NULL,
+--    STATE CHAR(2) NOT NULL,
+--    ZIPCODE CHAR(5) NOT NULL,
+--    COUNTRY VARCHAR(64) NOT NULL,
+--    CONSTRAINT ADDR_PK PRIMARY KEY (ID)
+--);
+
+CREATE TABLE companies (
+    ID INTEGER NOT NULL,
+    NAME VARCHAR(32) NOT NULL,
+    FOUNDEDDATE VARCHAR(32) NOT NULL,
+    STREET VARCHAR(64) NOT NULL,
+    CITY VARCHAR(64) NOT NULL,
+    STATE CHAR(2) NOT NULL,
+    ZIPCODE CHAR(5) NOT NULL,
+    COUNTRY VARCHAR(64) NOT NULL,
+    CONSTRAINT COMPS_PK PRIMARY KEY (ID)
+);
+
+CREATE TABLE departments (
+    ID INTEGER NOT NULL,
+    NAME VARCHAR(32) NOT NULL,
+    COMPANYID INTEGER REFERENCES COMPANIES NOT NULL,
+    CONSTRAINT DEPTS_PK PRIMARY KEY (ID)
+);
+
+CREATE TABLE persons (
+    PERSONID INTEGER NOT NULL,
+    FIRSTNAME VARCHAR(32) NOT NULL,
+    LASTNAME VARCHAR(32) NOT NULL,
+    MIDDLENAME VARCHAR(32),
+    BIRTHDATE VARCHAR(32) NOT NULL,
+    STREET VARCHAR(64) NOT NULL,
+    CITY VARCHAR(64) NOT NULL,
+    STATE CHAR(2) NOT NULL,
+    ZIPCODE CHAR(5) NOT NULL,
+    COUNTRY VARCHAR(64) NOT NULL,
+    HIREDATE VARCHAR(32) NOT NULL,
+    WEEKLYHOURS FLOAT NOT NULL,
+    DEPARTMENT INTEGER REFERENCES departments NOT NULL,
+    FUNDINGDEPT INTEGER REFERENCES departments NOT NULL,
+    MANAGER INTEGER REFERENCES persons NOT NULL,
+    MENTOR INTEGER REFERENCES persons NOT NULL,
+    HRADVISOR INTEGER REFERENCES persons NOT NULL,
+    SALARY FLOAT NOT NULL,
+    WAGE FLOAT NOT NULL,
+    DISCRIMINATOR varchar(64) NOT NULL,
+    CONSTRAINT EMPS_PK PRIMARY KEY (PERSONID)
+);
+
+CREATE TABLE insuranceplans (
+    INSID INTEGER NOT NULL,
+    CARRIER VARCHAR(64) NOT NULL,
+    LIFETIME_ORTHO_BENEFIT DECIMAL NOT NULL,
+    PLANTYPE VARCHAR(8) NOT NULL,
+    DISCRIMINATOR varchar(64) NOT NULL,
+    EMPLOYEE INTEGER REFERENCES persons,
+    CONSTRAINT INS_PK PRIMARY KEY (INSID)
+);
+
+CREATE TABLE projects (
+    PROJID INTEGER NOT NULL,
+    NAME VARCHAR(32) NOT NULL,
+    BUDGET DECIMAL NOT NULL,
+    CONSTRAINT PROJS_PK PRIMARY KEY (PROJID)
+);
+
+CREATE TABLE project_reviewer (
+    PROJID INTEGER REFERENCES projects NOT NULL,
+    REVIEWER INTEGER REFERENCES persons NOT NULL
+);
+
+CREATE TABLE project_member (
+    PROJID INTEGER REFERENCES projects NOT NULL,
+    MEMBER INTEGER REFERENCES persons NOT NULL
+);
+
+CREATE TABLE employee_phoneno_type (
+    EMPID INTEGER REFERENCES persons NOT NULL,
+    PHONENO VARCHAR(16) NOT NULL,
+    TYPE VARCHAR(16) NOT NULL
+);
+
+-------------------------
+--fieldtypes
+-------------------------
+
+-------------------------
+--inheritance
+-------------------------
+
+-------------------------
+--instancecallbacks
+-------------------------
+
+-------------------------
+--lifecycle
+-------------------------
 
 disconnect;

Modified: incubator/jdo/trunk/tck20/test/sql/derby/schema2.sql
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck20/test/sql/derby/schema2.sql?view=diff&r1=161358&r2=161359
==============================================================================
--- incubator/jdo/trunk/tck20/test/sql/derby/schema2.sql (original)
+++ incubator/jdo/trunk/tck20/test/sql/derby/schema2.sql Thu Apr 14 15:25:24 2005
@@ -1,5 +1,10 @@
 -- SchemaType: datastore-identity strategy="identity"
+
 connect 'jdbc:derby:jdotckdb;create=true' user 'tckuser' password 'tckuser';
+
+-------------------------
+-- mylib
+-------------------------
 CREATE TABLE PCPoint (
     ID BIGINT NOT NULL GENERATED ALWAYS AS IDENTITY,
     X INTEGER NOT NULL,
@@ -51,5 +56,110 @@
     PrimitiveTypes INTEGER NOT NULL,
     CONSTRAINT PCPNT_PT PRIMARY KEY (ID)
 );
+
+-------------------------
+-- company
+-------------------------
+--CREATE TABLE addresses (
+--    ADDRID INTEGER NOT NULL,
+--    STREET VARCHAR(64) NOT NULL,
+--    CITY VARCHAR(64) NOT NULL,
+--    STATE CHAR(2) NOT NULL,
+--    ZIPCODE CHAR(5) NOT NULL,
+--    COUNTRY VARCHAR(64) NOT NULL,
+--    CONSTRAINT ADDR_PK PRIMARY KEY (ID)
+--);
+
+CREATE TABLE companies (
+    ID INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY,
+    NAME VARCHAR(32) NOT NULL,
+    FOUNDEDDATE VARCHAR(32) NOT NULL,
+    STREET VARCHAR(64) NOT NULL,
+    CITY VARCHAR(64) NOT NULL,
+    STATE CHAR(2) NOT NULL,
+    ZIPCODE CHAR(5) NOT NULL,
+    COUNTRY VARCHAR(64) NOT NULL,
+    CONSTRAINT COMPS_PK PRIMARY KEY (ID)
+);
+
+CREATE TABLE departments (
+    ID INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY,
+    NAME VARCHAR(32) NOT NULL,
+    COMPANYID INTEGER REFERENCES COMPANIES NOT NULL,
+    CONSTRAINT DEPTS_PK PRIMARY KEY (ID)
+);
+
+CREATE TABLE persons (
+    PERSONID INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY,
+    FIRSTNAME VARCHAR(32) NOT NULL,
+    LASTNAME VARCHAR(32) NOT NULL,
+    MIDDLENAME VARCHAR(32),
+    BIRTHDATE VARCHAR(32) NOT NULL,
+    STREET VARCHAR(64) NOT NULL,
+    CITY VARCHAR(64) NOT NULL,
+    STATE CHAR(2) NOT NULL,
+    ZIPCODE CHAR(5) NOT NULL,
+    COUNTRY VARCHAR(64) NOT NULL,
+    HIREDATE VARCHAR(32) NOT NULL,
+    WEEKLYHOURS FLOAT NOT NULL,
+    DEPARTMENT INTEGER REFERENCES departments NOT NULL,
+    FUNDINGdEPT INTEGER REFERENCES departments NOT NULL,
+    MANAGER INTEGER REFERENCES persons NOT NULL,
+    MENTOR INTEGER REFERENCES persons NOT NULL,
+    HRADVISOR INTEGER REFERENCES persons NOT NULL,
+    SALARY FLOAT NOT NULL,
+    WAGE FLOAT NOT NULL,
+    DISCRIMINATOR varchar(64) NOT NULL,
+    CONSTRAINT EMPS_PK PRIMARY KEY (PERSONID)
+);
+
+CREATE TABLE insuranceplans (
+    INSID INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY,
+    CARRIER VARCHAR(64) NOT NULL,
+    LIFETIME_ORTHO_BENEFIT DECIMAL NOT NULL,
+    PLANtYPE VARCHAR(8) NOT NULL,
+    DISCRIMINATOR VARCHAR(64) NOT NULL,
+    EMPLOYEE INTEGER REFERENCES persons,
+    CONSTRAINT INS_PK PRIMARY KEY (INSID)
+);
+
+CREATE TABLE projects (
+    PROJID INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY,
+    NAME VARCHAR(32) NOT NULL,
+    BUDGET DECIMAL NOT NULL,
+    CONSTRAINT PROJS_PK PRIMARY KEY (PROJID)
+);
+
+CREATE TABLE project_reviewer (
+    projid INTEGER REFERENCES projects NOT NULL,
+    reviewer INTEGER REFERENCES persons NOT NULL
+);
+
+CREATE TABLE project_member (
+    projid INTEGER REFERENCES projects NOT NULL,
+    member INTEGER REFERENCES persons NOT NULL
+);
+
+CREATE TABLE employee_phoneno_type (
+    empid INTEGER REFERENCES persons NOT NULL,
+    phoneno VARCHAR(16) NOT NULL,
+    type VARCHAR(16) NOT NULL
+);
+
+-------------------------
+--fieldtypes
+-------------------------
+
+-------------------------
+--inheritance
+-------------------------
+
+-------------------------
+--instancecallbacks
+-------------------------
+
+-------------------------
+--lifecycle
+-------------------------
 
 disconnect;



Mime
View raw message