01: //** Copyright Statement ***************************************************
02: //The Salmon Open Framework for Internet Applications (SOFIA)
03: // Copyright (C) 1999 - 2002, Salmon LLC
04: //
05: // This program is free software; you can redistribute it and/or
06: // modify it under the terms of the GNU General Public License version 2
07: // as published by the Free Software Foundation;
08: //
09: // This program is distributed in the hope that it will be useful,
10: // but WITHOUT ANY WARRANTY; without even the implied warranty of
11: // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12: // GNU General Public License for more details.
13: //
14: // You should have received a copy of the GNU General Public License
15: // along with this program; if not, write to the Free Software
16: // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17: //
18: // For more information please visit http://www.salmonllc.com
19: //** End Copyright Statement ***************************************************
20:
21: package com.salmonllc.sql;
22:
23: import java.sql.SQLException;
24:
25: /**
26: * Indicates stale data during row deletes and updates
27: * used in conjunction with concurrency validation
28: * @author Tyler Williams
29: */
30: public class DirtyDataException extends SQLException {
31: private int _row;
32: private int _buffer;
33:
34: public DirtyDataException(String msg) {
35: super (msg);
36: _row = -1;
37: }
38:
39: void setRowAndBuffer(int row, int buffer) {
40: _row = row;
41: _buffer = buffer;
42: }
43:
44: public DirtyDataException(String msg, int row, int buffer) {
45: super (msg);
46: _row = row;
47: _buffer = buffer;
48: }
49:
50: public int getRow() {
51: return _row;
52: }
53:
54: public int getBuffer() {
55: return _buffer;
56: }
57: }
|