当前位置: 首页>>代码示例>>Java>>正文


Java Database.getTablenames方法代码示例

本文整理汇总了Java中org.pentaho.di.core.database.Database.getTablenames方法的典型用法代码示例。如果您正苦于以下问题:Java Database.getTablenames方法的具体用法?Java Database.getTablenames怎么用?Java Database.getTablenames使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.pentaho.di.core.database.Database的用法示例。


在下文中一共展示了Database.getTablenames方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getInputData

import org.pentaho.di.core.database.Database; //导入方法依赖的package包/类
public boolean getInputData()
{
	// Get some data...
	CopyTableWizardPage1 page1 = (CopyTableWizardPage1)getPreviousPage();
	
	Database sourceDb = new Database(page1.getSourceDatabase());
	try
	{
		sourceDb.connect();
		input = sourceDb.getTablenames();
	}
	catch(KettleDatabaseException dbe)
	{
		new ErrorDialog(shell, Messages.getString("CopyTableWizardPage2.ErrorGettingTables.DialogTitle"), Messages.getString("CopyTableWizardPage2.ErrorGettingTables.DialogMessage"), dbe); //$NON-NLS-1$ //$NON-NLS-2$
		input = null;
		return false;
	}
	finally
	{
		sourceDb.disconnect();
	}
	return true;
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:24,代码来源:CopyTableWizardPage2.java

示例2: getInputData

import org.pentaho.di.core.database.Database; //导入方法依赖的package包/类
public boolean getInputData()
{
	// Get some data...
	RipDatabaseWizardPage1 page1 = (RipDatabaseWizardPage1)getPreviousPage();
	
	Database sourceDb = new Database(page1.getSourceDatabase());
	try
	{
		sourceDb.connect();
		input = sourceDb.getTablenames(false); // Don't include the schema since it can cause invalid syntax
	}
	catch(KettleDatabaseException dbe)
	{
		new ErrorDialog(shell, "Error getting tables", "Error obtaining table list from database!", dbe);
		input = null;
		return false;
	}
	finally
	{
		sourceDb.disconnect();
	}
	return true;
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:24,代码来源:RipDatabaseWizardPage2.java

示例3: getInputData

import org.pentaho.di.core.database.Database; //导入方法依赖的package包/类
public boolean getInputData()
{
	// Get some data...
	CopyTableWizardPage1 page1 = (CopyTableWizardPage1)getPreviousPage();
	
	Database sourceDb = new Database(CopyTableWizard.loggingObject, page1.getSourceDatabase());
	try
	{
		sourceDb.connect();
		input = sourceDb.getTablenames();
	}
	catch(KettleDatabaseException dbe)
	{
		new ErrorDialog(shell, BaseMessages.getString(PKG, "CopyTableWizardPage2.ErrorGettingTables.DialogTitle"), BaseMessages.getString(PKG, "CopyTableWizardPage2.ErrorGettingTables.DialogMessage"), dbe); //$NON-NLS-1$ //$NON-NLS-2$
		input = null;
		return false;
	}
	finally
	{
		sourceDb.disconnect();
	}
	return true;
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:24,代码来源:CopyTableWizardPage2.java

示例4: getInputData

import org.pentaho.di.core.database.Database; //导入方法依赖的package包/类
public boolean getInputData()
{
	// Get some data...
	RipDatabaseWizardPage1 page1 = (RipDatabaseWizardPage1)getPreviousPage();
	
	Database sourceDb = new Database(RipDatabaseWizard.loggingObject, page1.getSourceDatabase());
	try
	{
		sourceDb.connect();
		input = sourceDb.getTablenames(false); // Don't include the schema since it can cause invalid syntax
	}
	catch(KettleDatabaseException dbe)
	{
		new ErrorDialog(shell, "Error getting tables", "Error obtaining table list from database!", dbe);
		input = null;
		return false;
	}
	finally
	{
		sourceDb.disconnect();
	}
	return true;
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:24,代码来源:RipDatabaseWizardPage2.java

示例5: getTableName

import org.pentaho.di.core.database.Database; //导入方法依赖的package包/类
private void getTableName()
	{
		DatabaseMeta databaseMeta = jobMeta.findDatabase(wConnection.getText());
		if (databaseMeta!=null)
		{
			Database database = new Database(databaseMeta);
			try
			{
				database.connect();
				String Tablenames[]=database.getTablenames();
				EnterSelectionDialog dialog = new EnterSelectionDialog(shell, Tablenames, Messages.getString("JobTruncateTables.SelectTables.Title"), Messages.getString("JobTruncateTables.SelectTables.Message"));
				dialog.setMulti(true);

				if (dialog.open()!=null)
				{
					int idx[] = dialog.getSelectionIndeces();
					for (int i=0;i<idx.length;i++)
					{
						TableItem tableItem = new TableItem(wFields.table, SWT.NONE);
						tableItem.setText(1, Tablenames[idx[i]]);
					}
				}
			}
			catch(KettleDatabaseException e)
			{
				new ErrorDialog(shell, Messages.getString("System.Dialog.Error.Title"), Messages.getString("JobEntryTruncateTables.ConnectionError.DialogMessage"), e);
			}
			finally
			{
				if(database!=null) database.disconnect();
			}
		    wFields.removeEmptyRows();
		    wFields.setRowNums();
		    wFields.optWidth(true);
		 
		}
		
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:39,代码来源:JobEntryTruncateTablesDialog.java

示例6: getTableName

import org.pentaho.di.core.database.Database; //导入方法依赖的package包/类
private void getTableName()
	{
		DatabaseMeta databaseMeta = jobMeta.findDatabase(wConnection.getText());
		if (databaseMeta!=null)
		{
			Database database = new Database(loggingObject, databaseMeta);
			try
			{
				database.connect();
				String Tablenames[]=database.getTablenames();
				EnterSelectionDialog dialog = new EnterSelectionDialog(shell, Tablenames, BaseMessages.getString(PKG, "JobTruncateTables.SelectTables.Title"), BaseMessages.getString(PKG, "JobTruncateTables.SelectTables.Message"));
				dialog.setMulti(true);
				dialog.setAvoidQuickSearch();
				if (dialog.open()!=null)
				{
					int idx[] = dialog.getSelectionIndeces();
					for (int i=0;i<idx.length;i++)
					{
						TableItem tableItem = new TableItem(wFields.table, SWT.NONE);
						tableItem.setText(1, Tablenames[idx[i]]);
					}
				}
			}
			catch(KettleDatabaseException e)
			{
				new ErrorDialog(shell, BaseMessages.getString(PKG, "System.Dialog.Error.Title"), BaseMessages.getString(PKG, "JobEntryTruncateTables.ConnectionError.DialogMessage"), e);
			}
			finally
			{
				if(database!=null) database.disconnect();
			}
		    wFields.removeEmptyRows();
		    wFields.setRowNums();
		    wFields.optWidth(true);
		 
		}
		
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:39,代码来源:JobEntryTruncateTablesDialog.java


注:本文中的org.pentaho.di.core.database.Database.getTablenames方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。