net.sourceforge.squirrel_sql.plugins.mysql.tab.OpenTablesTab Maven / Gradle / Ivy
package net.sourceforge.squirrel_sql.plugins.mysql.tab;
import net.sourceforge.squirrel_sql.fw.util.StringManager;
import net.sourceforge.squirrel_sql.fw.util.StringManagerFactory;
/*
* Copyright (C) 2002-2003 Colin Bell
* [email protected]
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
//import net.sourceforge.squirrel_sql.fw.util.log.ILogger;
//import net.sourceforge.squirrel_sql.fw.util.log.LoggerController;
/**
* This tab will display open tables in the database.
*
* @author Colin Bell
*/
public class OpenTablesTab extends BaseSQLTab
{
private static final StringManager s_stringMgr =
StringManagerFactory.getStringManager(OpenTablesTab.class);
/**
* This interface defines locale specific strings. This should be
* replaced with a property file.
*/
private interface i18n
{
// i18n[mysql.openTables=MySQL Open tables]
String TITLE = s_stringMgr.getString("mysql.openTables");
// i18n[mysql.displayOpenTables=(MySQL) Display open tables]
String HINT = s_stringMgr.getString("mysql.displayOpenTables");
}
/** Logger for this class. */
// private final static ILogger s_log =
// LoggerController.createLogger(OpenTablesTab.class);
public OpenTablesTab()
{
super(i18n.TITLE, i18n.HINT);
}
protected String getSQL()
{
final String catalog = getDatabaseObjectInfo().getSimpleName();
return "show open tables from " + catalog;
}
}