diff options
Diffstat (limited to 'tags/java/das/1.0-incubator-M2/rdb/src/test/java/org/apache/tuscany/das/rdb/test/data')
19 files changed, 0 insertions, 870 deletions
diff --git a/tags/java/das/1.0-incubator-M2/rdb/src/test/java/org/apache/tuscany/das/rdb/test/data/BookData.java b/tags/java/das/1.0-incubator-M2/rdb/src/test/java/org/apache/tuscany/das/rdb/test/data/BookData.java deleted file mode 100644 index 632a4d057d..0000000000 --- a/tags/java/das/1.0-incubator-M2/rdb/src/test/java/org/apache/tuscany/das/rdb/test/data/BookData.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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. - */ -package org.apache.tuscany.das.rdb.test.data; - -import java.sql.Connection; -import java.sql.Types; - -import org.apache.tuscany.das.rdb.test.framework.TestDataWithExplicitColumns; - -public class BookData extends TestDataWithExplicitColumns { - - // CREATE TABLE BOOK (ID INT PRIMARY KEY NOT NULL, NAME VARCHAR(50), AUTHOR VARCHAR(30), QUANTITY INT, OCC INTEGER) - - private static int[] bookTypes = {Types.INTEGER, Types.VARCHAR, Types.VARCHAR, Types.INTEGER, Types.INTEGER}; - - private static Object[][] bookData = {{Integer.valueOf(1), "The Brothers Karamazov", "Fyodor Dostoevsky", - Integer.valueOf(5), Integer.valueOf(17)}, - {Integer.valueOf(2), "Cat in the Hat", "Doctor Seuss", Integer.valueOf(10), Integer.valueOf(1)}}; - - private static String[] bookColumns = {"BOOK_ID", "NAME", "AUTHOR", "QUANTITY", "OCC"}; - - public BookData(Connection connection) { - super(connection, bookData, bookColumns, bookTypes); - } - - public String getTableName() { - return "BOOK"; - } - -} diff --git a/tags/java/das/1.0-incubator-M2/rdb/src/test/java/org/apache/tuscany/das/rdb/test/data/CityData.java b/tags/java/das/1.0-incubator-M2/rdb/src/test/java/org/apache/tuscany/das/rdb/test/data/CityData.java deleted file mode 100644 index 7ce5cf757d..0000000000 --- a/tags/java/das/1.0-incubator-M2/rdb/src/test/java/org/apache/tuscany/das/rdb/test/data/CityData.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 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. - */ -package org.apache.tuscany.das.rdb.test.data; - -import java.sql.Connection; -import java.sql.SQLException; - -import org.apache.tuscany.das.rdb.test.framework.TestData; - -public class CityData extends TestData { - - private static Object[][] cityData = {{Integer.valueOf(1), "Lizard Lick", "1"}, - {Integer.valueOf(2), "Morrisville", "1"}, - {Integer.valueOf(3), "Breckenridge", "2"}, - {Integer.valueOf(4), "Barstow", "3"}, - {Integer.valueOf(5), "Sacramento", "3"} - - }; - - public CityData(Connection c) { - super(c, cityData); - } - - public String getTableName() { - return "CITIES"; - } - - public void doDeletes() throws SQLException { - deleteRowsFromTable(); - - } - - public void doInserts() throws SQLException { - insertRows(); - - } - -} diff --git a/tags/java/das/1.0-incubator-M2/rdb/src/test/java/org/apache/tuscany/das/rdb/test/data/CompanyData.java b/tags/java/das/1.0-incubator-M2/rdb/src/test/java/org/apache/tuscany/das/rdb/test/data/CompanyData.java deleted file mode 100644 index 0c28ed2caa..0000000000 --- a/tags/java/das/1.0-incubator-M2/rdb/src/test/java/org/apache/tuscany/das/rdb/test/data/CompanyData.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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. - */ -package org.apache.tuscany.das.rdb.test.data; - -import java.sql.Connection; -import java.sql.Types; - -import org.apache.tuscany.das.rdb.test.framework.TestDataWithExplicitColumns; - -public class CompanyData extends TestDataWithExplicitColumns { - - // CREATE TABLE COMPANY (ID INT PRIMARY KEY NOT NULL GENERATED ALWAYS AS IDENTITY ,NAME VARCHAR(30)) - - private static int[] columnTypes = {Types.VARCHAR}; - - private static Object[][] companyData = {{"ACME Publishing"}, {"Do-rite plumbing"}, {"MegaCorp"}}; - - private static String[] companyColumns = {"NAME"}; - - public CompanyData(Connection connection) { - super(connection, companyData, companyColumns, columnTypes); - } - - public String getTableName() { - return "COMPANY"; - } - -} diff --git a/tags/java/das/1.0-incubator-M2/rdb/src/test/java/org/apache/tuscany/das/rdb/test/data/CompanyDeptData.java b/tags/java/das/1.0-incubator-M2/rdb/src/test/java/org/apache/tuscany/das/rdb/test/data/CompanyDeptData.java deleted file mode 100644 index 686e3243cb..0000000000 --- a/tags/java/das/1.0-incubator-M2/rdb/src/test/java/org/apache/tuscany/das/rdb/test/data/CompanyDeptData.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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. - */ -package org.apache.tuscany.das.rdb.test.data; - -import java.sql.Connection; - -import org.apache.tuscany.das.rdb.test.framework.RelationshipData; - -public class CompanyDeptData extends RelationshipData { - - private static Object[][] data = {{"MegaCorp", "Advanced Technologies"}}; - - public CompanyDeptData(Connection c) { - super(c, data); - } - - protected String getParentRetrievalStatement() { - return "select id from company where name = ?"; - } - - protected String getChildUpdateStatement() { - return "update department set companyid = ? where department.name = ?"; - } - -} diff --git a/tags/java/das/1.0-incubator-M2/rdb/src/test/java/org/apache/tuscany/das/rdb/test/data/CompanyEmpData.java b/tags/java/das/1.0-incubator-M2/rdb/src/test/java/org/apache/tuscany/das/rdb/test/data/CompanyEmpData.java deleted file mode 100644 index b1d3fb12b5..0000000000 --- a/tags/java/das/1.0-incubator-M2/rdb/src/test/java/org/apache/tuscany/das/rdb/test/data/CompanyEmpData.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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. - */ -package org.apache.tuscany.das.rdb.test.data; - -import java.sql.Connection; - -import org.apache.tuscany.das.rdb.test.framework.RelationshipData; - - -public class CompanyEmpData extends RelationshipData { - - protected static Object[][] data = { - {"Mary Smith", "ACME Publishing" }, - {"Jane Doe", "Do-rite plumbing"}, - {"Al Smith", "MegaCorp"}}; - - public CompanyEmpData(Connection c) { - super(c, data); - } - - protected String getParentRetrievalStatement() { - return "select employee.id from employee where employee.name = ?"; - } - - protected String getChildUpdateStatement() { - return "update company set company.eotmid = ? where company.name = ?"; - } - -} diff --git a/tags/java/das/1.0-incubator-M2/rdb/src/test/java/org/apache/tuscany/das/rdb/test/data/CustomerData.java b/tags/java/das/1.0-incubator-M2/rdb/src/test/java/org/apache/tuscany/das/rdb/test/data/CustomerData.java deleted file mode 100644 index 9ec6c8003d..0000000000 --- a/tags/java/das/1.0-incubator-M2/rdb/src/test/java/org/apache/tuscany/das/rdb/test/data/CustomerData.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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. - */ -package org.apache.tuscany.das.rdb.test.data; - -import java.sql.Connection; - -import org.apache.tuscany.das.rdb.test.framework.TestData; - -public class CustomerData extends TestData { - - private static Object[][] customerData = {{Integer.valueOf(1), "Williams", "1212 foobar lane"}, - {Integer.valueOf(2), "Daniel", "156 Brentfield Loop"}, {Integer.valueOf(3), "Williams", "456 penny lane"}, - {Integer.valueOf(4), "Williams", "5000 pineville"}, {Integer.valueOf(5), "Williams", "100000 firefly lane"}}; - - public CustomerData(Connection connection) { - super(connection, customerData); - } - - public String getTableName() { - return "CUSTOMER"; - } - -} diff --git a/tags/java/das/1.0-incubator-M2/rdb/src/test/java/org/apache/tuscany/das/rdb/test/data/DepEmpData.java b/tags/java/das/1.0-incubator-M2/rdb/src/test/java/org/apache/tuscany/das/rdb/test/data/DepEmpData.java deleted file mode 100644 index ad8ff14e86..0000000000 --- a/tags/java/das/1.0-incubator-M2/rdb/src/test/java/org/apache/tuscany/das/rdb/test/data/DepEmpData.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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. - */ -package org.apache.tuscany.das.rdb.test.data; - -import java.sql.Connection; - -import org.apache.tuscany.das.rdb.test.framework.RelationshipData; - -public class DepEmpData extends RelationshipData { - - private static Object[][] data = {{"Advanced Technologies", "John Jones"}, - {"Advanced Technologies", "Jane Doe"}, - {"Advanced Technologies", "Al Smith"}}; - - public DepEmpData(Connection c) { - super(c, data); - } - - protected String getParentRetrievalStatement() { - return "select department.id from department where department.name = ?"; - } - - protected String getChildUpdateStatement() { - return "update employee set employee.departmentid = ? where employee.name = ?"; - } - -} diff --git a/tags/java/das/1.0-incubator-M2/rdb/src/test/java/org/apache/tuscany/das/rdb/test/data/DepartmentData.java b/tags/java/das/1.0-incubator-M2/rdb/src/test/java/org/apache/tuscany/das/rdb/test/data/DepartmentData.java deleted file mode 100644 index 906a30cc06..0000000000 --- a/tags/java/das/1.0-incubator-M2/rdb/src/test/java/org/apache/tuscany/das/rdb/test/data/DepartmentData.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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. - */ -package org.apache.tuscany.das.rdb.test.data; - -import java.sql.Connection; -import java.sql.Types; - -import org.apache.tuscany.das.rdb.test.framework.TestDataWithExplicitColumns; - - -public class DepartmentData extends TestDataWithExplicitColumns { - - private static int[] columnTypes = {Types.VARCHAR, Types.VARCHAR, Types.VARCHAR}; - - private static Object[][] deptData = {{"Advanced Technologies", "NY", "123" }}; - - private static String[] deptColumns = {"NAME", "LOCATION", "DEPNUMBER"}; - - public DepartmentData(Connection connection) { - super(connection, deptData, deptColumns, columnTypes); - } - - public String getTableName() { - return "DEPARTMENT"; - } - -} diff --git a/tags/java/das/1.0-incubator-M2/rdb/src/test/java/org/apache/tuscany/das/rdb/test/data/DogData.java b/tags/java/das/1.0-incubator-M2/rdb/src/test/java/org/apache/tuscany/das/rdb/test/data/DogData.java deleted file mode 100644 index 3c686e6fea..0000000000 --- a/tags/java/das/1.0-incubator-M2/rdb/src/test/java/org/apache/tuscany/das/rdb/test/data/DogData.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 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. - */ -package org.apache.tuscany.das.rdb.test.data; - -import java.sql.Connection; -import java.sql.Types; - -import org.apache.tuscany.das.rdb.test.framework.TestDataWithExplicitColumns; - -public class DogData extends TestDataWithExplicitColumns { - - /* CREATE TABLE DOG ( - ID INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, - OWNER_ID INTEGER UNSIGNED NOT NULL, - NAME VARCHAR(20) NOT NULL, - BREED VARCHAR(20) NULL, - OCC_COUNT INTEGER UNSIGNED NULL, - PRIMARY KEY(ID), - );*/ - - //id and owner_id omitted. id is auto-generated. owner_id is filled in by DogOwner data - private static int[] columnTypes = {Types.VARCHAR, Types.VARCHAR, Types.INTEGER}; - - private static Object[][] data = {{"Fido", "Mutt", Integer.valueOf(1)}, - {"Max", "German Shepherd", Integer.valueOf(1)}, - {"Saddie", "Collie", Integer.valueOf(1)}}; - - private static String[] columns = {"NAME", "BREED", "OCC_COUNT"}; - - public DogData(Connection connection) { - super(connection, data, columns, columnTypes); - } - - public String getTableName() { - return "DOG"; - } - -} diff --git a/tags/java/das/1.0-incubator-M2/rdb/src/test/java/org/apache/tuscany/das/rdb/test/data/EmployeeData.java b/tags/java/das/1.0-incubator-M2/rdb/src/test/java/org/apache/tuscany/das/rdb/test/data/EmployeeData.java deleted file mode 100644 index 8c53dea790..0000000000 --- a/tags/java/das/1.0-incubator-M2/rdb/src/test/java/org/apache/tuscany/das/rdb/test/data/EmployeeData.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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. - */ -package org.apache.tuscany.das.rdb.test.data; - -import java.sql.Connection; -import java.sql.Types; - -import org.apache.tuscany.das.rdb.test.framework.TestDataWithExplicitColumns; - -public class EmployeeData extends TestDataWithExplicitColumns { - - private static int[] columnTypes = {Types.VARCHAR, Types.VARCHAR, Types.SMALLINT}; - - private static Object[][] employeeData = {{"John Jones", "E0001", Boolean.valueOf(false)}, - {"Mary Smith", "E0002", Boolean.valueOf(true)}, - {"Jane Doe", "E0003", Boolean.valueOf(false)}, {"Al Smith", "E0004", Boolean.valueOf(true)}}; - - private static String[] employeeColumns = {"NAME", "SN", "MANAGER"}; - - public EmployeeData(Connection connection) { - super(connection, employeeData, employeeColumns, columnTypes); - } - - public String getTableName() { - return "EMPLOYEE"; - } - -} diff --git a/tags/java/das/1.0-incubator-M2/rdb/src/test/java/org/apache/tuscany/das/rdb/test/data/KennelData.java b/tags/java/das/1.0-incubator-M2/rdb/src/test/java/org/apache/tuscany/das/rdb/test/data/KennelData.java deleted file mode 100644 index 01423ee40e..0000000000 --- a/tags/java/das/1.0-incubator-M2/rdb/src/test/java/org/apache/tuscany/das/rdb/test/data/KennelData.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * 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. - */ -package org.apache.tuscany.das.rdb.test.data; - -import java.sql.Connection; -import java.sql.Types; - -import org.apache.tuscany.das.rdb.test.framework.TestDataWithExplicitColumns; - -public class KennelData extends TestDataWithExplicitColumns { - - /* CREATE TABLE KENNEL ( - ID INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, - KNUMBER INTEGER UNSIGNED NULL, - KIND VARCHAR(20) NULL, - OCC_COUNT INTEGER UNSIGNED NULL, - PRIMARY KEY(ID) - );*/ - - //id omitted. id is auto-generated. - private static int[] columnTypes = {Types.INTEGER, Types.VARCHAR, Types.INTEGER}; - - private static Object[][] data = {{Integer.valueOf(100), "Small", Integer.valueOf(1)}, - {Integer.valueOf(101), "Small", Integer.valueOf(1)}, - {Integer.valueOf(102), "Large", Integer.valueOf(1)}}; - - private static String[] columns = {"KNUMBER", "KIND", "OCC_COUNT"}; - - public KennelData(Connection connection) { - super(connection, data, columns, columnTypes); - } - - public String getTableName() { - return "KENNEL"; - } - -} diff --git a/tags/java/das/1.0-incubator-M2/rdb/src/test/java/org/apache/tuscany/das/rdb/test/data/OrderData.java b/tags/java/das/1.0-incubator-M2/rdb/src/test/java/org/apache/tuscany/das/rdb/test/data/OrderData.java deleted file mode 100644 index 2568dd1a9f..0000000000 --- a/tags/java/das/1.0-incubator-M2/rdb/src/test/java/org/apache/tuscany/das/rdb/test/data/OrderData.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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. - */ -package org.apache.tuscany.das.rdb.test.data; - -import java.sql.Connection; - -import org.apache.tuscany.das.rdb.test.framework.TestData; - -public class OrderData extends TestData { - - protected static Object[][] orderData = { - {Integer.valueOf(1), "recombobulator", Integer.valueOf(47), Integer.valueOf(1)}, - {Integer.valueOf(2), "wrench", Integer.valueOf(17), Integer.valueOf(3)}, - {Integer.valueOf(3), "pliers", Integer.valueOf(500), Integer.valueOf(1)}, - {Integer.valueOf(4), "Tooth Paste", Integer.valueOf(12), Integer.valueOf(2)}}; - - public OrderData(Connection c) { - super(c, orderData); - } - - public String getTableName() { - return "ANORDER"; - } - -} diff --git a/tags/java/das/1.0-incubator-M2/rdb/src/test/java/org/apache/tuscany/das/rdb/test/data/OrderDetailsData.java b/tags/java/das/1.0-incubator-M2/rdb/src/test/java/org/apache/tuscany/das/rdb/test/data/OrderDetailsData.java deleted file mode 100644 index 9f5897b373..0000000000 --- a/tags/java/das/1.0-incubator-M2/rdb/src/test/java/org/apache/tuscany/das/rdb/test/data/OrderDetailsData.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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. - */ -package org.apache.tuscany.das.rdb.test.data; - -import java.sql.Connection; - -import org.apache.tuscany.das.rdb.test.framework.TestData; - -public class OrderDetailsData extends TestData { - - // CREATE TABLE ORDERDETAILS (ORDERID INT NOT NULL, PRODUCTID INT NOT NULL, PRICE FLOAT, - // PRIMARY KEY (ORDERID, PRODUCTID)) - - protected static Object[][] orderDetailsData = {{Integer.valueOf(1), Integer.valueOf(1), new Float(1.1)}, - {Integer.valueOf(1), Integer.valueOf(2), new Float(1.2)}, - {Integer.valueOf(2), Integer.valueOf(1), new Float(2.1)}, - {Integer.valueOf(2), Integer.valueOf(2), new Float(2.2)}}; - - public OrderDetailsData(Connection c) { - super(c, orderDetailsData); - } - - public String getTableName() { - return "ORDERDETAILS"; - } - -} diff --git a/tags/java/das/1.0-incubator-M2/rdb/src/test/java/org/apache/tuscany/das/rdb/test/data/OwnerData.java b/tags/java/das/1.0-incubator-M2/rdb/src/test/java/org/apache/tuscany/das/rdb/test/data/OwnerData.java deleted file mode 100644 index b5198bce36..0000000000 --- a/tags/java/das/1.0-incubator-M2/rdb/src/test/java/org/apache/tuscany/das/rdb/test/data/OwnerData.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * 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. - */ -package org.apache.tuscany.das.rdb.test.data; - -import java.sql.Connection; -import java.sql.Types; - -import org.apache.tuscany.das.rdb.test.framework.TestDataWithExplicitColumns; - -public class OwnerData extends TestDataWithExplicitColumns { - - /* CREATE TABLE OWNER ( - ID INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, - NAME VARCHAR(20) NULL, - CONTACT_PHONE VARCHAR(20) NULL, - OCC_COUNT INTEGER UNSIGNED NULL, - PRIMARY KEY(ID) - );*/ - - //id omitted. id is auto-generated. - private static int[] columnTypes = {Types.VARCHAR, Types.VARCHAR, Types.INTEGER}; - - private static Object[][] data = {{"Fanny", "222-2222", Integer.valueOf(1)}, - {"Manny", "333-3333", Integer.valueOf(1)}, - {"Sammy", "444-4444", Integer.valueOf(1)}}; - - private static String[] columns = {"NAME", "CONTACT_PHONE", "OCC_COUNT"}; - - public OwnerData(Connection connection) { - super(connection, data, columns, columnTypes); - } - - public String getTableName() { - return "OWNER"; - } - -} diff --git a/tags/java/das/1.0-incubator-M2/rdb/src/test/java/org/apache/tuscany/das/rdb/test/data/OwnerDogData.java b/tags/java/das/1.0-incubator-M2/rdb/src/test/java/org/apache/tuscany/das/rdb/test/data/OwnerDogData.java deleted file mode 100644 index a06a2124f3..0000000000 --- a/tags/java/das/1.0-incubator-M2/rdb/src/test/java/org/apache/tuscany/das/rdb/test/data/OwnerDogData.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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. - */ -package org.apache.tuscany.das.rdb.test.data; - -import java.sql.Connection; - -import org.apache.tuscany.das.rdb.test.framework.RelationshipData; - -public class OwnerDogData extends RelationshipData { - - private static final Object[][] DATA = {{"Fanny", "Fido"}, {"Manny", "Max"}, {"Sammy", "Saddie"}}; - - public OwnerDogData(Connection c) { - super(c, DATA); - } - - protected String getParentRetrievalStatement() { - return "select ID from OWNER where NAME = ?"; - } - - protected String getChildUpdateStatement() { - return "update DOG set OWNER_ID = ? where NAME = ?"; - } - -} diff --git a/tags/java/das/1.0-incubator-M2/rdb/src/test/java/org/apache/tuscany/das/rdb/test/data/PartData.java b/tags/java/das/1.0-incubator-M2/rdb/src/test/java/org/apache/tuscany/das/rdb/test/data/PartData.java deleted file mode 100644 index ff59b03aef..0000000000 --- a/tags/java/das/1.0-incubator-M2/rdb/src/test/java/org/apache/tuscany/das/rdb/test/data/PartData.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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. - */ -package org.apache.tuscany.das.rdb.test.data; - -import java.sql.Connection; -import java.sql.Types; - -import org.apache.tuscany.das.rdb.test.framework.TestDataWithExplicitColumns; - -public class PartData extends TestDataWithExplicitColumns { - - // CREATE TABLE PART (ID INT PRIMARY KEY NOT NULL, NAME VARCHAR(50), QUANTITY INT, PARENT_ID INT ) - - private static String[] partColumns = {"ID", "NAME", "QUANTITY", "PARENT_ID"}; - - private static int[] columnTypes = {Types.INTEGER, Types.VARCHAR, Types.INTEGER, Types.INTEGER}; - - private static Object[][] partData = {{Integer.valueOf(1), "Engine", Integer.valueOf(1), null}, - {Integer.valueOf(2), "Block", Integer.valueOf(1), Integer.valueOf(1)}, - {Integer.valueOf(3), "Cam Shaft", Integer.valueOf(2), Integer.valueOf(1)}, - {Integer.valueOf(4), "Piston", Integer.valueOf(8), Integer.valueOf(1)}, - {Integer.valueOf(5), "Piston Ring", Integer.valueOf(2), Integer.valueOf(4)}}; - - public PartData(Connection connection) { - super(connection, partData, partColumns, columnTypes); - } - - public String getTableName() { - return "PART"; - } - -} diff --git a/tags/java/das/1.0-incubator-M2/rdb/src/test/java/org/apache/tuscany/das/rdb/test/data/StateData.java b/tags/java/das/1.0-incubator-M2/rdb/src/test/java/org/apache/tuscany/das/rdb/test/data/StateData.java deleted file mode 100644 index 713aecb9a3..0000000000 --- a/tags/java/das/1.0-incubator-M2/rdb/src/test/java/org/apache/tuscany/das/rdb/test/data/StateData.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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. - */ -package org.apache.tuscany.das.rdb.test.data; - -import java.sql.Connection; -import java.sql.SQLException; - -import org.apache.tuscany.das.rdb.test.framework.TestData; - -public class StateData extends TestData { - private static Object[][] stateData = {{Integer.valueOf(1), "NC"}, {Integer.valueOf(2), "CO"}, - {Integer.valueOf(3), "CA"}}; - - public StateData(Connection c) { - super(c, stateData); - } - - public String getTableName() { - return "STATES"; - } - - - public void doDeletes() throws SQLException { - deleteRowsFromTable(); - } - - public void doInserts() throws SQLException { - insertRows(); - - } - -} diff --git a/tags/java/das/1.0-incubator-M2/rdb/src/test/java/org/apache/tuscany/das/rdb/test/data/TypesData.java b/tags/java/das/1.0-incubator-M2/rdb/src/test/java/org/apache/tuscany/das/rdb/test/data/TypesData.java deleted file mode 100644 index 0aac15fb7d..0000000000 --- a/tags/java/das/1.0-incubator-M2/rdb/src/test/java/org/apache/tuscany/das/rdb/test/data/TypesData.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 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. - */ -package org.apache.tuscany.das.rdb.test.data; - -import java.sql.Connection; - -import org.apache.tuscany.das.rdb.test.framework.TestData; - -public class TypesData extends TestData { - - private static Object[][] customerData = {{Integer.valueOf(1), TIMESTAMP, - new Float(1234567.89), new Float(1234567.89)}}; - - public TypesData(Connection connection) { - super(connection, customerData); - } - - public String getTableName() { - return "TYPETEST"; - } - -} diff --git a/tags/java/das/1.0-incubator-M2/rdb/src/test/java/org/apache/tuscany/das/rdb/test/data/VisitData.java b/tags/java/das/1.0-incubator-M2/rdb/src/test/java/org/apache/tuscany/das/rdb/test/data/VisitData.java deleted file mode 100644 index c9cebc7688..0000000000 --- a/tags/java/das/1.0-incubator-M2/rdb/src/test/java/org/apache/tuscany/das/rdb/test/data/VisitData.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * 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. - */ -package org.apache.tuscany.das.rdb.test.data; - -import java.sql.Connection; -import java.sql.Types; - -import org.apache.tuscany.das.rdb.test.framework.TestDataWithExplicitColumns; - -public class VisitData extends TestDataWithExplicitColumns { - - /* - * CREATE TABLE VISIT ( ID INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, - * CHECK_IN TIMESTAMP NULL, CHECK_OUT TIMESTAMP NULL, OCC_COUNT INTEGER UNSIGNED - * NULL, PRIMARY KEY(ID) ); - */ - - // id omitted. id is auto-generated. - private static int[] columnTypes = {Types.TIMESTAMP, Types.TIMESTAMP, Types.INTEGER}; - - private static Object[][] data = { - {getTimestamp("2006-10-20 00:00:00.0"), getTimestamp("2006-10-22 00:00:00.0"), Integer.valueOf(1)}, - {getTimestamp("2006-10-20 00:00:00.0"), getTimestamp("2006-10-22 00:00:00.0"), Integer.valueOf(1)}, - {getTimestamp("2006-10-20 00:00:00.0"), getTimestamp("2006-10-22 00:00:00.0"), Integer.valueOf(1)}}; - - private static String[] columns = {"CHECK_IN", "CHECK_OUT", "OCC_COUNT"}; - - public VisitData(Connection connection) { - super(connection, data, columns, columnTypes); - } - - public String getTableName() { - return "VISIT"; - } - -} |