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: package com.salmonllc.sql;
21:
22: /////////////////////////
23: //$Archive: /SOFIA/SourceCode/com/salmonllc/sql/SQLPreviewEvent.java $
24: //$Author: Srufle $
25: //$Revision: 9 $
26: //$Modtime: 4/15/03 1:56a $
27: /////////////////////////
28:
29: /**
30: * This object will be created and passed to every SQLPreview method in registered SQLPreviewListener objects.
31: * @see SQLPreviewListener
32: */
33:
34: public class SQLPreviewEvent extends java.awt.AWTEvent {
35: DataStore _ds;
36: int _buffer;
37: int _row;
38: String _statement;
39: DBConnection _conn;
40:
41: /**
42: * Constructs a new PageEvent object.
43: */
44: public SQLPreviewEvent(DataStore ds, int buffer, int row,
45: String statement, DBConnection conn) {
46: super (ds, 0);
47: _ds = ds;
48: _buffer = buffer;
49: _row = row;
50: _statement = statement;
51: _conn = conn;
52:
53: }
54:
55: /**
56: * This method will return the DataStore buffer that the statement was generated from.
57: */
58: public int getBuffer() {
59: return _buffer;
60: }
61:
62: /**
63: * This method will return the DBConnection object that will be used to execute the statement.
64: */
65: public DBConnection getConnection() {
66: return _conn;
67: }
68:
69: /**
70: * This method will return the DataStore that the event was fired from.
71: */
72: public DataStore getDataStore() {
73: return _ds;
74: }
75:
76: /**
77: * This method will return the DataStore row that the statement was generated from.
78: */
79: public int getRow() {
80: return _row;
81: }
82:
83: /**
84: * This method will return the SQL statement was generated.
85: */
86: public String getStatement() {
87: return _statement;
88: }
89: }
|