1 | public class CatalogsTab extends BaseDataSetTab↵ | | 1 | public class NumericFunctionsTab extends BaseDataSetTab↵
|
2 | {↵ | | 2 | {↵
|
| | | 3 | ↵
|
3 | /** Internationalized strings for this class. */↵ | | 4 | /** Internationalized strings for this class. */↵
|
4 | private static final StringManager s_stringMgr =↵ | | 5 | private static final StringManager s_stringMgr =↵
|
5 | StringManagerFactory.getStringManager(CatalogsTab.class);↵ | | 6 | StringManagerFactory.getStringManager(NumericFunctionsTab.class);↵
|
6 | ↵ | | 7 | ↵
|
7 | /**↵ | | 8 | /**↵
|
8 | * Return the title for the tab.↵ | | 9 | * Return the title for the tab.↵
|
9 | *↵ | | 10 | *↵
|
10 | * @return The title for the tab.↵ | | 11 | * @return The title for the tab.↵
|
11 | */↵ | | 12 | */↵
|
12 | public String getTitle()↵ | | 13 | public String getTitle()↵
|
13 | {↵ | | 14 | {↵
|
14 | // i18n[CatalogsTab.title=Catalogs]↵ | | 15 | // i18n[NumericFunctionsTab.title=Numeric Functions]↵
|
15 | return s_stringMgr.getString("CatalogsTab.title");↵ | | 16 | return s_stringMgr.getString("NumericFunctionsTab.title");↵
|
16 | }↵ | | 17 | }↵
|
|
17 | /**↵ | | 18 | /**↵
|
18 | * Return the hint for the tab.↵ | | 19 | * Return the hint for the tab.↵
|
19 | *↵ | | 20 | *↵
|
20 | * @return The hint for the tab.↵ | | 21 | * @return The hint for the tab.↵
|
21 | */↵ | | 22 | */↵
|
22 | public String getHint()↵ | | 23 | public String getHint()↵
|
23 | {↵ | | 24 | {↵
|
24 | // i18n[CatalogsTab.hint=Show all the catalogs]↵ | | 25 | // i18n[NumericFunctionsTab.hint=Show all the numeric functions available in DBMS]↵
|
25 | return s_stringMgr.getString("CatalogsTab.hint");↵ | | 26 | return s_stringMgr.getString("NumericFunctionsTab.hint");↵
|
26 | }↵ | | 27 | }↵
|
|
27 | /**↵ | | 28 | /**↵
|
28 | * Create the <TT>IDataSet</TT> to be displayed in this tab.↵ | | 29 | * Create the <TT>IDataSet</TT> to be displayed in this tab.↵
|
29 | */↵ | | 30 | */↵
|
30 | protected IDataSet createDataSet() throws DataSetException↵ | | 31 | protected IDataSet createDataSet() throws DataSetException↵
|
31 | {↵ | | 32 | {↵
|
32 | final ISession session = getSession();↵ | | 33 | final ISession session = getSession();↵
|
33 | try↵ | | 34 | try↵
|
34 | {↵ | | 35 | {↵
|
35 | final SQLDatabaseMetaData md = session.getSQLConnection().getSQLMetaData();↵ | | 36 | final SQLDatabaseMetaData md = session.getSQLConnection().getSQLMetaData();↵
|
36 | return new ObjectArrayDataSet(md.getCatalogs());↵ | | 37 | return new ObjectArrayDataSet(md.getNumericFunctions());↵
|
37 | }↵ | | 38 | }↵
|
38 | catch (SQLException ex)↵ | | 39 | catch (SQLException ex)↵
|
39 | {↵ | | 40 | {↵
|
40 | throw new DataSetException(ex) | | 41 | throw new DataSetException(ex)
|