本文整理汇总了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);
}
}
}
}
示例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);
}
}
}
}
示例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()};
}
示例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() };
}