Explicit Create,Update,DeleteThe RDB DAS provides a simple, command-oriented approach for CUD operations. The Commands can be explicit INSERT, UPDATE , DELETE SQL statements like
Below is example config. <Config xmlns="http:///org.apache.tuscany.das.rdb/config.xsd"> <Command name="insert customer" SQL="insert into CUSTOMER (ID, LASTNAME, ADDRESS) values (?, ?, ?)" kind="Insert"> </Command> <Command name="delete customer" SQL="delete from CUSTOMER where ID = ?" kind="Delete"> </Command> <Command name="update customer" SQL="update CUSTOMER set LASTNAME = 'Pavick' where ID = ?" kind="Update"> </Command> </Config> Another way to perform the same operations is through use of SDO DataObjects. For this, the root DataObject needs to be formed either in static (DataObjectModel) or dynamic way (using Database Query's ResultSetMetaData). With the root DataObject in place, it uses, SDO APIs for DataObject and ChangeSummary to perform create, delete, update. For more details check (WorkingWithBasicCrud). |