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

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

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

Repository.loadDatabaseMeta介绍

[英]Load the Database connection Metadata from the repository
[中]从存储库加载数据库连接元数据

代码示例

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

@Override
public DatabaseMeta loadDatabaseMeta( ObjectId objectId, String s ) throws KettleException {
 return getDelegate().loadDatabaseMeta( objectId, s );
}

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

ObjectId[] dbIdList = repository.getDatabaseIDs( false );
for ( ObjectId dbId : dbIdList ) {
 DatabaseMeta dbMeta = repository.loadDatabaseMeta( dbId, null );
 RepositoryElementMetaInterface repoMeta =
  repository.getObjectInformation( dbId, RepositoryObjectType.DATABASE );

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

DatabaseMeta databaseMeta = rep.loadDatabaseMeta( id, null );
validateImportedElement( importRules, databaseMeta );
sharedObjects.storeObject( databaseMeta );

代码示例来源: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 ) {
 DatabaseMeta databaseMeta = rep.loadDatabaseMeta( id, null ); // reads last version
 databaseMeta.setName( newname );
 rep.insertLogEntry( "Renaming database connection '"

相关文章

Repository类方法