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


Java DatabaseExplorerDialog.getSchemaName方法代码示例

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


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

示例1: quickVisualizeTable

import org.pentaho.di.ui.core.database.dialog.DatabaseExplorerDialog; //导入方法依赖的package包/类
public void quickVisualizeTable() {
  Spoon spoon = ((Spoon)SpoonFactory.getInstance());
  if( spoon.getSelectionObject() instanceof DatabaseMeta ) {
    final DatabaseMeta databaseMeta = (DatabaseMeta) spoon.getSelectionObject();
    
    DatabaseExplorerDialog std = new DatabaseExplorerDialog(spoon.getShell(), SWT.NONE, databaseMeta, new ArrayList<DatabaseMeta>());
    if (std.open()) {
        
      TableModelerSource source = new TableModelerSource( databaseMeta, std.getTableName(), std.getSchemaName() == null ? "" : std.getSchemaName() ); //$NON-NLS-1$
      if( source.getSchemaName() == null ) {
        source.setSchemaName(""); //$NON-NLS-1$
      }

      try{
        ModelerWorkspace model = createModelerWorkspace();
        ModelerWorkspaceUtil.populateModelFromSource(model, source);
        quickVisualize( model );
      } catch(Exception e){
        logger.error("Error opening visualization", e);
        new ErrorDialog(((Spoon) SpoonFactory.getInstance()).getShell(), "Error", "Error executing Quick Visualize", e);
      }
    }
  }
}
 
开发者ID:pentaho,项目名称:pdi-agile-bi-plugin,代码行数:25,代码来源:ModelerHelper.java

示例2: databaseModelItem

import org.pentaho.di.ui.core.database.dialog.DatabaseExplorerDialog; //导入方法依赖的package包/类
public void databaseModelItem() {
  Spoon spoon = ((Spoon)SpoonFactory.getInstance());
  if( spoon.getSelectionObject() instanceof DatabaseMeta ) {
    final DatabaseMeta databaseMeta = (DatabaseMeta) spoon.getSelectionObject();
    
    DatabaseExplorerDialog std = new DatabaseExplorerDialog(spoon.getShell(), SWT.NONE, databaseMeta, new ArrayList<DatabaseMeta>());
    if (std.open()) {
        
      TableModelerSource source = new TableModelerSource( databaseMeta, std.getTableName(), std.getSchemaName());
      try{
        ModelerWorkspace model = createModelerWorkspace();
        ModelerWorkspaceUtil.populateModelFromSource(model, source);
        AgileBiModelerPerspective.getInstance().createTabForModel(model, getUniqueUntitledTabName(spoon, MODELER_NAME));
      } catch(Exception e){
        logger.error("Error creating model", e);
        new ErrorDialog(((Spoon) SpoonFactory.getInstance()).getShell(), "Error", "Error creating Modeler", e);
      }
    }
  }
}
 
开发者ID:pentaho,项目名称:pdi-agile-bi-plugin,代码行数:21,代码来源:ModelerHelper.java

示例3: exploreDB

import org.pentaho.di.ui.core.database.dialog.DatabaseExplorerDialog; //导入方法依赖的package包/类
/**
 * return a schema, table combination from the explorer
 * 
 * @param databaseMeta
 * @param aLook
 * @return schema [0] and table [1]
 */
public String[] exploreDB(DatabaseMeta databaseMeta, boolean aLook)
{
	List<DatabaseMeta> databases = null;
	HasDatabasesInterface activeHasDatabasesInterface = spoon.getActiveHasDatabasesInterface();
	if (activeHasDatabasesInterface != null)
		databases = activeHasDatabasesInterface.getDatabases();

	DatabaseExplorerDialog std = new DatabaseExplorerDialog(spoon.getShell(), SWT.NONE, databaseMeta,
			databases, aLook);
	std.open();
	return new String[] {std.getSchemaName(), std.getTableName()};
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:20,代码来源:SpoonDBDelegate.java

示例4: exploreDB

import org.pentaho.di.ui.core.database.dialog.DatabaseExplorerDialog; //导入方法依赖的package包/类
/**
 * return a schema, table combination from the explorer
 *
 * @param databaseMeta
 * @param aLook
 * @return schema [0] and table [1]
 */
public String[] exploreDB( DatabaseMeta databaseMeta, boolean aLook ) {
  List<DatabaseMeta> databases = null;
  HasDatabasesInterface activeHasDatabasesInterface = spoon.getActiveHasDatabasesInterface();
  if ( activeHasDatabasesInterface != null ) {
    databases = activeHasDatabasesInterface.getDatabases();
  }

  DatabaseExplorerDialog std =
    new DatabaseExplorerDialog( spoon.getShell(), SWT.NONE, databaseMeta, databases, aLook );
  std.open();
  return new String[] { std.getSchemaName(), std.getTableName() };
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:20,代码来源:SpoonDBDelegate.java


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