org.pentaho.di.repository.Repository.getDatabaseID()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(3.8k)|赞(0)|评价(0)|浏览(104)

本文整理了Java中org.pentaho.di.repository.Repository.getDatabaseID方法的一些代码示例,展示了Repository.getDatabaseID的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Repository.getDatabaseID方法的具体详情如下:
包路径:org.pentaho.di.repository.Repository
类名称:Repository
方法名:getDatabaseID

Repository.getDatabaseID介绍

暂无

代码示例

代码示例来源:origin: pentaho/pentaho-kettle

@Override
public ObjectId getDatabaseID( String s ) throws KettleException {
 return getDelegate().getDatabaseID( s );
}

代码示例来源:origin: pentaho/pentaho-kettle

dbMetaToReplace.setObjectId( repo.getDatabaseID( dbMetaToReplace.getName() ) );
jobMeta.removeDatabase( indexToReplace );
jobMeta.addDatabase( dbMetaToReplace );

代码示例来源:origin: pentaho/pentaho-kettle

repo.getDatabaseID( transMeta.getDatabase( databaseMetaIndex ).getName() ) );

代码示例来源:origin: pentaho/pentaho-kettle

ObjectId idDatabase = repository.getDatabaseID( databaseMeta.getName() );
if ( idDatabase == null ) {
 MessageBox mb = new MessageBox( shell, SWT.ICON_ERROR | SWT.OK );
  databaseMeta.setDisplayName( dbName );
  if ( !dbName.isEmpty() ) {
   ObjectId idRenamed = repository.getDatabaseID( dbName );
   if ( idRenamed == null || idRenamed.equals( idDatabase ) ) {

代码示例来源:origin: pentaho/pentaho-kettle

public void editDatabase( String databasename ) {
 try {
  ObjectId idDatabase = rep.getDatabaseID( databasename );
  DatabaseMeta databaseMeta = rep.loadDatabaseMeta( idDatabase, null ); // reads last version
  getDatabaseDialog().setDatabaseMeta( databaseMeta );
  String name = getDatabaseDialog().open();
  if ( name != null ) {
   if ( !readonly ) {
    rep.insertLogEntry( "Updating database connection '"
     + getDatabaseDialog().getDatabaseMeta().getName() + "'" );
    rep.save( databaseMeta, Const.VERSION_COMMENT_EDIT_VERSION, null );
   } else {
    MessageBox mb = new MessageBox( shell, SWT.ICON_WARNING | SWT.OK );
    mb.setMessage( BaseMessages.getString(
     PKG, "RepositoryExplorerDialog.Connection.Edit.NotAllowed.Message" ) );
    mb.setText( BaseMessages.getString( PKG, "RepositoryExplorerDialog.Connection.Edit.NotAllowed.Title" ) );
    mb.open();
   }
   if ( !databasename.equalsIgnoreCase( name ) ) {
    refreshTree();
   }
  }
 } catch ( KettleException e ) {
  new ErrorDialog(
   shell,
   BaseMessages.getString( PKG, "RepositoryExplorerDialog.Connection.Edit.UnexpectedError.Title" ), BaseMessages
    .getString( PKG, "RepositoryExplorerDialog.Connection.Edit.UnexpectedError.Message" )
    + databasename + "]", e );
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

ObjectId id = rep.getDatabaseID( name );
if ( id != null ) {

代码示例来源:origin: pentaho/pentaho-kettle

ObjectId idDatabase = repository.getDatabaseID( dbName );
if ( idDatabase == null ) {
 repository.insertLogEntry( BaseMessages.getString(

代码示例来源:origin: pentaho/pentaho-kettle

ObjectId idDatabase = repository.getDatabaseID( databaseMeta.getName() );
if ( idDatabase == null ) {
 MessageBox mb = new MessageBox( shell, SWT.ICON_ERROR | SWT.OK );

代码示例来源:origin: pentaho/pentaho-kettle

public void newDatabase() {
 try {
  DatabaseMeta databaseMeta = new DatabaseMeta();
  databaseMeta.initializeVariablesFrom( null );
  getDatabaseDialog().setDatabaseMeta( databaseMeta );
  String name = getDatabaseDialog().open();
  if ( name != null ) {
   // See if this user already exists...
   ObjectId idDatabase = rep.getDatabaseID( name );
   if ( idDatabase == null ) {
    rep.insertLogEntry( "Creating new database '" + databaseMeta.getName() + "'" );
    rep.save( databaseMeta, Const.VERSION_COMMENT_INITIAL_VERSION, null );
   } else {
    MessageBox mb = new MessageBox( shell, SWT.ICON_ERROR | SWT.OK );
    mb.setMessage( BaseMessages.getString(
     PKG, "RepositoryExplorerDialog.Connection.Create.AlreadyExists.Message" ) );
    mb.setText( BaseMessages.getString(
     PKG, "RepositoryExplorerDialog.Connection.Create.AlreadyExists.Title" ) );
    mb.open();
   }
   // Refresh tree...
   refreshTree();
  }
 } catch ( KettleException e ) {
  new ErrorDialog( shell,
   BaseMessages.getString( PKG, "RepositoryExplorerDialog.Connection.Create.UnexpectedError.Title" ),
   BaseMessages.getString( PKG, "RepositoryExplorerDialog.Connection.Create.UnexpectedError.Message" ), e );
 }
}

相关文章

Repository类方法