summaryrefslogtreecommitdiffstats
path: root/sandbox/amita/sca/modules/implementation-data-sdo/README
blob: 3eada63f1d2a1c09ea6d53db9048094ea69cf227 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Tuscany implementation SDO
===============================
Persistence technology is a very part of enterprise level application system. Tuscany has provided 
SDO implementation and a non standard but useful DAS infrastructure. This module leverages the SDO-
DAS integration to provide basic CRUD support for the SCA components' interaction with DataSource. The
current Tuscany DAS implementation is RDB DAS and so this module demonstrates CRUD support for Database 
Operations. 

This module is under the process of more improvement: Integration with policy-transaction is yet TBD.

For the time being, user of this module could configure a component as did by the *.composite file 
in this module. It supports org.apache.tuscany.sca.implementation.data.collection.Collection interface.
It is a very generic interface supporting CRUD operations. User of this module could use all the method 
provided by this interface. Also this module uses tuscany-data-engine-helper module for the common refactored
methods.

As this is exposing SDO as a way of data transfer, when referring to above interface parameterized APIs,
the user will see that in <K(ey), D(data)> parameters, K is a List of Primary Key column values and D is
a DataObject. K is supported as a List instead of a String to take care of compound PKs often encountered in
Data Sources. Also, when using put((K key, D item), D - DataObject is required to be DataGraph with ChangeSummary 
to truly use the potential of SDO.
 
The data base working in this module is now Derby, it is for the ease of test running. MySQL could also work 
with this module, but it need database deployment in before.

The test case uses RDB DAS utility tuscany-samples-dbconfig for database creation and initialization.

User could get start from looking at what is done by:
org.apache.tuscany.sca.implementation.openjpa.ImplSDOTestCase 
and
sdo.composite

In sdo.composite, implementation.sdo supports two attributes - {"table" - name of table for which CRUD is required
and "key" - comma separated column names consisting of PKs of the table. If attribute "key" is omitted, "ID" is assumed 
to be the PK column name as convention.} and one element connectionInfo supplying necessary information to connect to 
the RDB data source.