| com.mockrunner.example.jdbc.PayAction
PayAction | public class PayAction extends Action (Code) | | This example simulates the paying of a bill. It checks the id of the customer,
the id of the bill and the amount. If an error occurs the transaction is
rolled back and an ActionError is created.
This action uses three tables. The table customers has two columns,
id and name. The table openbills has three columns,
id, customerid and amount. The table paidbills
is equivalent to openbills. If a bill is successfully paid, the
action deletes the corresponding row from openbills and inserts
it into paidbills.
|
|
|