[wsas-java-dev] svn commit r9534 -
branches/wsas/java/2.1/wsas/java/modules/samples/DataService/dbs
svn at wso2.org
svn at wso2.org
Wed Nov 7 03:15:08 PST 2007
Author: azeez
Date: Wed Nov 7 03:14:56 2007
New Revision: 9534
Modified:
branches/wsas/java/2.1/wsas/java/modules/samples/DataService/dbs/CSVSampleService.dbs
branches/wsas/java/2.1/wsas/java/modules/samples/DataService/dbs/DataServiceSample1.dbs
branches/wsas/java/2.1/wsas/java/modules/samples/DataService/dbs/DataServiceSample2.dbs
branches/wsas/java/2.1/wsas/java/modules/samples/DataService/dbs/ExcelSampleService.dbs
Log:
Improving readability
Modified: branches/wsas/java/2.1/wsas/java/modules/samples/DataService/dbs/CSVSampleService.dbs
==============================================================================
--- branches/wsas/java/2.1/wsas/java/modules/samples/DataService/dbs/CSVSampleService.dbs (original)
+++ branches/wsas/java/2.1/wsas/java/modules/samples/DataService/dbs/CSVSampleService.dbs Wed Nov 7 03:14:56 2007
@@ -10,6 +10,9 @@
<property name="csv_hasheader">true</property>
</config>
+ <operation name="getProducts">
+ <call-query href="productsQuery" />
+ </operation>
<query id="productsQuery">
<result element="Products" rowName="Product">
<element name="ID" column="1" />
@@ -18,7 +21,4 @@
<element name="Name" column="4" />
</result>
</query>
- <operation name="getProducts">
- <call-query href="productsQuery" />
- </operation>
</data>
Modified: branches/wsas/java/2.1/wsas/java/modules/samples/DataService/dbs/DataServiceSample1.dbs
==============================================================================
--- branches/wsas/java/2.1/wsas/java/modules/samples/DataService/dbs/DataServiceSample1.dbs (original)
+++ branches/wsas/java/2.1/wsas/java/modules/samples/DataService/dbs/DataServiceSample1.dbs Wed Nov 7 03:14:56 2007
@@ -4,10 +4,28 @@
<property name="org.wso2.ws.dataservice.protocol">jdbc:derby:../samples/DataService/database/DATA_SERV_SAMP</property>
<property name="org.wso2.ws.dataservice.user">wsas</property>
<property name="org.wso2.ws.dataservice.password">wsas</property>
- </config>
+ </config>
+
<operation name="customersInBoston">
<call-query href="customersInBostonSQL" />
- </operation>
+ </operation>
+ <query id="customersInBostonSQL">
+ <sql>select CUSTOMERNAME, CONTACTLASTNAME, CONTACTFIRSTNAME, PHONE, CITY, COUNTRY from WSO2WSAS.CUSTOMERS where CITY = 'Boston' and COUNTRY = 'USA'</sql>
+ <result element="customers" rowName="customer">
+ <element name="customer-name" column="CUSTOMERNAME" />
+ <element name="contact-last-name" column="CONTACTLASTNAME" />
+ <element name="contact-first-name" column="CONTACTFIRSTNAME" />
+ <element name="phone" column="PHONE" />
+ <element name="city" column="CITY" />
+ <element name="country" column="COUNTRY" />
+ </result>
+ </query>
+
+ <operation name="employeesByNumber">
+ <call-query href="employeesByNumberSQL">
+ <with-param name="employeeNumber" query-param="employeeNumber" />
+ </call-query>
+ </operation>
<query id="employeesByNumberSQL">
<sql>select LASTNAME, FIRSTNAME, EMAIL from WSO2WSAS.EMPLOYEES where EMPLOYEENUMBER = ?</sql>
<result element="employees" rowName="employee">
@@ -17,22 +35,7 @@
</result>
<param name="employeeNumber" sqlType="INTEGER" />
</query>
- <operation name="employeesByNumber">
- <call-query href="employeesByNumberSQL">
- <with-param name="employeeNumber" query-param="employeeNumber" />
- </call-query>
- </operation>
- <query id="customersInBostonSQL">
- <sql>select CUSTOMERNAME, CONTACTLASTNAME, CONTACTFIRSTNAME, PHONE, CITY, COUNTRY from WSO2WSAS.CUSTOMERS where CITY = 'Boston' and COUNTRY = 'USA'</sql>
- <result element="customers" rowName="customer">
- <element name="customer-name" column="CUSTOMERNAME" />
- <element name="contact-last-name" column="CONTACTLASTNAME" />
- <element name="contact-first-name" column="CONTACTFIRSTNAME" />
- <element name="phone" column="PHONE" />
- <element name="city" column="CITY" />
- <element name="country" column="COUNTRY" />
- </result>
- </query>
+
<operation name="customerAddress">
<call-query href="customerAddressSQL">
<with-param name="lastName" query-param="lastName" />
Modified: branches/wsas/java/2.1/wsas/java/modules/samples/DataService/dbs/DataServiceSample2.dbs
==============================================================================
--- branches/wsas/java/2.1/wsas/java/modules/samples/DataService/dbs/DataServiceSample2.dbs (original)
+++ branches/wsas/java/2.1/wsas/java/modules/samples/DataService/dbs/DataServiceSample2.dbs Wed Nov 7 03:14:56 2007
@@ -4,14 +4,12 @@
<property name="org.wso2.ws.dataservice.protocol">jdbc:derby:../samples/DataService/database/DATA_SERV_SAMP</property>
<property name="org.wso2.ws.dataservice.user">wsas</property>
<property name="org.wso2.ws.dataservice.password">wsas</property>
- </config>
+ </config>
+
<operation name="topCustomersInCalifornia">
<call-query href="topCustomersInCaliforniaSQL" />
</operation>
- <operation name="topEmployeesInMA">
- <call-query href="topEmployeesInMASQL" />
- </operation>
- <query id="topCustomersInCaliforniaSQL">
+ <query id="topCustomersInCaliforniaSQL">
<sql>select c.CUSTOMERNUMBER, c.CONTACTLASTNAME, c.CONTACTFIRSTNAME, c.PHONE
from WSO2WSAS.ORDERS o, WSO2WSAS.ORDERDETAILS od, WSO2WSAS.PRODUCTS p, WSO2WSAS.CUSTOMERS c
where o.ORDERNUMBER = od.ORDERNUMBER and od.PRODUCTCODE = p.PRODUCTCODE
@@ -28,6 +26,10 @@
<element name="telephone" column="PHONE" />
</result>
</query>
+
+ <operation name="topEmployeesInMA">
+ <call-query href="topEmployeesInMASQL" />
+ </operation>
<query id="topEmployeesInMASQL">
<sql>select e.EMPLOYEENUMBER, e.LASTNAME, e.FIRSTNAME, e.JOBTITLE
from WSO2WSAS.EMPLOYEES e, WSO2WSAS.CUSTOMERS c, WSO2WSAS.ORDERS o, WSO2WSAS.ORDERDETAILS od
Modified: branches/wsas/java/2.1/wsas/java/modules/samples/DataService/dbs/ExcelSampleService.dbs
==============================================================================
--- branches/wsas/java/2.1/wsas/java/modules/samples/DataService/dbs/ExcelSampleService.dbs (original)
+++ branches/wsas/java/2.1/wsas/java/modules/samples/DataService/dbs/ExcelSampleService.dbs Wed Nov 7 03:14:56 2007
@@ -4,6 +4,9 @@
<property name="excel_datasource">./samples/DataService/resources/Products.xls</property>
</config>
+ <operation name="getProducts">
+ <call-query href="sheet1Query" />
+ </operation>
<query id="sheet1Query">
<excel>
<workbookname>Sheet1</workbookname>
@@ -16,7 +19,4 @@
<element name="Name" column="Model" />
</result>
</query>
- <operation name="getProducts">
- <call-query href="sheet1Query" />
- </operation>
</data>
More information about the Wsas-java-dev
mailing list