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: * An event object for QBEBuilders, QBEListeners
24: */
25: public class QBEEvent extends java.awt.AWTEvent {
26:
27: private String _sql;
28: private int _type;
29:
30: public static final int TYPE_SQL_PREVIEW = 0;
31: public static final int TYPE_FILTER_PREVIEW = 1;
32:
33: public QBEEvent(QBEBuilder source, int type, String SQL) {
34: super (source, 0);
35: _type = type;
36: _sql = SQL;
37: }
38:
39: /**
40: * Return the SQL or filter the QBE will run
41: */
42: public String getFilter() {
43: return _sql;
44: }
45:
46: /**
47: * Replace the SQL or filter the QBE will run
48: */
49: public void setFilter(String filter) {
50: _sql = filter;
51: }
52:
53: /**
54: * Returns the type of event TYPE_SQL_PREVIEW or TYPE_FILTER_PREVIEW
55: */
56: public int getType() {
57: return _type;
58: }
59:
60: }
|