01: /*
02: * Copyright (C) 2007 Rob Manning
03: * manningr@users.sourceforge.net
04: *
05: * This library is free software; you can redistribute it and/or
06: * modify it under the terms of the GNU Lesser General Public
07: * License as published by the Free Software Foundation; either
08: * version 2.1 of the License, or (at your option) any later version.
09: *
10: * This library is distributed in the hope that it will be useful,
11: * but WITHOUT ANY WARRANTY; without even the implied warranty of
12: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13: * Lesser General Public License for more details.
14: *
15: * You should have received a copy of the GNU Lesser General Public
16: * License along with this library; if not, write to the Free Software
17: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18: */
19: package net.sourceforge.squirrel_sql.client.session.mainpanel;
20:
21: import java.awt.Component;
22:
23: import net.sourceforge.squirrel_sql.client.session.SQLExecutionInfo;
24: import net.sourceforge.squirrel_sql.fw.datasetviewer.DataSetException;
25: import net.sourceforge.squirrel_sql.fw.datasetviewer.IDataSetUpdateableTableModel;
26: import net.sourceforge.squirrel_sql.fw.datasetviewer.ResultSetDataSet;
27: import net.sourceforge.squirrel_sql.fw.datasetviewer.ResultSetMetaDataDataSet;
28: import net.sourceforge.squirrel_sql.fw.id.IHasIdentifier;
29: import net.sourceforge.squirrel_sql.fw.id.IIdentifier;
30:
31: public interface IResultTab {
32:
33: void reInit(IDataSetUpdateableTableModel creator,
34: SQLExecutionInfo exInfo);
35:
36: /**
37: * Show the results from the passed <TT>IDataSet</TT>.
38: *
39: * @param rsds <TT>ResultSetDataSet</TT> to show results for.
40: * @param mdds <TT>ResultSetMetaDataDataSet</TT> for rsds.
41: * @param exInfo Execution info.
42: *
43: * @throws IllegalArgumentException
44: * Thrown if <tt>null</tt> <tt>SQLExecutionInfo</tt> passed.
45: *
46: * @throws DataSetException
47: * Thrown if error occured processing dataset.
48: */
49: void showResults(ResultSetDataSet rsds,
50: ResultSetMetaDataDataSet mdds, SQLExecutionInfo exInfo)
51: throws DataSetException;
52:
53: /**
54: * Clear results and current SQL script.
55: */
56: void clear();
57:
58: /**
59: * Return the current SQL script.
60: *
61: * @return Current SQL script.
62: */
63: String getSqlString();
64:
65: /**
66: * Return the current SQL script with control characters removed.
67: *
68: * @return Current SQL script.
69: */
70: String getViewableSqlString();
71:
72: /**
73: * Return the title for this tab.
74: */
75: String getTitle();
76:
77: /**
78: * Close this tab.
79: */
80: void closeTab();
81:
82: void returnToTabbedPane();
83:
84: Component getOutputComponent();
85:
86: void reRunSQL();
87:
88: /**
89: * @see IHasIdentifier#getIdentifier()
90: */
91: IIdentifier getIdentifier();
92:
93: }
|