|
|
|
MyEntityImpl:
Posting Changes Programmatically
|
|
|
|
|
|
The class inherits
basic ADF behavior from oracle.jbo.server.EntityImpl class and is responsible
for data changes in programmatic mode.
|
|
|
|
This new class
provides alternative implementation for data source dependent methods,
replacing default JDBC processing with calls to WSDS client.
|
|
|
|
Here are the
affected methods:
|
|
-
postChanges()
|
|
- doSelect()
|
|
- doDML()
|
|
- lock()
|
|
|
|
1st method is an
explicit point to call if DML operation isn't invoked by ADF as result of
Transaction.commit(). So, it should be called in programmatic mode from the
application's new “commit” processor, we will see this later.
|
|
|
|
2nd method is used
to refresh entity content from the database, in fact, it's a query that is
processed by ExecuteQuery operation discussed before.
|
|
|
|
3rd method defines
new WSDS operation - "ExecuteDML".
|
|
|
|
Programmatic mode is
based on Entity and Attribute states provided by ADF. These states define DML
action and its parameters, including modified attributes and their new
values. Getting names from static definitions, we construct the entire SQL
statement. Together with new attribute values, this statement enters into parameters to WSDS client.
|
|
|
|
4th method prevents
default JDBC call for locking the row in database. In programmatic mode, we
just ignore this call because we don't manage database transactions from the
client.
|