summaryrefslogtreecommitdiffstats
path: root/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources
diff options
context:
space:
mode:
Diffstat (limited to 'sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources')
-rw-r--r--sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/1xM_mapping_no_cud.xml33
-rw-r--r--sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/BooksConfig.xml24
-rw-r--r--sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/CompanyConfig.xml48
-rw-r--r--sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/CompanyEmployeeConfig.xml67
-rw-r--r--sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/CustOrdersConnectionProps.xml61
-rw-r--r--sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/CustomerConfigWithConverter.xml24
-rw-r--r--sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/CustomerConfigWithIDConverter.xml23
-rw-r--r--sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/CustomersOrdersConfig.xml45
-rw-r--r--sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/OrdersOrderDetailsConfig.xml30
-rw-r--r--sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/PartsConfig.xml27
-rw-r--r--sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/basicCompanyDepartmentMapping.xml36
-rw-r--r--sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/basicCompanyMapping.xml22
-rw-r--r--sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/basicCustomerMapping.xml25
-rw-r--r--sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/basicCustomerMappingWithCUD.xml28
-rw-r--r--sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/basicCustomerMappingWithInvalidCUD.xml28
-rw-r--r--sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/basicCustomerOrderMapping.xml32
-rw-r--r--sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/basicStaticCustomer.xml25
-rw-r--r--sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/cityStates.xml37
-rw-r--r--sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/company.ecore130
-rw-r--r--sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/company.genmodel38
-rw-r--r--sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/company.xsd53
-rw-r--r--sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/companyMapping.xml39
-rw-r--r--sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/companyMappingWithConverters.xml41
-rw-r--r--sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/customer.ecore96
-rw-r--r--sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/customer.genmodel32
-rw-r--r--sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/customer.xsd47
-rw-r--r--sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/customerMapping.xml25
-rw-r--r--sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/customerOrderRelationshipMapping.xml31
28 files changed, 1147 insertions, 0 deletions
diff --git a/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/1xM_mapping_no_cud.xml b/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/1xM_mapping_no_cud.xml
new file mode 100644
index 0000000000..cb30e67f6e
--- /dev/null
+++ b/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/1xM_mapping_no_cud.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+
+ 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.
+ -->
+<Config xsi:noNamespaceSchemaLocation="http:///org.apache.tuscany.das.rdb/config.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+ <Table name="CUSTOMER" propertyName="Customer">
+ <Column name="ID" propertyName="iD" primaryKey="true"/>
+ </Table>
+
+ <Table name="ANORDER" propertyName="AnOrder">
+ <Column name="CUSTOMER_ID" propertyName="customerID"/>
+ <Column name="ID" propertyName="iD" primaryKey="true"/>
+ </Table>
+
+ <Relationship name="orders" primaryKeyTable="CUSTOMER" foreignKeyTable="ANORDER" many="true">
+ <KeyPair primaryKeyColumn="ID" foreignKeyColumn="CUSTOMER_ID"/>
+ </Relationship>
+
+</Config>
+
diff --git a/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/BooksConfig.xml b/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/BooksConfig.xml
new file mode 100644
index 0000000000..b7e938ec9f
--- /dev/null
+++ b/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/BooksConfig.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+
+ 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.
+ -->
+<Config xsi:noNamespaceSchemaLocation="http:///org.apache.tuscany.das.rdb/config.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+ <Table name="BOOK">
+ <Column name="BOOK_ID" primaryKey="true"/>
+ <Column name="OCC" collision="true"/>
+ </Table>
+
+</Config>
diff --git a/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/CompanyConfig.xml b/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/CompanyConfig.xml
new file mode 100644
index 0000000000..5ed35f4fd3
--- /dev/null
+++ b/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/CompanyConfig.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+
+ 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.
+ -->
+<Config xsi:noNamespaceSchemaLocation="http:///org.apache.tuscany.das.rdb/config.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+ <Command name="all companies" SQL="select * from COMPANY" kind="Select"/>
+
+ <Command name="all companies and departments" SQL="select * from COMPANY left outer join DEPARTMENT on COMPANY.ID = DEPARTMENT.COMPANYID" kind="Select"/>
+
+ <Command name="all departments for company" SQL="select * from COMPANY inner join DEPARTMENT on COMPANY.ID = DEPARTMENT.COMPANYID where COMPANY.ID = :ID" kind="Select"/>
+
+ <Command name="company by id with departments" SQL="select * from COMPANY left outer join DEPARTMENT on COMPANY.ID = DEPARTMENT.COMPANYID where COMPANY.ID = :ID" kind="Select"/>
+
+<!--
+ <ConnectionProperties dataSource="java:comp/env/jdbc/dastest"/>
+-->
+
+
+ <ConnectionProperties driverClassName="org.apache.derby.jdbc.EmbeddedDriver"
+ driverURL="jdbc:derby:dastest"/>
+
+ <Table name="COMPANY">
+ <Column name="ID" primaryKey="true" generated="true"/>
+ </Table>
+
+ <Table name="DEPARTMENT">
+ <Column name="ID" primaryKey="true" generated="true"/>
+ </Table>
+
+ <Relationship name="departments" primaryKeyTable="COMPANY" foreignKeyTable="DEPARTMENT" many="true">
+ <KeyPair primaryKeyColumn="ID" foreignKeyColumn="COMPANYID"/>
+ </Relationship>
+
+
+</Config>
diff --git a/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/CompanyEmployeeConfig.xml b/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/CompanyEmployeeConfig.xml
new file mode 100644
index 0000000000..2dbac17522
--- /dev/null
+++ b/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/CompanyEmployeeConfig.xml
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+
+ 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.
+ -->
+<Config xsi:noNamespaceSchemaLocation="http:///org.apache.tuscany.das.rdb/config.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+ <Command name="get all companies" SQL="select * from COMPANY" kind = "Select"/>
+
+ <Command name="get named employee" SQL="select * from EMPLOYEE where NAME=:NAME" kind = "Select">
+ <Parameter name=":NAME"/>
+ </Command>
+
+ <Command name="get named employee with company"
+ SQL="select * from EMPLOYEE left outer join COMPANY on EMPLOYEE.ID = COMPANY.EOTMID where EMPLOYEE.NAME=:NAME" kind = "Select">
+ <Parameter name=":NAME"/>
+ </Command>
+
+ <Command name="get employee by ID" SQL="select * from EMPLOYEE where ID=:PARAM1" kind = "Select">
+ <Parameter name=":PARAM1"/>
+ </Command>
+
+ <Command name="get all employees" SQL="select * from EMPLOYEE" kind = "Select"/>
+
+ <Command name="get companies with employee of the month"
+ SQL="select * from COMPANY left outer join EMPLOYEE on COMPANY.EOTMID = EMPLOYEE.ID" kind="Select"/>
+
+<!--
+ <Command name="get company and employee of the month"
+ SQL="select C.*, E.* from COMPANY AS C, EMPLOYEE AS E
+ where C.EOTMID = E.ID" kind = "Select">
+
+ </Command>
+ -->
+
+ <ConnectionProperties driverClassName="org.apache.derby.jdbc.EmbeddedDriver"
+ driverURL="jdbc:derby:dastest"/>
+
+ <Table name="COMPANY">
+ <Column name="ID" primaryKey="true" generated="true"/>
+ </Table>
+
+ <Table name="DEPARTMENT">
+ <Column name="ID" primaryKey="true" generated="true"/>
+ </Table>
+
+ <Table name="EMPLOYEE">
+ <Column name="ID" primaryKey="true" generated="true"/>
+ </Table>
+
+ <Relationship name="company->employee" primaryKeyTable="EMPLOYEE" foreignKeyTable="COMPANY" many="false" >
+ <KeyPair primaryKeyColumn="ID" foreignKeyColumn="EOTMID" />
+ </Relationship>
+
+</Config>
+
diff --git a/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/CustOrdersConnectionProps.xml b/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/CustOrdersConnectionProps.xml
new file mode 100644
index 0000000000..2d1fd5d20d
--- /dev/null
+++ b/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/CustOrdersConnectionProps.xml
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+
+ 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.
+ -->
+<Config xsi:noNamespaceSchemaLocation="http:///org.apache.tuscany.das.rdb/config.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+ <Command name="all customers" SQL="select * from CUSTOMER" kind="Select"/>
+
+ <Command name="customer and orders"
+ SQL="select * from CUSTOMER left join ANORDER on CUSTOMER.ID = ANORDER.CUSTOMER_ID where CUSTOMER.ID = :ID"
+ kind="Select">
+ <Parameter name=":ID"/>
+ </Command>
+
+ <Command name="customer and orders"
+ SQL="select * from CUSTOMER left join ANORDER on CUSTOMER.ID = ANORDER.CUSTOMER_ID where CUSTOMER.ID = :ID"
+ kind="Select">
+ <Parameter name=":ID"/>
+ </Command>
+
+ <!-- Test usage of '?' rather than named parameter -->
+ <Command name="order by id with ?" SQL="select * from ANORDER where ANORDER.ID = ?"
+ kind="Select">
+ <Parameter name=":ID"/>
+ </Command>
+
+ <Command name="update customer"
+ SQL="update CUSTOMER set LASTNAME = 'Pavick' where ID = :ID"
+ kind="Update">
+ <Parameter name=":ID"/>
+ </Command>
+
+ <ConnectionProperties driverClassName="org.apache.derby.jdbc.EmbeddedDriver"
+ driverURL="jdbc:derby:dastest"/>
+
+ <Table name="CUSTOMER">
+ <Column name="ID" primaryKey="true"/>
+ </Table>
+
+ <Table name="ANORDER">
+ <Column name="ID" primaryKey="true"/>
+ </Table>
+
+ <Relationship name="orders" primaryKeyTable="CUSTOMER"
+ foreignKeyTable="ANORDER" many="true">
+ <KeyPair primaryKeyColumn="ID" foreignKeyColumn="CUSTOMER_ID"/>
+ </Relationship>
+
+</Config>
diff --git a/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/CustomerConfigWithConverter.xml b/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/CustomerConfigWithConverter.xml
new file mode 100644
index 0000000000..24fce847de
--- /dev/null
+++ b/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/CustomerConfigWithConverter.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+
+ 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.
+ -->
+<Config xsi:noNamespaceSchemaLocation="http:///org.apache.tuscany.das.rdb/config.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+ <Table name="CUSTOMER">
+ <Column name="ID" primaryKey="true"/>
+ <Column name="LASTNAME" converterClassName="org.apache.tuscany.das.rdb.test.mappings.SillyDateStringConverter"/>
+ </Table>
+
+</Config>
diff --git a/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/CustomerConfigWithIDConverter.xml b/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/CustomerConfigWithIDConverter.xml
new file mode 100644
index 0000000000..68a4eeca07
--- /dev/null
+++ b/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/CustomerConfigWithIDConverter.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+
+ 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.
+ -->
+<Config xsi:noNamespaceSchemaLocation="http:///org.apache.tuscany.das.rdb/config.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+ <Table name="CUSTOMER">
+ <Column name="ID" converterClassName="org.apache.tuscany.das.rdb.test.mappings.StringToLongConverter"/>
+ </Table>
+
+</Config>
diff --git a/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/CustomersOrdersConfig.xml b/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/CustomersOrdersConfig.xml
new file mode 100644
index 0000000000..5146bcaab1
--- /dev/null
+++ b/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/CustomersOrdersConfig.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+
+ 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.
+ -->
+<Config xsi:noNamespaceSchemaLocation="http:///org.apache.tuscany.das.rdb/config.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+ <Command name="all customers" SQL="select * from CUSTOMER" kind="Select"/>
+
+ <Command name="customer and orders"
+ SQL="select * from CUSTOMER left join ANORDER on CUSTOMER.ID = ANORDER.CUSTOMER_ID where CUSTOMER.ID = :ID"
+ kind="Select">
+ <Parameter name=":ID"/>
+ </Command>
+
+ <Command name="order by id" SQL="select * from ANORDER where ANORDER.ID = :ID"
+ kind="Select">
+ <Parameter name=":ID"/>
+ </Command>
+
+ <Table name="CUSTOMER">
+ <Column name="ID" primaryKey="true"/>
+ </Table>
+
+ <Table name="ANORDER">
+ <Column name="ID" primaryKey="true"/>
+ </Table>
+
+ <Relationship name="orders" primaryKeyTable="CUSTOMER"
+ foreignKeyTable="ANORDER" many="true">
+ <KeyPair primaryKeyColumn="ID" foreignKeyColumn="CUSTOMER_ID"/>
+ </Relationship>
+
+</Config>
diff --git a/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/OrdersOrderDetailsConfig.xml b/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/OrdersOrderDetailsConfig.xml
new file mode 100644
index 0000000000..356226747f
--- /dev/null
+++ b/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/OrdersOrderDetailsConfig.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+
+ 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.
+ -->
+<Config xsi:noNamespaceSchemaLocation="http:///org.apache.tuscany.das.rdb/config.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+ <Table name="ORDERDETAILS">
+ <Column name="ORDERID" primaryKey="true"/>
+ <Column name="PRODUCTID" primaryKey="true"/>
+ </Table>
+
+
+ <Relationship name="ORDERDETAILS" primaryKeyTable="ANORDER"
+ foreignKeyTable="ORDERDETAILS" many="true">
+ <KeyPair primaryKeyColumn="ID" foreignKeyColumn="ORDERID"/>
+ </Relationship>
+
+</Config>
diff --git a/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/PartsConfig.xml b/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/PartsConfig.xml
new file mode 100644
index 0000000000..06375dabef
--- /dev/null
+++ b/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/PartsConfig.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+
+ 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.
+ -->
+<Config xsi:noNamespaceSchemaLocation="http:///org.apache.tuscany.das.rdb/config.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+ <Table name="PART">
+ <Column name="ID" primaryKey="true"/>
+ </Table>
+
+ <Relationship name="subparts" primaryKeyTable="PART" foreignKeyTable="PART" many="true">
+ <KeyPair primaryKeyColumn="ID" foreignKeyColumn="PARENT_ID"/>
+ </Relationship>
+
+</Config>
diff --git a/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/basicCompanyDepartmentMapping.xml b/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/basicCompanyDepartmentMapping.xml
new file mode 100644
index 0000000000..205d0d68b6
--- /dev/null
+++ b/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/basicCompanyDepartmentMapping.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+
+ 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.
+ -->
+<Config xsi:noNamespaceSchemaLocation="http:///org.apache.tuscany.das.rdb/config.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+ <Table name="COMPANY">
+ <Column name="ID" primaryKey="true" generated="true"/>
+ <Column name="NAME"/>
+ </Table>
+
+ <Table name="DEPARTMENT">
+ <Column name="ID" primaryKey="true" generated="true"/>
+ <Column name="NAME"/>
+ <Column name="NUMBER"/>
+ <Column name="COMPANYID"/>
+ <Column name="EOTM"/>
+ </Table>
+
+ <Relationship name="departments" primaryKeyTable="COMPANY" foreignKeyTable="DEPARTMENT" many="true">
+ <KeyPair primaryKeyColumn="ID" foreignKeyColumn="COMPANYID"/>
+ </Relationship>
+
+</Config>
diff --git a/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/basicCompanyMapping.xml b/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/basicCompanyMapping.xml
new file mode 100644
index 0000000000..885ad383ca
--- /dev/null
+++ b/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/basicCompanyMapping.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+
+ 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.
+ -->
+<Config xsi:noNamespaceSchemaLocation="http:///org.apache.tuscany.das.rdb/config.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <Table name="COMPANY">
+ <Column name="ID" primaryKey="true" generated="true"/>
+ <Column name="NAME"/>
+ </Table>
+</Config>
diff --git a/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/basicCustomerMapping.xml b/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/basicCustomerMapping.xml
new file mode 100644
index 0000000000..203a6333ac
--- /dev/null
+++ b/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/basicCustomerMapping.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+
+ 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.
+ -->
+<Config xsi:noNamespaceSchemaLocation="http:///org.apache.tuscany.das.rdb/config.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+ <Table name="CUSTOMER">
+ <Column name="ID" primaryKey="true"/>
+ <Column name="LASTNAME"/>
+ <Column name="ADDRESS"/>
+ </Table>
+
+</Config>
diff --git a/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/basicCustomerMappingWithCUD.xml b/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/basicCustomerMappingWithCUD.xml
new file mode 100644
index 0000000000..8bfd146504
--- /dev/null
+++ b/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/basicCustomerMappingWithCUD.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+
+ 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.
+ -->
+<Config xsi:noNamespaceSchemaLocation="http:///org.apache.tuscany.das.rdb/config.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+ <Table name="CUSTOMER"
+ create="insert into customer values (:ID, :LASTNAME, :ADDRESS)"
+ update="update customer set lastname = :LASTNAME, address = :ADDRESS where ID = :ID"
+ delete="delete from customer where ID = :ID">
+ <Column name="ID" primaryKey="true"/>
+ <Column name="LASTNAME"/>
+ <Column name="ADDRESS"/>
+ </Table>
+
+</Config>
diff --git a/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/basicCustomerMappingWithInvalidCUD.xml b/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/basicCustomerMappingWithInvalidCUD.xml
new file mode 100644
index 0000000000..189286c91c
--- /dev/null
+++ b/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/basicCustomerMappingWithInvalidCUD.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+
+ 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.
+ -->
+<Config xsi:noNamespaceSchemaLocation="http:///org.apache.tuscany.das.rdb/config.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+ <Table name="CUSTOMER"
+ create="insert into customer blah values (:ID, :LASTNAME, :ADDRESS)"
+ update="update customer blah set lastname = :LASTNAME, address = :ADDRESS where ID = :ID"
+ delete="delete from customer blah where ID = :ID">
+ <Column name="ID" primaryKey="true"/>
+ <Column name="LASTNAME"/>
+ <Column name="ADDRESS"/>
+ </Table>
+
+</Config>
diff --git a/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/basicCustomerOrderMapping.xml b/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/basicCustomerOrderMapping.xml
new file mode 100644
index 0000000000..507ce8d5e5
--- /dev/null
+++ b/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/basicCustomerOrderMapping.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+
+ 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.
+ -->
+<Config xsi:noNamespaceSchemaLocation="http:///org.apache.tuscany.das.rdb/config.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+ <Table name="CUSTOMER">
+ <Column name="ID" primaryKey="true"/>
+ </Table>
+ <Table name="ANORDER">
+ <Column name="ID" primaryKey="true"/>
+ <Column name="CUSTOMER_ID"/>
+ </Table>
+
+ <Relationship name="orders" primaryKeyTable="CUSTOMER" foreignKeyTable="ANORDER" many="true">
+ <KeyPair primaryKeyColumn="ID" foreignKeyColumn="CUSTOMER_ID"/>
+ </Relationship>
+
+</Config>
+
diff --git a/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/basicStaticCustomer.xml b/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/basicStaticCustomer.xml
new file mode 100644
index 0000000000..1d01b284ae
--- /dev/null
+++ b/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/basicStaticCustomer.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+
+ 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.
+ -->
+<Config xsi:noNamespaceSchemaLocation="http:///org.apache.tuscany.das.rdb/config.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+ <Table name="CUSTOMER" propertyName="Customer">
+ <Column name="ID" primaryKey="true"/>
+ <Column name="LASTNAME"/>
+ <Column name="ADDRESS"/>
+ </Table>
+
+</Config>
diff --git a/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/cityStates.xml b/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/cityStates.xml
new file mode 100644
index 0000000000..63d86aafac
--- /dev/null
+++ b/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/cityStates.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+
+ 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.
+ -->
+<Config xsi:noNamespaceSchemaLocation="http:///org.apache.tuscany.das.rdb/config.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+ <Table name="STATES">
+ <Column name="ID" primaryKey="true"/>
+ <Column name="NAME"/>
+ </Table>
+
+ <Table name="CITIES">
+
+ <Column name="ID" primaryKey="true"/>
+ <Column name="NAME"/>
+ <Column name="STATE_ID"/>
+
+ </Table>
+
+ <Relationship name="cities" primaryKeyTable="STATES" foreignKeyTable="CITIES" many="true">
+ <KeyPair primaryKeyColumn="ID" foreignKeyColumn="STATE_ID"/>
+ </Relationship>
+
+
+</Config>
diff --git a/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/company.ecore b/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/company.ecore
new file mode 100644
index 0000000000..888acdf1c3
--- /dev/null
+++ b/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/company.ecore
@@ -0,0 +1,130 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ecore:EPackage xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="company"
+ nsURI="org.apache.tuscany.das.rdb.test/company.xsd" nsPrefix="company">
+ <eClassifiers xsi:type="ecore:EClass" name="CompanyType">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="name" value="CompanyType"/>
+ <details key="kind" value="elementOnly"/>
+ </eAnnotations>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="departments" lowerBound="1"
+ upperBound="-1" eType="#//DepartmentType" containment="true" resolveProxies="false">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="element"/>
+ <details key="name" value="departments"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="employeeOfTheMonth" unique="false"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//IDREF">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="attribute"/>
+ <details key="name" value="employeeOfTheMonth"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="attribute"/>
+ <details key="name" value="name"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="DepartmentType">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="name" value="DepartmentType"/>
+ <details key="kind" value="elementOnly"/>
+ </eAnnotations>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="employees" lowerBound="1"
+ upperBound="-1" eType="#//EmployeeType" containment="true" resolveProxies="false">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="element"/>
+ <details key="name" value="employees"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="location" unique="false"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="attribute"/>
+ <details key="name" value="location"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="attribute"/>
+ <details key="name" value="name"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="number" unique="false"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//Int" unsettable="true">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="attribute"/>
+ <details key="name" value="number"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="DocumentRoot">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="name" value=""/>
+ <details key="kind" value="mixed"/>
+ </eAnnotations>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="mixed" unique="false" upperBound="-1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="elementWildcard"/>
+ <details key="name" value=":mixed"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="xMLNSPrefixMap" upperBound="-1"
+ eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EStringToStringMapEntry"
+ transient="true" containment="true" resolveProxies="false">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="attribute"/>
+ <details key="name" value="xmlns:prefix"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="xSISchemaLocation" upperBound="-1"
+ eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EStringToStringMapEntry"
+ transient="true" containment="true" resolveProxies="false">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="attribute"/>
+ <details key="name" value="xsi:schemaLocation"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="company" upperBound="-2"
+ eType="#//CompanyType" volatile="true" transient="true" derived="true" containment="true"
+ resolveProxies="false">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="element"/>
+ <details key="name" value="company"/>
+ <details key="namespace" value="##targetNamespace"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="EmployeeType">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="name" value="EmployeeType"/>
+ <details key="kind" value="empty"/>
+ </eAnnotations>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="manager" unique="false"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//Boolean"
+ unsettable="true">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="attribute"/>
+ <details key="name" value="manager"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="attribute"/>
+ <details key="name" value="name"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="sN" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//ID"
+ iD="true">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="attribute"/>
+ <details key="name" value="SN"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+</ecore:EPackage>
diff --git a/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/company.genmodel b/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/company.genmodel
new file mode 100644
index 0000000000..0b89c2c0c8
--- /dev/null
+++ b/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/company.genmodel
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<genmodel:GenModel xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/rdbdas2/src/test/java"
+ modelPluginID="das.tests" modelName="Company" rootExtendsInterface="" rootExtendsClass="org.eclipse.emf.ecore.sdo.impl.EDataObjectImpl"
+ rootImplementsInterface="org.eclipse.emf.ecore.sdo.InternalEDataObject" suppressEMFTypes="true"
+ suppressEMFMetaData="true" featureMapWrapperInterface="commonj.sdo.Sequence" featureMapWrapperInternalInterface="org.eclipse.emf.ecore.sdo.util.ESequence"
+ featureMapWrapperClass="org.eclipse.emf.ecore.sdo.util.BasicESequence" importerID="org.eclipse.xsd.ecore.importer">
+ <foreignModel>company.xsd</foreignModel>
+ <staticPackages>http://www.eclipse.org/emf/2003/SDO</staticPackages>
+ <modelPluginVariables>EMF_COMMONJ_SDO=org.eclipse.emf.commonj.sdo</modelPluginVariables>
+ <modelPluginVariables>EMF_ECORE_SDO=org.eclipse.emf.ecore.sdo</modelPluginVariables>
+ <genPackages prefix="Company" basePackage="org.apache.tuscany.das.rdb.test" resource="XML"
+ disposableProviderFactory="true" ecorePackage="company.ecore#/">
+ <genClasses ecoreClass="company.ecore#//CompanyType">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference company.ecore#//CompanyType/departments"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute company.ecore#//CompanyType/employeeOfTheMonth"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute company.ecore#//CompanyType/name"/>
+ </genClasses>
+ <genClasses ecoreClass="company.ecore#//DepartmentType">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference company.ecore#//DepartmentType/employees"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute company.ecore#//DepartmentType/location"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute company.ecore#//DepartmentType/name"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute company.ecore#//DepartmentType/number"/>
+ </genClasses>
+ <genClasses ecoreClass="company.ecore#//DocumentRoot">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EAttribute company.ecore#//DocumentRoot/mixed"/>
+ <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference company.ecore#//DocumentRoot/xMLNSPrefixMap"/>
+ <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference company.ecore#//DocumentRoot/xSISchemaLocation"/>
+ <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference company.ecore#//DocumentRoot/company"/>
+ </genClasses>
+ <genClasses ecoreClass="company.ecore#//EmployeeType">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute company.ecore#//EmployeeType/manager"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute company.ecore#//EmployeeType/name"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute company.ecore#//EmployeeType/sN"/>
+ </genClasses>
+ </genPackages>
+</genmodel:GenModel>
diff --git a/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/company.xsd b/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/company.xsd
new file mode 100644
index 0000000000..62004bc584
--- /dev/null
+++ b/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/company.xsd
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+
+ 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.
+ -->
+<xsd:schema targetNamespace="org.apache.tuscany.das.rdb.test/company.xsd"
+ xmlns:company="org.apache.tuscany.das.rdb.test/company.xsd"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore">
+
+ <xsd:complexType name="DatagraphRoot">
+ <xsd:sequence>
+ <xsd:element maxOccurs="unbounded" minOccurs="0" name="companies" type="company:CompanyType"/>
+ <xsd:element maxOccurs="unbounded" minOccurs="0" name="departments" type="company:DepartmentType"/>
+ <xsd:element maxOccurs="unbounded" minOccurs="0" name="employees" type="company:EmployeeType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:element name="company" type="company:CompanyType"/>
+
+ <xsd:complexType name="CompanyType">
+ <xsd:sequence>
+ <xsd:element maxOccurs="unbounded" name="departments" type="company:DepartmentType"/>
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string"/>
+ <xsd:attribute name="employeeOfTheMonth" type="xsd:IDREF" ecore:reference="EmployeeType"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="DepartmentType">
+ <xsd:sequence>
+ <xsd:element maxOccurs="unbounded" name="employees" type="company:EmployeeType"/>
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string"/>
+ <xsd:attribute name="location" type="xsd:string"/>
+ <xsd:attribute name="number" type="xsd:int"/>
+ </xsd:complexType>
+ <xsd:complexType name="EmployeeType">
+ <xsd:attribute name="name" type="xsd:string"/>
+ <xsd:attribute name="SN" type="xsd:ID"/>
+ <xsd:attribute name="manager" type="xsd:boolean"/>
+ </xsd:complexType>
+ </xsd:schema>
diff --git a/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/companyMapping.xml b/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/companyMapping.xml
new file mode 100644
index 0000000000..12b55d06f6
--- /dev/null
+++ b/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/companyMapping.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+
+ 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.
+ -->
+<Config xsi:noNamespaceSchemaLocation="http:///org.apache.tuscany.das.rdb/config.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+ <Table name="COMPANY" propertyName="CompanyType">
+ <Column name="ID" primaryKey="true"/>
+ </Table>
+
+ <Table name="DEPARTMENT" propertyName="DepartmentType">
+ <Column name="ID" primaryKey="true"/>
+ </Table>
+
+ <Table name="EMPLOYEE" propertyName="EmployeeType">
+ <Column name="ID" primaryKey="true"/>
+ </Table>
+
+ <Relationship name="departments" primaryKeyTable="COMPANY" foreignKeyTable="DEPARTMENT" many="true">
+ <KeyPair primaryKeyColumn="ID" foreignKeyColumn="COMPANYID"/>
+ </Relationship>
+
+ <Relationship name="employees" primaryKeyTable="DEPARTMENT" foreignKeyTable="EMPLOYEE" many="true">
+ <KeyPair primaryKeyColumn="ID" foreignKeyColumn="DEPARTMENTID"/>
+ </Relationship>
+
+</Config>
diff --git a/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/companyMappingWithConverters.xml b/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/companyMappingWithConverters.xml
new file mode 100644
index 0000000000..2888a495d6
--- /dev/null
+++ b/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/companyMappingWithConverters.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+
+ 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.
+ -->
+<Config xsi:noNamespaceSchemaLocation="http:///org.apache.tuscany.das.rdb/config.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+ <Table name="COMPANY" propertyName="CompanyType">
+ <Column name="ID" primaryKey="true"/>
+ </Table>
+
+ <Table name="DEPARTMENT" propertyName="DepartmentType">
+ <Column name="ID" primaryKey="true"/>
+ <Column name="NUMBER" converterClassName="org.apache.tuscany.das.rdb.test.mappings.StringToIntegerConverter"/>
+ </Table>
+
+ <Table name="EMPLOYEE" propertyName="EmployeeType">
+ <Column name="ID" primaryKey="true"/>
+ <Column name="MANAGER" converterClassName="org.apache.tuscany.das.rdb.test.mappings.IntegerToBooleanConverter"/>
+ </Table>
+
+ <Relationship name="departments" primaryKeyTable="COMPANY" foreignKeyTable="DEPARTMENT" many="true">
+ <KeyPair primaryKeyColumn="ID" foreignKeyColumn="COMPANYID"/>
+ </Relationship>
+
+ <Relationship name="employees" primaryKeyTable="DEPARTMENT" foreignKeyTable="EMPLOYEE" many="true">
+ <KeyPair primaryKeyColumn="ID" foreignKeyColumn="DEPARTMENTID"/>
+ </Relationship>
+
+</Config>
diff --git a/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/customer.ecore b/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/customer.ecore
new file mode 100644
index 0000000000..74786d8af4
--- /dev/null
+++ b/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/customer.ecore
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ecore:EPackage xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="customer"
+ nsURI="http:///org.apache.tuscany.das.rdb.test/customer.xsd" nsPrefix="customer">
+ <eClassifiers xsi:type="ecore:EClass" name="AnOrder">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="name" value="AnOrder"/>
+ <details key="kind" value="elementOnly"/>
+ </eAnnotations>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="iD" unique="false" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//Int" unsettable="true">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="element"/>
+ <details key="name" value="ID"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="product" unique="false"
+ lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="element"/>
+ <details key="name" value="Product"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="quantity" unique="false"
+ lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//Int"
+ unsettable="true">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="element"/>
+ <details key="name" value="Quantity"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="customerID" unique="false"
+ lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//Int"
+ unsettable="true">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="element"/>
+ <details key="name" value="Customer_ID"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Customer">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="name" value="Customer"/>
+ <details key="kind" value="elementOnly"/>
+ </eAnnotations>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="iD" unique="false" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//Int" unsettable="true">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="element"/>
+ <details key="name" value="ID"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="lastName" unique="false"
+ lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="element"/>
+ <details key="name" value="lastName"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="address" unique="false"
+ lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="element"/>
+ <details key="name" value="address"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="orders" lowerBound="1"
+ upperBound="-1" eType="#//AnOrder" containment="true" resolveProxies="false">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="element"/>
+ <details key="name" value="orders"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="DataGraphRoot">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="name" value="DataGraphRoot"/>
+ <details key="kind" value="elementOnly"/>
+ </eAnnotations>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="customers" upperBound="-1"
+ eType="#//Customer" containment="true" resolveProxies="false">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="element"/>
+ <details key="name" value="customers"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="orders" upperBound="-1"
+ eType="#//AnOrder" containment="true" resolveProxies="false">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="element"/>
+ <details key="name" value="orders"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+</ecore:EPackage>
diff --git a/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/customer.genmodel b/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/customer.genmodel
new file mode 100644
index 0000000000..8c1cd53e57
--- /dev/null
+++ b/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/customer.genmodel
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<genmodel:GenModel xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/rdbdas2/src"
+ modelPluginID="rdbdas2" modelName="Customer" rootExtendsInterface="" rootExtendsClass="org.eclipse.emf.ecore.sdo.impl.EDataObjectImpl"
+ rootImplementsInterface="org.eclipse.emf.ecore.sdo.InternalEDataObject" suppressEMFTypes="true"
+ suppressEMFMetaData="true" featureMapWrapperInterface="commonj.sdo.Sequence" featureMapWrapperInternalInterface="org.eclipse.emf.ecore.sdo.util.ESequence"
+ featureMapWrapperClass="org.eclipse.emf.ecore.sdo.util.BasicESequence" importerID="org.eclipse.xsd.ecore.importer">
+ <foreignModel>customer.xsd</foreignModel>
+ <staticPackages>http://www.eclipse.org/emf/2003/SDO</staticPackages>
+ <modelPluginVariables>EMF_COMMONJ_SDO=org.eclipse.emf.commonj.sdo</modelPluginVariables>
+ <modelPluginVariables>EMF_ECORE_SDO=org.eclipse.emf.ecore.sdo</modelPluginVariables>
+ <genPackages prefix="Customer" basePackage="org.apache.tuscany.das.rdb.test" resource="XML"
+ disposableProviderFactory="true" ecorePackage="customer.ecore#/">
+ <genClasses ecoreClass="customer.ecore#//AnOrder">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute customer.ecore#//AnOrder/iD"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute customer.ecore#//AnOrder/product"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute customer.ecore#//AnOrder/quantity"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute customer.ecore#//AnOrder/customerID"/>
+ </genClasses>
+ <genClasses ecoreClass="customer.ecore#//Customer">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute customer.ecore#//Customer/iD"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute customer.ecore#//Customer/lastName"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute customer.ecore#//Customer/address"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference customer.ecore#//Customer/orders"/>
+ </genClasses>
+ <genClasses ecoreClass="customer.ecore#//DataGraphRoot">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference customer.ecore#//DataGraphRoot/customers"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference customer.ecore#//DataGraphRoot/orders"/>
+ </genClasses>
+ </genPackages>
+</genmodel:GenModel>
diff --git a/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/customer.xsd b/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/customer.xsd
new file mode 100644
index 0000000000..c9e37ddd89
--- /dev/null
+++ b/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/customer.xsd
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+
+ 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.
+ -->
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:this="http:///org.apache.tuscany.das.rdb.test/customer.xsd" targetNamespace="http:///org.apache.tuscany.das.rdb.test/customer.xsd">
+ <xsd:complexType name="DataGraphRoot">
+ <xsd:sequence>
+
+ <xsd:element maxOccurs="unbounded" minOccurs="0" name="customers" type="this:Customer"/>
+ <xsd:element maxOccurs="unbounded" minOccurs="0" name="orders" type="this:AnOrder"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="Customer">
+ <xsd:sequence>
+ <xsd:element name="ID" nillable="false" type="xsd:int"/>
+ <xsd:element name="lastName" type="xsd:string"/>
+ <xsd:element name="address" type="xsd:string"/>
+ <xsd:element maxOccurs="unbounded" name="orders" type="this:AnOrder"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+
+ <!-- An Order -->
+ <xsd:complexType name="AnOrder">
+ <xsd:sequence>
+ <xsd:element name="ID" nillable="false" type="xsd:int"/>
+ <xsd:element name="Product" type="xsd:string"/>
+ <xsd:element name="Quantity" type="xsd:int"/>
+ <xsd:element name="Customer_ID" type="xsd:int"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+
+</xsd:schema>
diff --git a/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/customerMapping.xml b/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/customerMapping.xml
new file mode 100644
index 0000000000..f72f4cf1b1
--- /dev/null
+++ b/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/customerMapping.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+
+ 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.
+ -->
+<Config xsi:noNamespaceSchemaLocation="http:///org.apache.tuscany.das.rdb/config.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+ <Table name="CUSTOMER" propertyName="Customer">
+ <Column name="ID" propertyName="id" primaryKey="true"/>
+ <Column name="LASTNAME" propertyName="lastname"/>
+ <Column name="ADDRESS" propertyName="address"/>
+ </Table>
+
+</Config>
diff --git a/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/customerOrderRelationshipMapping.xml b/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/customerOrderRelationshipMapping.xml
new file mode 100644
index 0000000000..14b6302e72
--- /dev/null
+++ b/sca-java-1.x/tags/java-M1-final/java/das/rdb/src/test/resources/customerOrderRelationshipMapping.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+
+ 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.
+ -->
+<Config xsi:noNamespaceSchemaLocation="http:///org.apache.tuscany.das.rdb/config.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+ <Table name="CUSTOMER">
+ <Column name="ID" primaryKey="true"/>
+ </Table>
+ <Table name="ANORDER">
+ <Column name="ID" primaryKey="true"/>
+ </Table>
+
+ <Relationship name="orders" primaryKeyTable="CUSTOMER" foreignKeyTable="ANORDER" many="true">
+ <KeyPair primaryKeyColumn="ID" foreignKeyColumn="CUSTOMER_ID"/>
+ </Relationship>
+
+</Config>
+