util.sql
Class MandatoryUpdateProcessor

java.lang.Object
  |
  +--util.sql.MandatoryUpdateProcessor
All Implemented Interfaces:
UpdateProcessor

public class MandatoryUpdateProcessor
extends java.lang.Object
implements UpdateProcessor

An update processor that mandates that at least one row have been updated as part of the query. Throws an exception if otherwise.

Since:
12/3/2001
Version:
1.0
Author:
Ryan Daigle

Method Summary
static UpdateProcessor getInstance()
          Get an instance of this update processor.
 void process(int rows)
          Takes the number of rows that were updated as a result of a sql update and do whatever you want with it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static UpdateProcessor getInstance()
Get an instance of this update processor.
Returns:
an instance of this update processor

process

public void process(int rows)
Takes the number of rows that were updated as a result of a sql update and do whatever you want with it.

In this case, an update is mandatory, so if no rows were updated then throw an exception.

Specified by:
process in interface UpdateProcessor
Parameters:
rows - the number of rows updated
Throws:
SQLException -