summaryrefslogtreecommitdiffstats
path: root/das-java/trunk/rdb/src/test/resources
diff options
context:
space:
mode:
Diffstat (limited to 'das-java/trunk/rdb/src/test/resources')
-rw-r--r--das-java/trunk/rdb/src/test/resources/1xM_mapping_no_cud.xml36
-rw-r--r--das-java/trunk/rdb/src/test/resources/BooksConfig.xml30
-rw-r--r--das-java/trunk/rdb/src/test/resources/BooksConfigWithAlias.xml36
-rw-r--r--das-java/trunk/rdb/src/test/resources/CompanyConfig.xml43
-rw-r--r--das-java/trunk/rdb/src/test/resources/CompanyEmployeeConfig.xml54
-rw-r--r--das-java/trunk/rdb/src/test/resources/CustomerConfig.xml24
-rw-r--r--das-java/trunk/rdb/src/test/resources/CustomerConfigWithConverter.xml33
-rw-r--r--das-java/trunk/rdb/src/test/resources/CustomerConfigWithConverter2.xml29
-rw-r--r--das-java/trunk/rdb/src/test/resources/CustomerConfigWithIDConverter.xml32
-rw-r--r--das-java/trunk/rdb/src/test/resources/CustomersOrdersConfig.xml51
-rw-r--r--das-java/trunk/rdb/src/test/resources/CustomersOrdersConfigProps.xml53
-rw-r--r--das-java/trunk/rdb/src/test/resources/CustomersOrdersRelationship.xml53
-rw-r--r--das-java/trunk/rdb/src/test/resources/InvalidConfig1.xml32
-rw-r--r--das-java/trunk/rdb/src/test/resources/InvalidConverter.xml36
-rw-r--r--das-java/trunk/rdb/src/test/resources/ManagedBooksConfig.xml30
-rw-r--r--das-java/trunk/rdb/src/test/resources/MissingPK.xml59
-rw-r--r--das-java/trunk/rdb/src/test/resources/MissingPKREL.xml63
-rw-r--r--das-java/trunk/rdb/src/test/resources/MultiSchemaDasConfig1.xml36
-rw-r--r--das-java/trunk/rdb/src/test/resources/MultiSchemaDasConfig12.xml33
-rw-r--r--das-java/trunk/rdb/src/test/resources/MultiSchemaDasConfig13.xml34
-rw-r--r--das-java/trunk/rdb/src/test/resources/MultiSchemaDasConfig14.xml37
-rw-r--r--das-java/trunk/rdb/src/test/resources/MultiSchemaDasConfig2.xml45
-rw-r--r--das-java/trunk/rdb/src/test/resources/MultiSchemaDasConfig3.xml32
-rw-r--r--das-java/trunk/rdb/src/test/resources/MultiSchemaDasConfig5.xml32
-rw-r--r--das-java/trunk/rdb/src/test/resources/MultiSchemaDasConfig6.xml38
-rw-r--r--das-java/trunk/rdb/src/test/resources/MultiSchemaDasConfig7.xml26
-rw-r--r--das-java/trunk/rdb/src/test/resources/MultiSchemaDasConfig8.xml34
-rw-r--r--das-java/trunk/rdb/src/test/resources/MultiSchemaDasConfig9.xml30
-rw-r--r--das-java/trunk/rdb/src/test/resources/MultiSchemaInvalidDasConfig.xml47
-rw-r--r--das-java/trunk/rdb/src/test/resources/OneToOneNonRestrictedConfig.xml51
-rw-r--r--das-java/trunk/rdb/src/test/resources/OneToOneRestrictedConfig.xml69
-rw-r--r--das-java/trunk/rdb/src/test/resources/OrderDetailsAndDescription.xml35
-rw-r--r--das-java/trunk/rdb/src/test/resources/OrdersOrderDetailsConfig.xml36
-rw-r--r--das-java/trunk/rdb/src/test/resources/PartsConfig.xml50
-rw-r--r--das-java/trunk/rdb/src/test/resources/SINGER.xsd39
-rw-r--r--das-java/trunk/rdb/src/test/resources/asciifile.txt1
-rw-r--r--das-java/trunk/rdb/src/test/resources/basicCompanyDepartmentMapping.xml39
-rw-r--r--das-java/trunk/rdb/src/test/resources/basicCompanyMapping.xml25
-rw-r--r--das-java/trunk/rdb/src/test/resources/basicCustomerMapping.xml29
-rw-r--r--das-java/trunk/rdb/src/test/resources/basicCustomerMappingWithCUD.xml44
-rw-r--r--das-java/trunk/rdb/src/test/resources/basicCustomerMappingWithCUD2.xml46
-rw-r--r--das-java/trunk/rdb/src/test/resources/basicCustomerMappingWithInvalidCUD.xml48
-rw-r--r--das-java/trunk/rdb/src/test/resources/basicCustomerOrderMapping.xml35
-rw-r--r--das-java/trunk/rdb/src/test/resources/basicStaticCustomer.xml28
-rw-r--r--das-java/trunk/rdb/src/test/resources/cityStates.xml40
-rw-r--r--das-java/trunk/rdb/src/test/resources/company.xsd52
-rw-r--r--das-java/trunk/rdb/src/test/resources/companyMapping.xml42
-rw-r--r--das-java/trunk/rdb/src/test/resources/companyMappingWithConverters.xml51
-rw-r--r--das-java/trunk/rdb/src/test/resources/companyMappingWithResultDescriptor.xml57
-rw-r--r--das-java/trunk/rdb/src/test/resources/companynoid.xsd49
-rw-r--r--das-java/trunk/rdb/src/test/resources/companynoidMappingWithConverters.xml44
-rw-r--r--das-java/trunk/rdb/src/test/resources/connectionInfoDriverManagerAuth.xml33
-rw-r--r--das-java/trunk/rdb/src/test/resources/connectionInfoDriverManagerNoAuth.xml31
-rw-r--r--das-java/trunk/rdb/src/test/resources/customer.xsd43
-rw-r--r--das-java/trunk/rdb/src/test/resources/customerMapping.xml28
-rw-r--r--das-java/trunk/rdb/src/test/resources/customerMappingWithResultDescriptor.xml31
-rw-r--r--das-java/trunk/rdb/src/test/resources/customerOrderRelationshipMapping.xml34
-rw-r--r--das-java/trunk/rdb/src/test/resources/moin-www.pngbin0 -> 150 bytes
-rw-r--r--das-java/trunk/rdb/src/test/resources/namedParameter.xml73
-rw-r--r--das-java/trunk/rdb/src/test/resources/passiveConnection.xml26
-rw-r--r--das-java/trunk/rdb/src/test/resources/staticCustomer.xml23
-rw-r--r--das-java/trunk/rdb/src/test/resources/staticCustomerOrder.xml36
-rw-r--r--das-java/trunk/rdb/src/test/resources/staticInvalid.xml23
-rw-r--r--das-java/trunk/rdb/src/test/resources/storedProcTest.xml27
64 files changed, 2436 insertions, 0 deletions
diff --git a/das-java/trunk/rdb/src/test/resources/1xM_mapping_no_cud.xml b/das-java/trunk/rdb/src/test/resources/1xM_mapping_no_cud.xml
new file mode 100644
index 0000000000..95267de08b
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/1xM_mapping_no_cud.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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 xmlns="http:///org.apache.tuscany.das.rdb/config.xsd">
+
+ <Table tableName="CUSTOMER" typeName="Customer">
+ <Column columnName="ID" propertyName="ID" primaryKey="true"/>
+ </Table>
+
+ <Table tableName="ANORDER" typeName="AnOrder">
+ <Column columnName="CUSTOMER_ID" propertyName="Customer_ID"/>
+ <Column columnName="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/das-java/trunk/rdb/src/test/resources/BooksConfig.xml b/das-java/trunk/rdb/src/test/resources/BooksConfig.xml
new file mode 100644
index 0000000000..2da86cbdb2
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/BooksConfig.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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 xmlns="http:///org.apache.tuscany.das.rdb/config.xsd">
+
+ <Command name="select book 1" SQL="select * from BOOK where BOOK_ID = 1" kind="Select"/>
+ <Command name="update book 1" SQL="update BOOK set OCC = ? where BOOK_ID = 1" kind="Update"/>
+
+ <Table tableName="BOOK">
+ <Column columnName="BOOK_ID" primaryKey="true"/>
+ <Column columnName="OCC" collision="true" propertyName="anOccColumn"/>
+ </Table>
+
+</Config>
diff --git a/das-java/trunk/rdb/src/test/resources/BooksConfigWithAlias.xml b/das-java/trunk/rdb/src/test/resources/BooksConfigWithAlias.xml
new file mode 100644
index 0000000000..91bdccfac5
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/BooksConfigWithAlias.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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 xmlns="http:///org.apache.tuscany.das.rdb/config.xsd">
+
+ <Command name="get all books" SQL="SELECT * FROM BOOK" kind="Select"/>
+
+ <Command name="get Cat in the Hat" SQL="SELECT * FROM BOOK WHERE NAME = 'Cat in the Hat'" kind="Select"/>
+
+ <Command name="get book by ID" SQL="SELECT * FROM BOOK WHERE BOOK.BOOK_ID = ?" kind="Select"/>
+
+
+
+ <Table tableName="BOOK" typeName="Book">
+ <Column columnName="BOOK_ID" primaryKey="true"/>
+ <Column columnName="AUTHOR" propertyName="Writer"/>
+ <Column columnName="OCC" collision="true"/>
+ </Table>
+
+</Config>
diff --git a/das-java/trunk/rdb/src/test/resources/CompanyConfig.xml b/das-java/trunk/rdb/src/test/resources/CompanyConfig.xml
new file mode 100644
index 0000000000..793697c314
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/CompanyConfig.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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 xmlns="http:///org.apache.tuscany.das.rdb/config.xsd">
+
+ <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 = ?" 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 = ?" kind="Select"/>
+
+ <Table tableName="COMPANY">
+ <Column columnName="ID" primaryKey="true" generated="true"/>
+ </Table>
+
+ <Table tableName="DEPARTMENT">
+ <Column columnName="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/das-java/trunk/rdb/src/test/resources/CompanyEmployeeConfig.xml b/das-java/trunk/rdb/src/test/resources/CompanyEmployeeConfig.xml
new file mode 100644
index 0000000000..0e25268afa
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/CompanyEmployeeConfig.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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 xmlns="http:///org.apache.tuscany.das.rdb/config.xsd">
+
+ <Command name="get all companies" SQL="select * from COMPANY" kind = "Select"/>
+
+ <Command name="get named employee" SQL="select * from EMPLOYEE where NAME= ?" kind = "Select"/>
+
+ <Command name="get named employee with company"
+ SQL="select * from EMPLOYEE left outer join COMPANY on EMPLOYEE.ID = COMPANY.EOTMID where EMPLOYEE.NAME= ?" kind = "Select"/>
+
+ <Command name="get employee by ID" SQL="select * from EMPLOYEE where ID= ?" kind = "Select"/>
+
+ <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"/>
+
+
+ <Table tableName="COMPANY">
+ <Column columnName="ID" primaryKey="true" generated="true"/>
+ </Table>
+
+ <Table tableName="DEPARTMENT">
+ <Column columnName="ID" primaryKey="true" generated="true"/>
+ </Table>
+
+ <Table tableName="EMPLOYEE">
+ <Column columnName="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/das-java/trunk/rdb/src/test/resources/CustomerConfig.xml b/das-java/trunk/rdb/src/test/resources/CustomerConfig.xml
new file mode 100644
index 0000000000..ed544f39dd
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/CustomerConfig.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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 xmlns="http:///org.apache.tuscany.das.rdb/config.xsd">
+
+ <Command name="getCustomer" SQL="Select * from CUSTOMER where ID = ?" kind="Select"/>
+
+</Config>
diff --git a/das-java/trunk/rdb/src/test/resources/CustomerConfigWithConverter.xml b/das-java/trunk/rdb/src/test/resources/CustomerConfigWithConverter.xml
new file mode 100644
index 0000000000..b38922b53a
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/CustomerConfigWithConverter.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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 xmlns="http:///org.apache.tuscany.das.rdb/config.xsd">
+
+ <Command name="testArbitraryConverter" SQL="Select * from CUSTOMER where ID = 1" kind="Select">
+ <ResultDescriptor columnName="ID" tableName="CUSTOMER" columnType="commonj.sdo.IntObject"/>
+ <ResultDescriptor columnName="LASTNAME" tableName="CUSTOMER" columnType="commonj.sdo.Date"/>
+ <ResultDescriptor columnName="ADDRESS" tableName="CUSTOMER" columnType="commonj.sdo.String"/>
+ </Command>
+
+ <Table tableName="CUSTOMER">
+ <Column columnName="ID" primaryKey="true"/>
+ <Column columnName="LASTNAME" converterClassName="org.apache.tuscany.das.rdb.test.mappings.SillyDateStringConverter"/>
+ </Table>
+
+</Config>
diff --git a/das-java/trunk/rdb/src/test/resources/CustomerConfigWithConverter2.xml b/das-java/trunk/rdb/src/test/resources/CustomerConfigWithConverter2.xml
new file mode 100644
index 0000000000..bb49a414c4
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/CustomerConfigWithConverter2.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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 xmlns="http:///org.apache.tuscany.das.rdb/config.xsd">
+
+ <Command name="getFirstCustomer" SQL="Select * from CUSTOMER where ID = 1" kind="Select"/>
+
+ <Table tableName="CUSTOMER">
+ <Column columnName="ID" primaryKey="true"/>
+ <Column columnName="LASTNAME" converterClassName="org.apache.tuscany.das.rdb.test.mappings.StringObfuscationConverter"/>
+ </Table>
+
+</Config>
diff --git a/das-java/trunk/rdb/src/test/resources/CustomerConfigWithIDConverter.xml b/das-java/trunk/rdb/src/test/resources/CustomerConfigWithIDConverter.xml
new file mode 100644
index 0000000000..9a567b7ea8
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/CustomerConfigWithIDConverter.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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 xmlns="http:///org.apache.tuscany.das.rdb/config.xsd">
+
+ <Command name="literal" SQL="Select 99, 'Roosevelt', '1600 Pennsylvania Avenue' from customer" kind="Select">
+ <ResultDescriptor columnName="ID" tableName="CUSTOMER" columnType="commonj.sdo.Long"/>
+ <ResultDescriptor columnName="LASTNAME" tableName="CUSTOMER" columnType="commonj.sdo.String"/>
+ <ResultDescriptor columnName="ADDRESS" tableName="CUSTOMER" columnType="commonj.sdo.String"/>
+ </Command>
+
+ <Table tableName="CUSTOMER">
+ <Column columnName="ID" converterClassName="org.apache.tuscany.das.rdb.test.mappings.StringToLongConverter"/>
+ </Table>
+
+</Config>
diff --git a/das-java/trunk/rdb/src/test/resources/CustomersOrdersConfig.xml b/das-java/trunk/rdb/src/test/resources/CustomersOrdersConfig.xml
new file mode 100644
index 0000000000..323c8cb6ba
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/CustomersOrdersConfig.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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 xmlns="http:///org.apache.tuscany.das.rdb/config.xsd">
+
+ <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 = ?"
+ kind="Select">
+ </Command>
+
+ <Command name="order by id" SQL="select * from ANORDER where ANORDER.ID = ?"
+ kind="Select">
+ </Command>
+
+ <Command name="update customer"
+ SQL="update CUSTOMER set LASTNAME = 'Pavick' where ID = ?"
+ kind="Update">
+ </Command>
+
+ <Table tableName="CUSTOMER">
+ <Column columnName="ID" primaryKey="true"/>
+ </Table>
+
+ <Table tableName="ANORDER">
+ <Column columnName="ID" primaryKey="true"/>
+ </Table>
+
+ <Relationship name="orders" primaryKeyTable="CUSTOMER"
+ foreignKeyTable="ANORDER" many="true">
+ <KeyPair primaryKeyColumn="ID" foreignKeyColumn="CUSTOMER_ID"/>
+ </Relationship>
+
+</Config>
diff --git a/das-java/trunk/rdb/src/test/resources/CustomersOrdersConfigProps.xml b/das-java/trunk/rdb/src/test/resources/CustomersOrdersConfigProps.xml
new file mode 100644
index 0000000000..992cf3fa3e
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/CustomersOrdersConfigProps.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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 xmlns="http:///org.apache.tuscany.das.rdb/config.xsd">
+
+ <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 = ?"
+ kind="Select">
+ </Command>
+
+ <Command name="order by id" SQL="select * from ANORDER where ANORDER.ID = ?"
+ kind="Select">
+ </Command>
+
+ <Command name="update customer"
+ SQL="update CUSTOMER set LASTNAME = 'Pavick' where ID = ?"
+ kind="Update">
+ </Command>
+
+ <Table tableName="CUSTOMER" typeName="Customer">
+ <Column columnName="ID" propertyName="ID" primaryKey="true"/>
+ <Column columnName="LASTNAME" propertyName="lastName"/>
+ <Column columnName="ADDRESS" propertyName="address"/>
+ </Table>
+
+ <Table tableName="ANORDER">
+ <Column columnName="ID" primaryKey="true"/>
+ </Table>
+
+ <Relationship name="orders" primaryKeyTable="CUSTOMER"
+ foreignKeyTable="ANORDER" many="true">
+ <KeyPair primaryKeyColumn="ID" foreignKeyColumn="CUSTOMER_ID"/>
+ </Relationship>
+
+</Config>
diff --git a/das-java/trunk/rdb/src/test/resources/CustomersOrdersRelationship.xml b/das-java/trunk/rdb/src/test/resources/CustomersOrdersRelationship.xml
new file mode 100644
index 0000000000..d91460052d
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/CustomersOrdersRelationship.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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 xmlns="http:///org.apache.tuscany.das.rdb/config.xsd">
+
+ <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 = ?"
+ kind="Select">
+ </Command>
+
+ <Command name="order by id" SQL="select * from ANORDER where ANORDER.ID = ?"
+ kind="Select">
+ </Command>
+
+ <Command name="update customer"
+ SQL="update CUSTOMER set LASTNAME = 'Pavick' where ID = ?"
+ kind="Update">
+ </Command>
+
+ <Table tableName="CUSTOMER" typeName="Customer">
+ <Column columnName="ID" propertyName="id" primaryKey="true"/>
+ <Column columnName="LASTNAME" propertyName="lastName"/>
+ <Column columnName="ADDRESS" propertyName="address"/>
+ </Table>
+
+ <Table tableName="ANORDER" typeName="AnOrder">
+ <Column columnName="ID" propertyName="OrderId" primaryKey="true"/>
+ </Table>
+
+ <Relationship name="orders" primaryKeyTable="CUSTOMER"
+ foreignKeyTable="ANORDER" many="true">
+ <KeyPair primaryKeyColumn="ID" foreignKeyColumn="CUSTOMER_ID"/>
+ </Relationship>
+
+</Config>
diff --git a/das-java/trunk/rdb/src/test/resources/InvalidConfig1.xml b/das-java/trunk/rdb/src/test/resources/InvalidConfig1.xml
new file mode 100644
index 0000000000..fa1e353281
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/InvalidConfig1.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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 xmlns="http:///org.apache.tuscany.das.rdb/config.xsd">
+
+ <Table tableName="ORDERDETAILS">
+ <Column columnName="ORDERID" primaryKey="true"/>
+ <Column columnName="PRODUCTID" primaryKey="true"/>
+ </Table>
+
+ <Relationship name="ORDERDETAILS" primaryKeyTable="xxx"
+ foreignKeyTable="ORDERDETAILS" many="true">
+ <KeyPair primaryKeyColumn="ID" foreignKeyColumn="ORDERID"/>
+ </Relationship>
+
+</Config> \ No newline at end of file
diff --git a/das-java/trunk/rdb/src/test/resources/InvalidConverter.xml b/das-java/trunk/rdb/src/test/resources/InvalidConverter.xml
new file mode 100644
index 0000000000..e6c15ad11f
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/InvalidConverter.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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 xmlns="http:///org.apache.tuscany.das.rdb/config.xsd" dataObjectModel="http:///org.apache.tuscany.das.rdb.test/customer.xsd">
+
+ <Table tableName="CUSTOMER" typeName="Customer">
+ <Column columnName="ID" primaryKey="true" converterClassName="not.a.valid.class"/>
+ </Table>
+
+ <Table tableName="ANORDER" typeName="AnOrder">
+ <Column columnName="CUSTOMER_ID"/>
+ <Column columnName="ID" primaryKey="true"/>
+ </Table>
+
+ <Relationship name="orders" primaryKeyTable="CUSTOMER" foreignKeyTable="ANORDER" many="true">
+ <KeyPair primaryKeyColumn="ID" foreignKeyColumn="CUSTOMER_ID"/>
+ </Relationship>
+
+</Config>
+
diff --git a/das-java/trunk/rdb/src/test/resources/ManagedBooksConfig.xml b/das-java/trunk/rdb/src/test/resources/ManagedBooksConfig.xml
new file mode 100644
index 0000000000..c2b833d2bf
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/ManagedBooksConfig.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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 xmlns="http:///org.apache.tuscany.das.rdb/config.xsd">
+
+ <Command name="select book 1" SQL="select * from BOOK where BOOK_ID = 1" kind="Select"/>
+ <Command name="update book 1" SQL="update BOOK set OCC = ? where BOOK_ID = 1" kind="Update"/>
+
+ <Table tableName="BOOK">
+ <Column columnName="BOOK_ID" primaryKey="true"/>
+ <Column columnName="OCC" collision="true" managed="true"/>
+ </Table>
+
+</Config>
diff --git a/das-java/trunk/rdb/src/test/resources/MissingPK.xml b/das-java/trunk/rdb/src/test/resources/MissingPK.xml
new file mode 100644
index 0000000000..a236f4b0e9
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/MissingPK.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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 xmlns="http:///org.apache.tuscany.das.rdb/config.xsd">
+ <Command name="testNullDataInPK" SQL="SELECT SINGER.ID, SINGER.NAME, SONG.ID, SONG.TITLE FROM SINGER, SONG WHERE SINGER.ID = SONG.SINGERID" kind="Select"/>
+ <Command name="testOuterJoin" SQL="SELECT SINGER.ID, SINGER.NAME, SONG.ID, SONG.TITLE FROM SINGER LEFT OUTER JOIN SONG ON SINGER.ID = SONG.SINGERID WHERE SINGER.ID = 3" kind="Select"/>
+
+ <Table tableName="SINGER">
+ <Column columnName="ID" primaryKey="true"/>
+ </Table>
+
+ <Table tableName="SONG">
+ <Column columnName="ID" primaryKey="true" />
+ </Table>
+
+ <Command name="test11" SQL="SELECT OWNER.ID, OWNER.NAME, DOG.ID, DOG.NAME FROM OWNER, DOG WHERE OWNER.ID = DOG.OWNER_ID" kind="Select"/>
+ <Command name="test22" SQL="SELECT OWNER.ID, OWNER.NAME, DOG.NAME FROM OWNER, DOG WHERE OWNER.ID = DOG.OWNER_ID" kind="Select"/>
+ <Command name="test33" SQL="SELECT OWNER.NAME, DOG.ID, DOG.NAME FROM OWNER, DOG WHERE OWNER.ID = DOG.OWNER_ID" kind="Select"/>
+ <Command name="test44" SQL="SELECT OWNER.NAME, DOG.NAME FROM OWNER, DOG WHERE OWNER.ID = DOG.OWNER_ID" kind="Select"/>
+
+ <Table tableName="OWNER">
+ <Column columnName="ID" primaryKey="true"/>
+ </Table>
+
+ <Table tableName="DOG">
+ <Column columnName="ID" primaryKey="true" />
+ </Table>
+
+ <Command name="testPartFail" SQL="SELECT PART.QUANTITY FROM PART" kind="Select"/>
+
+ <Table tableName="PART">
+ <Column columnName="ID"/>
+ </Table>
+
+ <Command name="get all books" SQL="SELECT AUTHOR FROM BOOK" kind="Select"/>
+
+ <Table tableName="BOOK" typeName="BookInfo">
+ <Column columnName="BOOK_ID" propertyName="BookID" primaryKey="true"/>
+ <Column columnName="AUTHOR" propertyName="Writer"/>
+ <Column columnName="OCC" collision="true"/>
+ </Table>
+
+</Config>
diff --git a/das-java/trunk/rdb/src/test/resources/MissingPKREL.xml b/das-java/trunk/rdb/src/test/resources/MissingPKREL.xml
new file mode 100644
index 0000000000..0efd7bf63c
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/MissingPKREL.xml
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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 xmlns="http:///org.apache.tuscany.das.rdb/config.xsd">
+ <Command name="test11" SQL="SELECT OWNER.ID, OWNER.NAME, DOG.ID, DOG.NAME FROM OWNER, DOG WHERE OWNER.ID = DOG.OWNER_ID" kind="Select"/>
+ <Command name="test22" SQL="SELECT OWNER.ID, OWNER.NAME, DOG.NAME FROM OWNER, DOG WHERE OWNER.ID = DOG.OWNER_ID" kind="Select"/>
+ <Command name="test33" SQL="SELECT OWNER.NAME, DOG.ID, DOG.NAME FROM OWNER, DOG WHERE OWNER.ID = DOG.OWNER_ID" kind="Select"/>
+ <Command name="test44" SQL="SELECT OWNER.NAME, DOG.NAME FROM OWNER, DOG WHERE OWNER.ID = DOG.OWNER_ID" kind="Select"/>
+
+ <Table tableName="OWNER">
+ <Column columnName="ID" primaryKey="true"/>
+ </Table>
+
+ <Table tableName="DOG">
+ <Column columnName="ID" primaryKey="true" />
+ </Table>
+
+ <Relationship name="owns" primaryKeyTable="OWNER" foreignKeyTable="DOG" many="true">
+ <KeyPair primaryKeyColumn="ID" foreignKeyColumn="OWNER_ID"/>
+ </Relationship>
+
+ <Command name="compound_pks" SQL="SELECT ORDERDETAILS.ORDERID, ORDERDETAILS.PRODUCTID FROM ORDERDETAILS" kind="Select"/>
+ <Command name="compound_pks_fail" SQL="SELECT ORDERDETAILS.ORDERID FROM ORDERDETAILS" kind="Select"/>
+ <Command name="compound_pks_join"
+ SQL="SELECT ORDERDETAILS.ORDERID, ORDERDETAILS.PRODUCTID, ORDERDETAILSDESC.ID FROM ORDERDETAILS,ORDERDETAILSDESC WHERE ORDERDETAILS.ORDERID=ORDERDETAILSDESC.ORDERID AND ORDERDETAILS.PRODUCTID=ORDERDETAILSDESC.PRODUCTID"
+ kind="Select">
+ </Command>
+ <Command name="compound_pks_join_fail"
+ SQL="SELECT ORDERDETAILS.ORDERID, ORDERDETAILSDESC.ID FROM ORDERDETAILS, ORDERDETAILSDESC WHERE ORDERDETAILS.ORDERID=ORDERDETAILSDESC.ORDERID AND ORDERDETAILS.PRODUCTID=ORDERDETAILSDESC.PRODUCTID"
+ kind="Select">
+ </Command>
+
+ <Table tableName="ORDERDETAILS">
+ <Column columnName="PRODUCTID" primaryKey="true"/>
+ <Column columnName="ORDERID" primaryKey="true"/>
+ </Table>
+
+ <Table tableName="ORDERDETAILSDESC">
+ <Column columnName="ID" primaryKey="true"/>
+ </Table>
+
+ <Relationship name="orderDetailsDesc" primaryKeyTable="ORDERDETAILS" foreignKeyTable="ORDERDETAILSDESC" many="true">
+ <KeyPair primaryKeyColumn="ORDERID" foreignKeyColumn="ORDERID"/>
+ <KeyPair primaryKeyColumn="PRODUCTID" foreignKeyColumn="PRODUCTID"/>
+ </Relationship>
+
+</Config>
diff --git a/das-java/trunk/rdb/src/test/resources/MultiSchemaDasConfig1.xml b/das-java/trunk/rdb/src/test/resources/MultiSchemaDasConfig1.xml
new file mode 100644
index 0000000000..2555a9ed64
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/MultiSchemaDasConfig1.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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 xmlns="http:///org.apache.tuscany.das.rdb/config.xsd" databaseSchemaNameSupported="true">
+
+ <Command name="SelectDASTEST1CUSTOMER" SQL="select * from DASTEST1.CUSTOMER" kind="Select"/>
+
+ <Command name="InsertDASTEST1CUSTOMER"
+ SQL="INSERT INTO DASTEST1.CUSTOMER VALUES (4, 'JENNYDAS', 'UKDAS')"
+ kind="Insert" />
+
+ <Command name="DeleteDASTEST1CUSTOMER"
+ SQL="DELETE FROM DASTEST1.CUSTOMER WHERE ID=4"
+ kind="Delete" />
+
+ <Table tableName="CUSTOMER" schemaName="DASTEST1" typeName="DASTEST1_CUSTOMER">
+ <Column columnName="ID" primaryKey="true"/>
+ </Table>
+
+</Config>
diff --git a/das-java/trunk/rdb/src/test/resources/MultiSchemaDasConfig12.xml b/das-java/trunk/rdb/src/test/resources/MultiSchemaDasConfig12.xml
new file mode 100644
index 0000000000..63ac8230ce
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/MultiSchemaDasConfig12.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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 xmlns="http:///org.apache.tuscany.das.rdb/config.xsd" databaseSchemaNameSupported="true">
+
+ <Command name="testArbitraryConverter" SQL="Select * from DASTEST1.EMPLOYEE where ID = 1" kind="Select">
+ <ResultDescriptor columnName="ID" schemaName="DASTEST1" tableName="EMPLOYEE" columnType="commonj.sdo.IntObject"/>
+ <ResultDescriptor columnName="LASTNAME" schemaName="DASTEST1" tableName="EMPLOYEE" columnType="commonj.sdo.Date"/>
+ <ResultDescriptor columnName="ADDRESS" schemaName="DASTEST1" tableName="EMPLOYEE" columnType="commonj.sdo.String"/>
+ </Command>
+
+ <Table tableName="EMPLOYEE" schemaName="DASTEST1">
+ <Column columnName="ID" primaryKey="true"/>
+ <Column columnName="LASTNAME" converterClassName="org.apache.tuscany.das.rdb.test.mappings.SillyDateStringConverter"/>
+ </Table>
+
+</Config>
diff --git a/das-java/trunk/rdb/src/test/resources/MultiSchemaDasConfig13.xml b/das-java/trunk/rdb/src/test/resources/MultiSchemaDasConfig13.xml
new file mode 100644
index 0000000000..6458108a63
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/MultiSchemaDasConfig13.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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 xmlns="http:///org.apache.tuscany.das.rdb/config.xsd" databaseSchemaNameSupported="true">
+
+ <Table tableName="ACCOUNT" schemaName="DASTEST2" >
+ <Column columnName="ACCOUNT_ID" primaryKey="true"/>
+ </Table>
+
+ <Table tableName="CUSTOMER" schemaName="DASTEST1" typeName="DASTEST1_CUSTOMER">
+ <Column columnName="ID" primaryKey="true"/>
+ </Table>
+
+ <Relationship name="accounts" primaryKeyTable="DASTEST1.CUSTOMER" foreignKeyTable="DASTEST2.ACCOUNT" many="true">
+ <KeyPair primaryKeyColumn="ID" foreignKeyColumn="CUSTOMER_ID"/>
+ </Relationship>
+
+</Config>
diff --git a/das-java/trunk/rdb/src/test/resources/MultiSchemaDasConfig14.xml b/das-java/trunk/rdb/src/test/resources/MultiSchemaDasConfig14.xml
new file mode 100644
index 0000000000..4b37a11138
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/MultiSchemaDasConfig14.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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 xmlns="http:///org.apache.tuscany.das.rdb/config.xsd" databaseSchemaNameSupported="true">
+
+ <Table tableName="ORDERDETAILS" schemaName="DASTEST1">
+ <Column columnName="PRODUCTID" primaryKey="true"/>
+ <Column columnName="ORDERID" primaryKey="true"/>
+ </Table>
+
+ <Table tableName="ORDERDETAILSDESC" schemaName="DASTEST3">
+ <Column columnName="ID" primaryKey="true"/>
+ </Table>
+
+ <Relationship name="orderDetailsDesc" primaryKeyTable="DASTEST1.ORDERDETAILS" foreignKeyTable="DASTEST3.ORDERDETAILSDESC" many="true">
+ <KeyPair primaryKeyColumn="ORDERID" foreignKeyColumn="ORDERID"/>
+ <KeyPair primaryKeyColumn="PRODUCTID" foreignKeyColumn="PRODUCTID"/>
+ </Relationship>
+
+
+</Config>
diff --git a/das-java/trunk/rdb/src/test/resources/MultiSchemaDasConfig2.xml b/das-java/trunk/rdb/src/test/resources/MultiSchemaDasConfig2.xml
new file mode 100644
index 0000000000..d055735590
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/MultiSchemaDasConfig2.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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 xmlns="http:///org.apache.tuscany.das.rdb/config.xsd" databaseSchemaNameSupported="true">
+
+ <Command name="SelectDASTEST2ACCOUNT"
+ SQL="SELECT * FROM DASTEST1.CUSTOMER LEFT JOIN DASTEST2.ACCOUNT ON DASTEST1.CUSTOMER.ID = DASTEST2.ACCOUNT.CUSTOMER_ID"
+ kind="Select" />
+
+ <Command name="InsertDASTEST2ACCOUNT"
+ SQL="INSERT INTO DASTEST2.ACCOUNT VALUES (50, 2, 304)"
+ kind="Insert" />
+
+ <Command name="DeleteDASTEST2ACCOUNT"
+ SQL="DELETE FROM DASTEST2.ACCOUNT WHERE ACCOUNT_ID=50" kind="Delete" />
+
+ <Table tableName="CUSTOMER" schemaName="DASTEST1" typeName="DASTEST1_CUSTOMER">
+ <Column columnName="ID" primaryKey="true"/>
+ </Table>
+
+ <Table tableName="ACCOUNT" schemaName="DASTEST2" >
+ <Column columnName="ACCOUNT_ID" primaryKey="true"/>
+ </Table>
+
+ <Relationship name="accounts" primaryKeyTable="DASTEST1.CUSTOMER" foreignKeyTable="DASTEST2.ACCOUNT" many="true">
+ <KeyPair primaryKeyColumn="ID" foreignKeyColumn="CUSTOMER_ID"/>
+ </Relationship>
+
+</Config>
diff --git a/das-java/trunk/rdb/src/test/resources/MultiSchemaDasConfig3.xml b/das-java/trunk/rdb/src/test/resources/MultiSchemaDasConfig3.xml
new file mode 100644
index 0000000000..06727c6a79
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/MultiSchemaDasConfig3.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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 xmlns="http:///org.apache.tuscany.das.rdb/config.xsd" databaseSchemaNameSupported="true">
+
+ <Command name="SelectDASTEST1CITY"
+ SQL="SELECT INDX, NAME FROM DASTEST1.CITY" kind="Select" />
+
+ <Command name="InsertDASTEST1CITY"
+ SQL="INSERT INTO DASTEST1.CITY VALUES (3, 'New York')"
+ kind="Insert" />
+
+ <Command name="DeleteDASTEST1CITY"
+ SQL="DELETE FROM DASTEST1.CITY WHERE INDX=3" kind="Delete" />
+
+ </Config>
diff --git a/das-java/trunk/rdb/src/test/resources/MultiSchemaDasConfig5.xml b/das-java/trunk/rdb/src/test/resources/MultiSchemaDasConfig5.xml
new file mode 100644
index 0000000000..6915c69576
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/MultiSchemaDasConfig5.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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 xmlns="http:///org.apache.tuscany.das.rdb/config.xsd" databaseSchemaNameSupported="true">
+
+
+ <Command name="Select2SchemasWithOneSchemaNotInConfig"
+ SQL="SELECT DASTEST1.CUSTOMER.ID, DASTEST2.CUSTOMER.ID FROM DASTEST1.CUSTOMER, DASTEST2.CUSTOMER where DASTEST1.CUSTOMER.ID = DASTEST2.CUSTOMER.ID"
+ kind="Select" />
+
+
+ <Table tableName="CUSTOMER" schemaName="DASTEST1" typeName="DASTEST1_CUSTOMER">
+ <Column columnName="ID" primaryKey="true"/>
+ </Table>
+
+</Config>
diff --git a/das-java/trunk/rdb/src/test/resources/MultiSchemaDasConfig6.xml b/das-java/trunk/rdb/src/test/resources/MultiSchemaDasConfig6.xml
new file mode 100644
index 0000000000..fd3d177ad4
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/MultiSchemaDasConfig6.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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 xmlns="http:///org.apache.tuscany.das.rdb/config.xsd" databaseSchemaNameSupported="true">
+
+
+ <Command name="Select2IDsBothInConfig"
+ SQL="SELECT DASTEST1.CUSTOMER.ID, DASTEST3.CUSTOMER.ID FROM DASTEST1.CUSTOMER, DASTEST3.CUSTOMER where DASTEST1.CUSTOMER.ID = DASTEST3.CUSTOMER.ID"
+ kind="Select" />
+
+
+ <Table tableName="CUSTOMER" schemaName="DASTEST3" typeName="DASTEST3_CUSTOMER">
+ <Column columnName="ID" primaryKey="true"/>
+ </Table>
+
+
+ <Table tableName="CUSTOMER" schemaName="DASTEST1" typeName="DASTEST1_CUSTOMER">
+ <Column columnName="ID" primaryKey="true"/>
+ </Table>
+
+
+</Config>
diff --git a/das-java/trunk/rdb/src/test/resources/MultiSchemaDasConfig7.xml b/das-java/trunk/rdb/src/test/resources/MultiSchemaDasConfig7.xml
new file mode 100644
index 0000000000..eab57c759e
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/MultiSchemaDasConfig7.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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 xmlns="http:///org.apache.tuscany.das.rdb/config.xsd" databaseSchemaNameSupported="true">
+
+ <Command name="Select2CitiesNoneInConfig"
+ SQL="SELECT DASTEST1.CITY.INDX, DASTEST1.CITY.NAME, DASTEST2.CITY.INDX, DASTEST2.CITY.NAME FROM DASTEST1.CITY, DASTEST2.CITY where DASTEST1.CITY.INDX = DASTEST2.CITY.INDX"
+ kind="Select" />
+
+</Config>
diff --git a/das-java/trunk/rdb/src/test/resources/MultiSchemaDasConfig8.xml b/das-java/trunk/rdb/src/test/resources/MultiSchemaDasConfig8.xml
new file mode 100644
index 0000000000..205010c5c6
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/MultiSchemaDasConfig8.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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 xmlns="http:///org.apache.tuscany.das.rdb/config.xsd" databaseSchemaNameSupported="true">
+
+ <Command name="ResultDescriptorAccountSelect"
+ SQL="SELECT * FROM DASTEST2.ACCOUNT"
+ kind="Select" >
+ <ResultDescriptor columnName="ACCOUNT_ID" tableName="ACCOUNT" schemaName="DASTEST2" columnType="commonj.sdo.IntObject"/>
+ <ResultDescriptor columnName="CUSTOMER_ID" tableName="ACCOUNT" schemaName="DASTEST2" columnType="commonj.sdo.IntObject"/>
+ <ResultDescriptor columnName="BALANCE" tableName="ACCOUNT" schemaName="DASTEST2" columnType="commonj.sdo.IntObject"/>
+ </Command>
+
+ <Table tableName="ACCOUNT" schemaName="DASTEST2" >
+ <Column columnName="ACCOUNT_ID" primaryKey="true"/>
+ </Table>
+
+</Config>
diff --git a/das-java/trunk/rdb/src/test/resources/MultiSchemaDasConfig9.xml b/das-java/trunk/rdb/src/test/resources/MultiSchemaDasConfig9.xml
new file mode 100644
index 0000000000..84a10531aa
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/MultiSchemaDasConfig9.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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 xmlns="http:///org.apache.tuscany.das.rdb/config.xsd" databaseSchemaNameSupported="true">
+
+ <Command name="ImpliedRelationshipSelect"
+ SQL="SELECT DASTEST2.CUSTOMER.ID, DASTEST2.ACCOUNT.CUSTOMER_ID, DASTEST2.ACCOUNT.ACCOUNT_ID FROM DASTEST2.CUSTOMER, DASTEST2.ACCOUNT where DASTEST2.CUSTOMER.ID = DASTEST2.ACCOUNT.CUSTOMER_ID"
+ kind="Select" />
+
+ <Table tableName="ACCOUNT" schemaName="DASTEST2" >
+ <Column columnName="ACCOUNT_ID" primaryKey="true"/>
+ </Table>
+
+</Config>
diff --git a/das-java/trunk/rdb/src/test/resources/MultiSchemaInvalidDasConfig.xml b/das-java/trunk/rdb/src/test/resources/MultiSchemaInvalidDasConfig.xml
new file mode 100644
index 0000000000..4658493dbd
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/MultiSchemaInvalidDasConfig.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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 xmlns="http:///org.apache.tuscany.das.rdb/config.xsd" databaseSchemaNameSupported="true">
+
+ <!-- table without schema name -->
+ <Table tableName="CUSTORDER" >
+ <Column columnName="ID" primaryKey="true"/>
+ </Table>
+
+ <Table tableName="STUDENT" schemaName="DASTEST1">
+ <Column columnName="ID" primaryKey="true"/>
+ </Table>
+
+ <Table tableName="ACCOUNT" schemaName="DASTEST2" >
+ <Column columnName="ACCOUNT_ID" primaryKey="true"/>
+ </Table>
+
+ <Table tableName="CUSTOMER" schemaName="DB2ADMIN" typeName="DB2ADMIN_CUSTOMER">
+ <Column columnName="ID" primaryKey="true"/>
+ </Table>
+
+ <Table tableName="CUSTOMER" schemaName="DASTEST1" typeName="DASTEST1_CUSTOMER">
+ <Column columnName="ID" primaryKey="true"/>
+ </Table>
+
+ <!--<Relationship name="customers" primaryKeyTable="DASTEST1.CUSTOMER" foreignKeyTable="DASTEST2.ACCOUNT" many="true">
+ <KeyPair primaryKeyColumn="ID" foreignKeyColumn="CUSTOMER_ID"/>
+ </Relationship> -->
+
+</Config>
diff --git a/das-java/trunk/rdb/src/test/resources/OneToOneNonRestrictedConfig.xml b/das-java/trunk/rdb/src/test/resources/OneToOneNonRestrictedConfig.xml
new file mode 100644
index 0000000000..a1266f43de
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/OneToOneNonRestrictedConfig.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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 xmlns="http:///org.apache.tuscany.das.rdb/config.xsd">
+ <Command name="get named employee with company"
+ SQL="select * from EMPLOYEE left outer join COMPANY on EMPLOYEE.ID = COMPANY.EOTMID where EMPLOYEE.NAME= ?" kind = "Select"/>
+
+ <Table tableName="COMPANY">
+ <Column columnName="ID" primaryKey="true" generated="true"/>
+ </Table>
+
+ <Table tableName="EMPLOYEE">
+ <Column columnName="ID" primaryKey="true" generated="true"/>
+ </Table>
+
+ <Relationship name="company" primaryKeyTable="EMPLOYEE" foreignKeyTable="COMPANY" many="false" keyRestricted="false">
+ <KeyPair primaryKeyColumn="ID" foreignKeyColumn="EOTMID" />
+ </Relationship>
+
+ <Command name="get spec with product"
+ SQL="select * from PRODUCT left outer join PRODUCTSPEC on PRODUCT.ID = PRODUCTSPEC.PRODUCT_ID where PRODUCT.NAME= ?" kind = "Select"/>
+
+ <Table tableName="PRODUCT">
+ <Column columnName="ID" primaryKey="true" generated="false"/>
+ </Table>
+
+ <Table tableName="PRODUCTSPEC">
+ <Column columnName="ID" primaryKey="true" generated="false"/>
+ </Table>
+
+ <Relationship name="prodspec" primaryKeyTable="PRODUCT" foreignKeyTable="PRODUCTSPEC" many="false" keyRestricted="false">
+ <KeyPair primaryKeyColumn="ID" foreignKeyColumn="PRODUCT_ID" />
+ </Relationship>
+
+</Config> \ No newline at end of file
diff --git a/das-java/trunk/rdb/src/test/resources/OneToOneRestrictedConfig.xml b/das-java/trunk/rdb/src/test/resources/OneToOneRestrictedConfig.xml
new file mode 100644
index 0000000000..c9ef484513
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/OneToOneRestrictedConfig.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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 xmlns="http:///org.apache.tuscany.das.rdb/config.xsd">
+
+ <Command name="get all companies" SQL="select * from COMPANY" kind = "Select"/>
+
+ <Command name="get named employee" SQL="select * from EMPLOYEE where NAME= ?" kind = "Select"/>
+
+ <Command name="get named employee with company"
+ SQL="select * from EMPLOYEE left outer join COMPANY on EMPLOYEE.ID = COMPANY.EOTMID where EMPLOYEE.NAME= ?" kind = "Select"/>
+
+ <Command name="get employee by ID" SQL="select * from EMPLOYEE where ID= ?" kind = "Select"/>
+
+ <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"/>
+
+
+ <Table tableName="COMPANY">
+ <Column columnName="ID" primaryKey="true" generated="true"/>
+ </Table>
+
+ <Table tableName="DEPARTMENT">
+ <Column columnName="ID" primaryKey="true" generated="true"/>
+ </Table>
+
+ <Table tableName="EMPLOYEE">
+ <Column columnName="ID" primaryKey="true" generated="true"/>
+ </Table>
+
+ <Relationship name="company" primaryKeyTable="EMPLOYEE" foreignKeyTable="COMPANY" many="false" keyRestricted="true">
+ <KeyPair primaryKeyColumn="ID" foreignKeyColumn="EOTMID" />
+ </Relationship>
+
+ <Command name="get spec with product"
+ SQL="select * from PRODUCT left outer join PRODUCTSPEC on PRODUCT.ID = PRODUCTSPEC.PRODUCT_ID where PRODUCT.NAME= ?" kind = "Select"/>
+
+ <Table tableName="PRODUCT">
+ <Column columnName="ID" primaryKey="true" generated="false"/>
+ </Table>
+
+ <Table tableName="PRODUCTSPEC">
+ <Column columnName="ID" primaryKey="true" generated="false"/>
+ </Table>
+
+ <Relationship name="prodspec" primaryKeyTable="PRODUCT" foreignKeyTable="PRODUCTSPEC" many="false" keyRestricted="true">
+ <KeyPair primaryKeyColumn="ID" foreignKeyColumn="PRODUCT_ID" />
+ </Relationship>
+
+</Config>
+
diff --git a/das-java/trunk/rdb/src/test/resources/OrderDetailsAndDescription.xml b/das-java/trunk/rdb/src/test/resources/OrderDetailsAndDescription.xml
new file mode 100644
index 0000000000..d5bc8d44a8
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/OrderDetailsAndDescription.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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 xmlns="http:///org.apache.tuscany.das.rdb/config.xsd">
+
+ <Table tableName="ORDERDETAILS">
+ <Column columnName="PRODUCTID" primaryKey="true"/>
+ <Column columnName="ORDERID" primaryKey="true"/>
+ </Table>
+
+ <Table tableName="ORDERDETAILSDESC">
+ <Column columnName="ID" primaryKey="true"/>
+ </Table>
+
+ <Relationship name="orderDetailsDesc" primaryKeyTable="ORDERDETAILS" foreignKeyTable="ORDERDETAILSDESC" many="true">
+ <KeyPair primaryKeyColumn="ORDERID" foreignKeyColumn="ORDERID"/>
+ <KeyPair primaryKeyColumn="PRODUCTID" foreignKeyColumn="PRODUCTID"/>
+ </Relationship>
+</Config>
diff --git a/das-java/trunk/rdb/src/test/resources/OrdersOrderDetailsConfig.xml b/das-java/trunk/rdb/src/test/resources/OrdersOrderDetailsConfig.xml
new file mode 100644
index 0000000000..2e998ee57e
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/OrdersOrderDetailsConfig.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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 xmlns="http:///org.apache.tuscany.das.rdb/config.xsd">
+
+ <Table tableName="ORDERDETAILS">
+ <Column columnName="ORDERID" primaryKey="true"/>
+ <Column columnName="PRODUCTID" primaryKey="true"/>
+ </Table>
+
+ <Table tableName="ANORDER">
+ <Column columnName="ID" primaryKey="true"/>
+ </Table>
+
+ <Relationship name="ORDERDETAILS" primaryKeyTable="ANORDER"
+ foreignKeyTable="ORDERDETAILS" many="true">
+ <KeyPair primaryKeyColumn="ID" foreignKeyColumn="ORDERID"/>
+ </Relationship>
+
+</Config>
diff --git a/das-java/trunk/rdb/src/test/resources/PartsConfig.xml b/das-java/trunk/rdb/src/test/resources/PartsConfig.xml
new file mode 100644
index 0000000000..b1809079d6
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/PartsConfig.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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 xmlns="http:///org.apache.tuscany.das.rdb/config.xsd">
+
+ <Command name="readEngineParts" kind="Select" SQL="SELECT P1.*, P2.*, P3.* FROM PART AS P1
+ LEFT JOIN PART AS P2 ON P1.ID = P2.PARENT_ID
+ LEFT JOIN PART AS P3 on P2.ID = P3.PARENT_ID WHERE P1.ID = 1">
+ <ResultDescriptor columnName="ID" columnType="commonj.sdo.IntObject" tableName="PART"/>
+ <ResultDescriptor columnName="NAME" columnType="commonj.sdo.String" tableName="PART"/>
+ <ResultDescriptor columnName="QUANTITY" columnType="commonj.sdo.IntObject" tableName="PART"/>
+ <ResultDescriptor columnName="PARENT_ID" columnType="commonj.sdo.IntObject" tableName="PART"/>
+
+ <ResultDescriptor columnName="ID" columnType="commonj.sdo.IntObject" tableName="PART"/>
+ <ResultDescriptor columnName="NAME" columnType="commonj.sdo.String" tableName="PART"/>
+ <ResultDescriptor columnName="QUANTITY" columnType="commonj.sdo.IntObject" tableName="PART"/>
+ <ResultDescriptor columnName="PARENT_ID" columnType="commonj.sdo.IntObject" tableName="PART"/>
+
+ <ResultDescriptor columnName="ID" columnType="commonj.sdo.IntObject" tableName="PART"/>
+ <ResultDescriptor columnName="NAME" columnType="commonj.sdo.String" tableName="PART"/>
+ <ResultDescriptor columnName="QUANTITY" columnType="commonj.sdo.IntObject" tableName="PART"/>
+ <ResultDescriptor columnName="PARENT_ID" columnType="commonj.sdo.IntObject" tableName="PART"/>
+
+ </Command>
+
+ <Table tableName="PART">
+ <Column columnName="ID" primaryKey="true"/>
+ </Table>
+
+ <Relationship name="subparts" primaryKeyTable="PART" foreignKeyTable="PART" many="true">
+ <KeyPair primaryKeyColumn="ID" foreignKeyColumn="PARENT_ID"/>
+ </Relationship>
+
+</Config>
diff --git a/das-java/trunk/rdb/src/test/resources/SINGER.xsd b/das-java/trunk/rdb/src/test/resources/SINGER.xsd
new file mode 100644
index 0000000000..c843929efb
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/SINGER.xsd
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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/SINGER.xsd" targetNamespace="http:///org.apache.tuscany.das.rdb.test/SINGER.xsd">
+ <!-- A Singer -->
+ <xsd:complexType name="SINGER">
+ <xsd:sequence>
+ <xsd:element name="ID" nillable="false" type="xsd:int"/>
+ <xsd:element name="NAME" type="xsd:string"/>
+ <xsd:element maxOccurs="unbounded" name="sings" type="this:SONG"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <!-- A Song -->
+ <xsd:complexType name="SONG">
+ <xsd:sequence>
+ <xsd:element name="ID" nillable="false" type="xsd:int"/>
+ <xsd:element name="TITLE" type="xsd:string"/>
+ <xsd:element name="SINGERID" type="xsd:int"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+</xsd:schema>
diff --git a/das-java/trunk/rdb/src/test/resources/asciifile.txt b/das-java/trunk/rdb/src/test/resources/asciifile.txt
new file mode 100644
index 0000000000..d3c922ab52
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/asciifile.txt
@@ -0,0 +1 @@
+this is a long file \ No newline at end of file
diff --git a/das-java/trunk/rdb/src/test/resources/basicCompanyDepartmentMapping.xml b/das-java/trunk/rdb/src/test/resources/basicCompanyDepartmentMapping.xml
new file mode 100644
index 0000000000..bd648cd2ef
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/basicCompanyDepartmentMapping.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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 xmlns="http:///org.apache.tuscany.das.rdb/config.xsd">
+
+ <Table tableName="COMPANY">
+ <Column columnName="ID" primaryKey="true" generated="true"/>
+ <Column columnName="NAME"/>
+ </Table>
+
+ <Table tableName="DEPARTMENT">
+ <Column columnName="ID" primaryKey="true" generated="true"/>
+ <Column columnName="NAME"/>
+ <Column columnName="NUMBER"/>
+ <Column columnName="COMPANYID"/>
+ <Column columnName="EOTM"/>
+ </Table>
+
+ <Relationship name="departments" primaryKeyTable="COMPANY" foreignKeyTable="DEPARTMENT" many="true">
+ <KeyPair primaryKeyColumn="ID" foreignKeyColumn="COMPANYID"/>
+ </Relationship>
+
+</Config>
diff --git a/das-java/trunk/rdb/src/test/resources/basicCompanyMapping.xml b/das-java/trunk/rdb/src/test/resources/basicCompanyMapping.xml
new file mode 100644
index 0000000000..b6ca4f9feb
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/basicCompanyMapping.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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 xmlns="http:///org.apache.tuscany.das.rdb/config.xsd">
+ <Table tableName="COMPANY">
+ <Column columnName="ID" primaryKey="true" generated="true"/>
+ <Column columnName="NAME"/>
+ </Table>
+</Config>
diff --git a/das-java/trunk/rdb/src/test/resources/basicCustomerMapping.xml b/das-java/trunk/rdb/src/test/resources/basicCustomerMapping.xml
new file mode 100644
index 0000000000..a81ca90f8e
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/basicCustomerMapping.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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 xmlns="http:///org.apache.tuscany.das.rdb/config.xsd">
+
+
+ <Table tableName="CUSTOMER">
+ <Column columnName="ID" primaryKey="true"/>
+ <Column columnName="LASTNAME"/>
+ <Column columnName="ADDRESS"/>
+ </Table>
+
+</Config>
diff --git a/das-java/trunk/rdb/src/test/resources/basicCustomerMappingWithCUD.xml b/das-java/trunk/rdb/src/test/resources/basicCustomerMappingWithCUD.xml
new file mode 100644
index 0000000000..f27a50f4f3
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/basicCustomerMappingWithCUD.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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 xmlns="http:///org.apache.tuscany.das.rdb/config.xsd">
+
+ <Table tableName="CUSTOMER">
+ <create sql="insert into customer values (?, ?, ?)" >
+ <Parameters>
+ <Parameter name="ID" index="1"/>
+ <Parameter name="LASTNAME" index="2"/>
+ <Parameter name="ADDRESS" index="3"/>
+ </Parameters>
+ </create>
+ <update sql="update customer set lastname = ?, address = ? where ID = ?" >
+ <Parameters>
+ <Parameter name="ID" index="3"/>
+ <Parameter name="LASTNAME" index="1"/>
+ <Parameter name="ADDRESS" index="2"/>
+ </Parameters>
+ </update>
+ <delete sql="delete from customer where ID = ?" >
+ <Parameters>
+ <Parameter name="ID" index="1"/>
+ </Parameters>
+ </delete>
+ </Table>
+
+</Config>
diff --git a/das-java/trunk/rdb/src/test/resources/basicCustomerMappingWithCUD2.xml b/das-java/trunk/rdb/src/test/resources/basicCustomerMappingWithCUD2.xml
new file mode 100644
index 0000000000..faddf3835b
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/basicCustomerMappingWithCUD2.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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 xmlns="http:///org.apache.tuscany.das.rdb/config.xsd">
+
+ <Table tableName="CUSTOMER">
+ <create sql="insert into customer values (?, ?, ?)" >
+ <Parameters>
+ <Parameter name="ID" index="1"/>
+ <Parameter name="LASTNAME" index="2"/>
+ <Parameter name="ADDRESS" index="3"/>
+ </Parameters>
+ </create>
+ <update sql="update customer set lastname = ? where ID = ?" >
+ <Parameters>
+ <Parameter name="ID" index="2"/>
+ <Parameter name="LASTNAME" index="1"/>
+ </Parameters>
+ </update>
+ <delete sql="delete from customer where ID = ?" >
+ <Parameters>
+ <Parameter name="ID" index="1"/>
+ </Parameters>
+ </delete>
+ <Column columnName="ID" primaryKey="true"/>
+ <Column columnName="LASTNAME"/>
+ <Column columnName="ADDRESS"/>
+ </Table>
+
+</Config>
diff --git a/das-java/trunk/rdb/src/test/resources/basicCustomerMappingWithInvalidCUD.xml b/das-java/trunk/rdb/src/test/resources/basicCustomerMappingWithInvalidCUD.xml
new file mode 100644
index 0000000000..347cd53f45
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/basicCustomerMappingWithInvalidCUD.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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 xmlns="http:///org.apache.tuscany.das.rdb/config.xsd">
+
+ <Table tableName="CUSTOMER">
+ <create sql="isnert into customer blah values (?, ?, ?)" >
+ <Parameters>
+ <Parameter name="ID" index="1"/>
+ <Parameter name="LASTNAME" index="2"/>
+ <Parameter name="ADDRESS" index="3"/>
+ </Parameters>
+ </create>
+ <update sql="udpate customer blah set lastname = ?, address = ? where ID = ?" >
+ <Parameters>
+ <Parameter name="ID" index="3"/>
+ <Parameter name="LASTNAME" index="1"/>
+ <Parameter name="ADDRESS" index="2"/>
+ </Parameters>
+ </update>
+ <delete sql="dleete from customer blah where ID = ?" >
+ <Parameters>
+ <Parameter name="ID" index="1"/>
+ </Parameters>
+ </delete>
+
+ <Column columnName="ID" primaryKey="true"/>
+ <Column columnName="LASTNAME"/>
+ <Column columnName="ADDRESS"/>
+ </Table>
+
+</Config>
diff --git a/das-java/trunk/rdb/src/test/resources/basicCustomerOrderMapping.xml b/das-java/trunk/rdb/src/test/resources/basicCustomerOrderMapping.xml
new file mode 100644
index 0000000000..c03d9392ed
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/basicCustomerOrderMapping.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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 xmlns="http:///org.apache.tuscany.das.rdb/config.xsd">
+
+ <Table tableName="CUSTOMER">
+ <Column columnName="ID" primaryKey="true"/>
+ </Table>
+ <Table tableName="ANORDER">
+ <Column columnName="ID" primaryKey="true"/>
+ <Column columnName="CUSTOMER_ID"/>
+ </Table>
+
+ <Relationship name="orders" primaryKeyTable="CUSTOMER" foreignKeyTable="ANORDER" many="true">
+ <KeyPair primaryKeyColumn="ID" foreignKeyColumn="CUSTOMER_ID"/>
+ </Relationship>
+
+</Config>
+
diff --git a/das-java/trunk/rdb/src/test/resources/basicStaticCustomer.xml b/das-java/trunk/rdb/src/test/resources/basicStaticCustomer.xml
new file mode 100644
index 0000000000..c4b4fe56af
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/basicStaticCustomer.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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 xmlns="http:///org.apache.tuscany.das.rdb/config.xsd" dataObjectModel="http:///org.apache.tuscany.das.rdb.test/customer.xsd">
+
+ <Table tableName="CUSTOMER" typeName="Customer">
+ <Column columnName="ID" primaryKey="true"/>
+ <Column columnName="LASTNAME"/>
+ <Column columnName="ADDRESS"/>
+ </Table>
+
+</Config>
diff --git a/das-java/trunk/rdb/src/test/resources/cityStates.xml b/das-java/trunk/rdb/src/test/resources/cityStates.xml
new file mode 100644
index 0000000000..1908ba4268
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/cityStates.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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 xmlns="http:///org.apache.tuscany.das.rdb/config.xsd">
+
+ <Table tableName="STATES">
+ <Column columnName="ID" primaryKey="true"/>
+ <Column columnName="NAME"/>
+ </Table>
+
+ <Table tableName="CITIES">
+
+ <Column columnName="ID" primaryKey="true"/>
+ <Column columnName="NAME"/>
+ <Column columnName="STATE_ID"/>
+
+ </Table>
+
+ <Relationship name="cities" primaryKeyTable="STATES" foreignKeyTable="CITIES" many="true">
+ <KeyPair primaryKeyColumn="ID" foreignKeyColumn="STATE_ID"/>
+ </Relationship>
+
+
+</Config>
diff --git a/das-java/trunk/rdb/src/test/resources/company.xsd b/das-java/trunk/rdb/src/test/resources/company.xsd
new file mode 100644
index 0000000000..0bf0229201
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/company.xsd
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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: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="id" type="xsd:int"/>
+ <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="id" type="xsd:int"/>
+ <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="id" type="xsd:int"/>
+ <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/das-java/trunk/rdb/src/test/resources/companyMapping.xml b/das-java/trunk/rdb/src/test/resources/companyMapping.xml
new file mode 100644
index 0000000000..9388cf8264
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/companyMapping.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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 xmlns="http:///org.apache.tuscany.das.rdb/config.xsd">
+
+ <Table tableName="COMPANY" typeName="CompanyType">
+ <Column columnName="ID" primaryKey="true"/>
+ </Table>
+
+ <Table tableName="DEPARTMENT" typeName="DepartmentType">
+ <Column columnName="ID" primaryKey="true"/>
+ </Table>
+
+ <Table tableName="EMPLOYEE" typeName="EmployeeType">
+ <Column columnName="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/das-java/trunk/rdb/src/test/resources/companyMappingWithConverters.xml b/das-java/trunk/rdb/src/test/resources/companyMappingWithConverters.xml
new file mode 100644
index 0000000000..d8609eab96
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/companyMappingWithConverters.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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 xmlns="http:///org.apache.tuscany.das.rdb/config.xsd" dataObjectModel="org.apache.tuscany.das.rdb.test/company.xsd">
+ <Command name="AllCompanies" SQL="select * from COMPANY" kind="Select">
+ <ResultDescriptor columnName="ID" tableName="COMPANY" columnType="commonj.sdo.Int"/>
+ <ResultDescriptor columnName="NAME" tableName="COMPANY" columnType="commonj.sdo.String"/>
+ <ResultDescriptor columnName="EOTMID" tableName="COMPANY" columnType="commonj.sdo.Int"/>
+ </Command>
+
+ <Table tableName="COMPANY" typeName="CompanyType">
+ <Column columnName="ID" propertyName="id" primaryKey="true" generated="true"/>
+ <Column columnName="NAME" propertyName="name" />
+ <Column columnName="EOTMID" propertyName="employeeOfTheMonth"/>
+ </Table>
+
+ <Table tableName="DEPARTMENT" typeName="DepartmentType">
+ <Column columnName="ID" primaryKey="true"/>
+ <Column columnName="DEPNUMBER" propertyName="NUMBER" converterClassName="org.apache.tuscany.das.rdb.test.mappings.StringToIntegerConverter"/>
+ </Table>
+
+ <Table tableName="EMPLOYEE" typeName="EmployeeType">
+ <Column columnName="ID" primaryKey="true"/>
+ <Column columnName="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/das-java/trunk/rdb/src/test/resources/companyMappingWithResultDescriptor.xml b/das-java/trunk/rdb/src/test/resources/companyMappingWithResultDescriptor.xml
new file mode 100644
index 0000000000..419f27eca3
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/companyMappingWithResultDescriptor.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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 xmlns="http:///org.apache.tuscany.das.rdb/config.xsd">
+ <Command name="testFullOuterJoinRelationship" SQL="select * from DEPARTMENT left join EMPLOYEE on DEPARTMENT.ID = EMPLOYEE.DEPARTMENTID UNION select * from DEPARTMENT right join EMPLOYEE on DEPARTMENT.ID = EMPLOYEE.DEPARTMENTID WHERE employee.DepartmentID IS NULL" kind="Select">
+ <ResultDescriptor columnName="ID" tableName="DEPARTMENT" columnType="commonj.sdo.IntObject"/>
+ <ResultDescriptor columnName="NAME" tableName="DEPARTMENT" columnType="commonj.sdo.String"/>
+ <ResultDescriptor columnName="LOCATION" tableName="DEPARTMENT" columnType="commonj.sdo.String"/>
+ <ResultDescriptor columnName="DEPNUMBER" tableName="DEPARTMENT" columnType="commonj.sdo.String"/>
+ <ResultDescriptor columnName="COMPANYID" tableName="DEPARTMENT" columnType="commonj.sdo.IntObject"/>
+
+ <ResultDescriptor columnName="ID" tableName="EMPLOYEE" columnType="commonj.sdo.IntObject"/>
+ <ResultDescriptor columnName="NAME" tableName="EMPLOYEE" columnType="commonj.sdo.String"/>
+ <ResultDescriptor columnName="SN" tableName="EMPLOYEE" columnType="commonj.sdo.String"/>
+ <ResultDescriptor columnName="MANAGER" tableName="EMPLOYEE" columnType="commonj.sdo.IntObject"/>
+ <ResultDescriptor columnName="DEPARTMENTID" tableName="EMPLOYEE" columnType="commonj.sdo.IntObject"/>
+ </Command>
+
+ <Command name="testEmployeesFromDepartment" SQL="select * from DEPARTMENT left join EMPLOYEE on DEPARTMENT.ID = EMPLOYEE.DEPARTMENTID where DEPARTMENT.NAME = ?" kind="Select"/>
+
+ <Table tableName="COMPANY">
+ <Column columnName="ID" primaryKey="true"/>
+ </Table>
+
+ <Table tableName="DEPARTMENT">
+ <Column columnName="ID" primaryKey="true"/>
+ </Table>
+
+ <Table tableName="EMPLOYEE">
+ <Column columnName="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/das-java/trunk/rdb/src/test/resources/companynoid.xsd b/das-java/trunk/rdb/src/test/resources/companynoid.xsd
new file mode 100644
index 0000000000..7c301ff16a
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/companynoid.xsd
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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/companynoid.xsd"
+ xmlns:companynoid="org.apache.tuscany.das.rdb.test/companynoid.xsd"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore">
+
+ <xsd:element name="companynoid" type="companynoid:CompanynoidType"/>
+
+ <xsd:complexType name="CompanynoidType">
+ <xsd:sequence>
+ <xsd:element maxOccurs="unbounded" name="departmentsnoid" type="companynoid:DepartmentnoidType"/>
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string"/>
+ <xsd:attribute name="employeeOfTheMonth" type="xsd:IDREF" ecore:reference="EmployeenoidType"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="DepartmentnoidType">
+ <xsd:sequence>
+ <xsd:element maxOccurs="unbounded" name="employees" type="companynoid:EmployeenoidType"/>
+ </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="EmployeenoidType">
+ <xsd:attribute name="id" type="xsd:int"/>
+ <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/das-java/trunk/rdb/src/test/resources/companynoidMappingWithConverters.xml b/das-java/trunk/rdb/src/test/resources/companynoidMappingWithConverters.xml
new file mode 100644
index 0000000000..bfbefddd2f
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/companynoidMappingWithConverters.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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 xmlns="http:///org.apache.tuscany.das.rdb/config.xsd" dataObjectModel="org.apache.tuscany.das.rdb.test/companynoid.xsd">
+
+ <Table tableName="COMPANY" typeName="CompanynoidType">
+ <Column columnName="ID" primaryKey="true"/>
+ </Table>
+
+ <Table tableName="DEPARTMENT" typeName="DepartmentnoidType">
+ <Column columnName="ID" primaryKey="true"/>
+ <Column columnName="DEPNUMBER" propertyName="NUMBER" converterClassName="org.apache.tuscany.das.rdb.test.mappings.StringToIntegerConverter"/>
+ </Table>
+
+ <Table tableName="EMPLOYEE" typeName="EmployeenoidType">
+ <Column columnName="ID" primaryKey="true"/>
+ <Column columnName="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/das-java/trunk/rdb/src/test/resources/connectionInfoDriverManagerAuth.xml b/das-java/trunk/rdb/src/test/resources/connectionInfoDriverManagerAuth.xml
new file mode 100644
index 0000000000..8a6a1880af
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/connectionInfoDriverManagerAuth.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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 xmlns="http:///org.apache.tuscany.das.rdb/config.xsd">
+
+<ConnectionInfo>
+ <ConnectionProperties
+ driverClass="org.apache.derby.jdbc.EmbeddedDriver"
+ databaseURL="jdbc:derby:dastestcon"
+ userName="dasuser"
+ password="dasuser"
+ loginTimeout="600000"/>
+</ConnectionInfo>
+
+<Command name="getBook" SQL="Select * from BOOK" kind="Select"/>
+
+</Config>
diff --git a/das-java/trunk/rdb/src/test/resources/connectionInfoDriverManagerNoAuth.xml b/das-java/trunk/rdb/src/test/resources/connectionInfoDriverManagerNoAuth.xml
new file mode 100644
index 0000000000..1c7a79acc7
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/connectionInfoDriverManagerNoAuth.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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 xmlns="http:///org.apache.tuscany.das.rdb/config.xsd">
+
+<ConnectionInfo>
+ <ConnectionProperties
+ driverClass="org.apache.derby.jdbc.EmbeddedDriver"
+ databaseURL="jdbc:derby:dastestcon"
+ loginTimeout="600000"/>
+</ConnectionInfo>
+
+<Command name="getBook" SQL="Select * from BOOK" kind="Select"/>
+
+</Config>
diff --git a/das-java/trunk/rdb/src/test/resources/customer.xsd b/das-java/trunk/rdb/src/test/resources/customer.xsd
new file mode 100644
index 0000000000..e5482ae3a0
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/customer.xsd
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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="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/das-java/trunk/rdb/src/test/resources/customerMapping.xml b/das-java/trunk/rdb/src/test/resources/customerMapping.xml
new file mode 100644
index 0000000000..3de367e0c6
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/customerMapping.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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 xmlns="http:///org.apache.tuscany.das.rdb/config.xsd">
+
+ <Table tableName="CUSTOMER" typeName="Customer">
+ <Column columnName="ID" propertyName="id" primaryKey="true"/>
+ <Column columnName="LASTNAME" propertyName="lastname"/>
+ <Column columnName="ADDRESS" propertyName="address"/>
+ </Table>
+
+</Config>
diff --git a/das-java/trunk/rdb/src/test/resources/customerMappingWithResultDescriptor.xml b/das-java/trunk/rdb/src/test/resources/customerMappingWithResultDescriptor.xml
new file mode 100644
index 0000000000..587c437423
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/customerMappingWithResultDescriptor.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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 xmlns="http:///org.apache.tuscany.das.rdb/config.xsd">
+ <Command name="testSelectCustomer" SQL="select * from CUSTOMER where CUSTOMER.ID = 1" kind="Select">
+ <ResultDescriptor columnName="ID" tableName="CUSTOMER" columnType="commonj.sdo.IntObject"/>
+ <ResultDescriptor columnName="LASTNAME" tableName="CUSTOMER" columnType="commonj.sdo.String"/>
+ <ResultDescriptor columnName="ADDRESS" tableName="CUSTOMER" columnType="commonj.sdo.String"/>
+ </Command>
+
+ <Table tableName="CUSTOMER">
+ <Column columnName="ID" primaryKey="true"/>
+ </Table>
+
+</Config>
diff --git a/das-java/trunk/rdb/src/test/resources/customerOrderRelationshipMapping.xml b/das-java/trunk/rdb/src/test/resources/customerOrderRelationshipMapping.xml
new file mode 100644
index 0000000000..fe8d1c5ece
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/customerOrderRelationshipMapping.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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 xmlns="http:///org.apache.tuscany.das.rdb/config.xsd">
+
+ <Table tableName="CUSTOMER" typeName="Customer">
+ <Column columnName="ID" primaryKey="true"/>
+ </Table>
+ <Table tableName="ANORDER" typeName="AnOrder">
+ <Column columnName="ID" primaryKey="true"/>
+ </Table>
+
+ <Relationship name="orders" primaryKeyTable="CUSTOMER" foreignKeyTable="ANORDER" many="true">
+ <KeyPair primaryKeyColumn="ID" foreignKeyColumn="CUSTOMER_ID"/>
+ </Relationship>
+
+</Config>
+
diff --git a/das-java/trunk/rdb/src/test/resources/moin-www.png b/das-java/trunk/rdb/src/test/resources/moin-www.png
new file mode 100644
index 0000000000..253471485a
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/moin-www.png
Binary files differ
diff --git a/das-java/trunk/rdb/src/test/resources/namedParameter.xml b/das-java/trunk/rdb/src/test/resources/namedParameter.xml
new file mode 100644
index 0000000000..d0b0811e33
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/namedParameter.xml
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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 xmlns="http:///org.apache.tuscany.das.rdb/config.xsd">
+
+ <Table tableName="CUSTOMER">
+ <create sql="insert into customer values (?, ?, ?)" >
+ <Parameters>
+ <Parameter name="ID" index="1"/>
+ <Parameter name="LASTNAME" index="1"/>
+ <Parameter name="ADDRESS" index="3"/>
+ </Parameters>
+ </create>
+
+ <update sql="update customer set lastname = ?, address = ? where ID = ?" >
+ <Parameters>
+ <Parameter name="LASTNAME" index="1"/>
+ <Parameter name="ADDRESS" index="2"/>
+ <Parameter name="ID" index="5"/>
+ </Parameters>
+ </update>
+
+ <delete sql="delete from customer where ID = ? and LASTNAME = ?">
+ <Parameters>
+ <Parameter name="LASTNAME" columnType="commonj.sdo.String" index="2"/>
+ <Parameter name="ID" columnType="commonj.sdo.IntObject" index="1"/>
+ </Parameters>
+ </delete>
+ </Table>
+
+ <Command name="getCustomer" SQL="Select * from CUSTOMER where ID = ?" kind="Select">
+ <Parameter name="ID" index="1"/>
+ </Command>
+
+ <Command name="createCustomer" SQL="insert into CUSTOMER values ( ?, ?, ?)" kind="Insert">
+ <Parameter name="ID" index="1"/>
+ <Parameter name="LASTNAME" index="2"/>
+ <Parameter name="ADDRESS" index="3"/>
+ </Command>
+
+ <Command name="createCustomerNoParam" SQL="insert into CUSTOMER values ( ?, ?, ?)" kind="Insert"/>
+
+ <Command name="updateCustomer" SQL="update CUSTOMER set LASTNAME = ? where ID = ?" kind="Update">
+ <Parameter name="LASTNAME" index="1"/>
+ <Parameter name="ID" index="2"/>
+ </Command>
+
+ <Command name="updateCustomerNoParam" SQL="update CUSTOMER set LASTNAME = ? where ID = ?" kind="Update">
+ </Command>
+
+ <Command name="deleteCustomer" SQL="delete from CUSTOMER where ID = ?" kind="Delete">
+ <Parameter name="ID" index="1"/>
+ </Command>
+
+ <Command name="deleteCustomerNoParam" SQL="delete from CUSTOMER where ID = ?" kind="Delete"/>
+
+</Config>
diff --git a/das-java/trunk/rdb/src/test/resources/passiveConnection.xml b/das-java/trunk/rdb/src/test/resources/passiveConnection.xml
new file mode 100644
index 0000000000..6a23200d49
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/passiveConnection.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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 xmlns="http:///org.apache.tuscany.das.rdb/config.xsd">
+
+ <ConnectionInfo managedtx="false"/>
+
+ <Command name="get a customer" SQL="Select * from CUSTOMER where ID = 1" kind="select"/>
+
+</Config>
diff --git a/das-java/trunk/rdb/src/test/resources/staticCustomer.xml b/das-java/trunk/rdb/src/test/resources/staticCustomer.xml
new file mode 100644
index 0000000000..705e4b34a9
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/staticCustomer.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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 xmlns="http:///org.apache.tuscany.das.rdb/config.xsd" dataObjectModel="http:///org.apache.tuscany.das.rdb.test/customer.xsd">
+
+
+</Config>
diff --git a/das-java/trunk/rdb/src/test/resources/staticCustomerOrder.xml b/das-java/trunk/rdb/src/test/resources/staticCustomerOrder.xml
new file mode 100644
index 0000000000..afbe2a8cfb
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/staticCustomerOrder.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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 xmlns="http:///org.apache.tuscany.das.rdb/config.xsd" dataObjectModel="http:///org.apache.tuscany.das.rdb.test/customer.xsd">
+
+ <Command name="Customer and Orders" SQL="SELECT * FROM CUSTOMER LEFT JOIN ANORDER ON CUSTOMER.ID = ANORDER.CUSTOMER_ID where CUSTOMER.ID = ?" kind="Select"/>
+
+ <Table tableName="CUSTOMER" typeName="Customer">
+ <Column columnName="ID" primaryKey="true"/>
+ </Table>
+ <Table tableName="ANORDER" typeName="AnOrder">
+ <Column columnName="ID" primaryKey="true"/>
+ <Column columnName="CUSTOMER_ID"/>
+ </Table>
+
+ <Relationship name="orders" primaryKeyTable="CUSTOMER" foreignKeyTable="ANORDER" many="true">
+ <KeyPair primaryKeyColumn="ID" foreignKeyColumn="CUSTOMER_ID"/>
+ </Relationship>
+
+</Config>
diff --git a/das-java/trunk/rdb/src/test/resources/staticInvalid.xml b/das-java/trunk/rdb/src/test/resources/staticInvalid.xml
new file mode 100644
index 0000000000..965c99717f
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/staticInvalid.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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 xmlns="http:///org.apache.tuscany.das.rdb/config.xsd" dataObjectModel="invalidURI">
+
+
+</Config>
diff --git a/das-java/trunk/rdb/src/test/resources/storedProcTest.xml b/das-java/trunk/rdb/src/test/resources/storedProcTest.xml
new file mode 100644
index 0000000000..beb1ca34ac
--- /dev/null
+++ b/das-java/trunk/rdb/src/test/resources/storedProcTest.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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 xmlns="http:///org.apache.tuscany.das.rdb/config.xsd">
+
+ <Command name="getNamedCustomers" SQL="{call GETNAMEDCUSTOMERS(?,?)}" kind="procedure">
+ <Parameter direction="OUT" index="2" columnType="commonj.sdo.IntObject"/>
+ </Command>
+
+</Config>