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


Java KettleDependencyException类代码示例

本文整理汇总了Java中org.pentaho.di.core.exception.KettleDependencyException的典型用法代码示例。如果您正苦于以下问题:Java KettleDependencyException类的具体用法?Java KettleDependencyException怎么用?Java KettleDependencyException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


KettleDependencyException类属于org.pentaho.di.core.exception包,在下文中一共展示了KettleDependencyException类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: delClusterSchema

import org.pentaho.di.core.exception.KettleDependencyException; //导入依赖的package包/类
public synchronized void delClusterSchema( ObjectId id_cluster ) throws KettleException {
  // First, see if the schema is still used by other objects...
  // If so, generate an error!!
  //
  // We look in table R_TRANS_CLUSTER to see if there are any transformations using this schema.
  String[] transList = repository.getTransformationsUsingCluster( id_cluster );

  if ( transList.length == 0 ) {
    repository.connectionDelegate.performDelete( "DELETE FROM "
      + quoteTable( KettleDatabaseRepository.TABLE_R_CLUSTER ) + " WHERE "
      + quote( KettleDatabaseRepository.FIELD_CLUSTER_ID_CLUSTER ) + " = ? ", id_cluster );
  } else {
    StringBuilder message = new StringBuilder();

    message.append( "The cluster schema is used by the following transformations:" ).append( Const.CR );
    for ( int i = 0; i < transList.length; i++ ) {
      message.append( "  " ).append( transList[i] ).append( Const.CR );
    }
    message.append( Const.CR );

    KettleDependencyException e = new KettleDependencyException( message.toString() );
    throw new KettleDependencyException( "This cluster schema is still in use by one or more transformations ("
      + transList.length + ") :", e );
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:26,代码来源:KettleDatabaseRepositoryClusterSchemaDelegate.java

示例2: delDatabase

import org.pentaho.di.core.exception.KettleDependencyException; //导入依赖的package包/类
public synchronized void delDatabase(long id_database) throws KettleException
{
	// First, see if the database connection is still used by other connections...
	// If so, generate an error!!
	// We look in table R_STEP_DATABASE to see if there are any steps using this database.
	//
	String[] transList = getTransformationsUsingDatabase(id_database);
       
	// TODO: add check for jobs too.
	// TODO: add R_JOBENTRY_DATABASE table & lookups.
	
	if (transList.length==0)
	{
		String sql = "DELETE FROM "+databaseMeta.getQuotedSchemaTableCombination(null, TABLE_R_DATABASE)+" WHERE "+quote(FIELD_DATABASE_ID_DATABASE)+" = " + id_database;
		database.execStatement(sql);
	}
	else
	{
		
		String message = "Database used by the following transformations:"+Const.CR;
		for (int i = 0; i < transList.length; i++)
		{
			message+="	"+transList[i]+Const.CR;
		}
		KettleDependencyException e = new KettleDependencyException(message);
		throw new KettleDependencyException("This database is still in use by one or more transformations ("+transList.length+" references)", e);
	}
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:29,代码来源:Repository.java

示例3: delPartitionSchema

import org.pentaho.di.core.exception.KettleDependencyException; //导入依赖的package包/类
public synchronized void delPartitionSchema(long id_partition_schema) throws KettleException
{
    // First, see if the schema is still used by other objects...
    // If so, generate an error!!
    //
    // We look in table R_TRANS_PARTITION_SCHEMA to see if there are any transformations using this schema.
    String[] transList = getTransformationsUsingPartitionSchema(id_partition_schema);

    if (transList.length==0)
    {
        database.execStatement("DELETE FROM "+databaseMeta.getQuotedSchemaTableCombination(null, TABLE_R_PARTITION)+" WHERE "+quote(FIELD_PARTITION_ID_PARTITION_SCHEMA)+" = " + id_partition_schema);
        database.execStatement("DELETE FROM "+databaseMeta.getQuotedSchemaTableCombination(null, TABLE_R_PARTITION_SCHEMA)+" WHERE "+quote(FIELD_PARTITION_SCHEMA_ID_PARTITION_SCHEMA)+" = " + id_partition_schema);
    }
    else
    {
        StringBuffer message = new StringBuffer();
        
        message.append("The partition schema is used by the following transformations:").append(Const.CR);
        for (int i = 0; i < transList.length; i++)
        {
            message.append("  ").append(transList[i]).append(Const.CR);
        }
        message.append(Const.CR);
        
        KettleDependencyException e = new KettleDependencyException(message.toString());
        throw new KettleDependencyException("This partition schema is still in use by one or more transformations ("+transList.length+") :", e);
    }
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:29,代码来源:Repository.java

示例4: delClusterSchema

import org.pentaho.di.core.exception.KettleDependencyException; //导入依赖的package包/类
public synchronized void delClusterSchema(long id_cluster) throws KettleException
{
    // First, see if the schema is still used by other objects...
    // If so, generate an error!!
    //
    // We look in table R_TRANS_CLUSTER to see if there are any transformations using this schema.
    String[] transList = getTransformationsUsingCluster(id_cluster);

    if (transList.length==0)
    {
        database.execStatement("DELETE FROM "+databaseMeta.getQuotedSchemaTableCombination(null, TABLE_R_CLUSTER)+" WHERE "+quote(FIELD_CLUSTER_ID_CLUSTER)+" = " + id_cluster);
    }
    else
    {
        StringBuffer message = new StringBuffer();
        
        message.append("The cluster schema is used by the following transformations:").append(Const.CR);
        for (int i = 0; i < transList.length; i++)
        {
            message.append("  ").append(transList[i]).append(Const.CR);
        }
        message.append(Const.CR);
        
        KettleDependencyException e = new KettleDependencyException(message.toString());
        throw new KettleDependencyException("This cluster schema is still in use by one or more transformations ("+transList.length+") :", e);
    }
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:28,代码来源:Repository.java

示例5: delPartitionSchema

import org.pentaho.di.core.exception.KettleDependencyException; //导入依赖的package包/类
public synchronized void delPartitionSchema(ObjectId id_partition_schema) throws KettleException
{
    // First, see if the schema is still used by other objects...
    // If so, generate an error!!
    //
    // We look in table R_TRANS_PARTITION_SCHEMA to see if there are any transformations using this schema.
    String[] transList = repository.getTransformationsUsingPartitionSchema(id_partition_schema);

    if (transList.length==0)
    {
        repository.connectionDelegate.performDelete("DELETE FROM "+quoteTable(KettleDatabaseRepository.TABLE_R_PARTITION)+" WHERE "+quote(KettleDatabaseRepository.FIELD_PARTITION_ID_PARTITION_SCHEMA)+" = ? ", id_partition_schema);
        repository.connectionDelegate.performDelete("DELETE FROM "+quoteTable(KettleDatabaseRepository.TABLE_R_PARTITION_SCHEMA)+" WHERE "+quote(KettleDatabaseRepository.FIELD_PARTITION_SCHEMA_ID_PARTITION_SCHEMA)+" = ? ", id_partition_schema);
    }
    else
    {
        StringBuffer message = new StringBuffer();
        
        message.append("The partition schema is used by the following transformations:").append(Const.CR);
        for (int i = 0; i < transList.length; i++)
        {
            message.append("  ").append(transList[i]).append(Const.CR);
        }
        message.append(Const.CR);
        
        KettleDependencyException e = new KettleDependencyException(message.toString());
        throw new KettleDependencyException("This partition schema is still in use by one or more transformations ("+transList.length+") :", e);
    }
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:29,代码来源:KettleDatabaseRepositoryPartitionSchemaDelegate.java

示例6: delDatabase

import org.pentaho.di.core.exception.KettleDependencyException; //导入依赖的package包/类
public synchronized void delDatabase(ObjectId id_database) throws KettleException
{
	repository.getSecurityProvider().validateAction(RepositoryOperation.DELETE_DATABASE);

	// First, see if the database connection is still used by other connections...
	// If so, generate an error!!
	// We look in table R_STEP_DATABASE to see if there are any steps using this database.
	//
	String[] transList = repository.getTransformationsUsingDatabase(id_database);
	String[] jobList = repository.getJobsUsingDatabase(id_database);
	
	if (jobList.length==0 && transList.length==0)
	{
	  repository.connectionDelegate.performDelete("DELETE FROM "+quoteTable(KettleDatabaseRepository.TABLE_R_DATABASE)+" WHERE "+quote(KettleDatabaseRepository.FIELD_DATABASE_ID_DATABASE)+" = ? ", id_database);
	}
	else
	{
		String message=" Database used by the following "+Const.CR;
		if(jobList.length>0)
		{
			message = "jobs :"+Const.CR;
			for (int i = 0; i < jobList.length; i++)
			{
				message+="	 "+jobList[i]+Const.CR;
			}
		}
		
		message+= "transformations:"+Const.CR;
		for (int i = 0; i < transList.length; i++)
		{
			message+="	"+transList[i]+Const.CR;
		}
		KettleDependencyException e = new KettleDependencyException(message);
		throw new KettleDependencyException("This database is still in use by " + jobList.length + " jobs and "+transList.length+" transformations references", e);
	}
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:37,代码来源:KettleDatabaseRepositoryDatabaseDelegate.java

示例7: delClusterSchema

import org.pentaho.di.core.exception.KettleDependencyException; //导入依赖的package包/类
public synchronized void delClusterSchema(ObjectId id_cluster) throws KettleException
{
    // First, see if the schema is still used by other objects...
    // If so, generate an error!!
    //
    // We look in table R_TRANS_CLUSTER to see if there are any transformations using this schema.
    String[] transList = repository.getTransformationsUsingCluster(id_cluster);

    if (transList.length==0)
    {
        repository.connectionDelegate.performDelete("DELETE FROM "+quoteTable(KettleDatabaseRepository.TABLE_R_CLUSTER)+" WHERE "+quote(KettleDatabaseRepository.FIELD_CLUSTER_ID_CLUSTER)+" = ? ", id_cluster);
    }
    else
    {
        StringBuffer message = new StringBuffer();
        
        message.append("The cluster schema is used by the following transformations:").append(Const.CR);
        for (int i = 0; i < transList.length; i++)
        {
            message.append("  ").append(transList[i]).append(Const.CR);
        }
        message.append(Const.CR);
        
        KettleDependencyException e = new KettleDependencyException(message.toString());
        throw new KettleDependencyException("This cluster schema is still in use by one or more transformations ("+transList.length+") :", e);
    }
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:28,代码来源:KettleDatabaseRepositoryClusterSchemaDelegate.java

示例8: deleteSlave

import org.pentaho.di.core.exception.KettleDependencyException; //导入依赖的package包/类
public synchronized void deleteSlave(ObjectId id_slave) throws KettleException {
  securityProvider.validateAction(RepositoryOperation.DELETE_SLAVE_SERVER);

  // First, see if the slave is still used by other objects...
  // If so, generate an error!!
  // We look in table R_TRANS_SLAVE to see if there are any transformations
  // using this slave.
  // We obviously also look in table R_CLUSTER_SLAVE to see if there are any
  // clusters that use this slave.
  //
  String[] transList = getTransformationsUsingSlave(id_slave);
  String[] clustList = getClustersUsingSlave(id_slave);

  if (transList.length == 0 && clustList.length == 0) {
    connectionDelegate.performDelete("DELETE FROM " + quoteTable(KettleDatabaseRepository.TABLE_R_SLAVE) + " WHERE " + quote(KettleDatabaseRepository.FIELD_SLAVE_ID_SLAVE) + " = ? ", id_slave);
    connectionDelegate.performDelete("DELETE FROM " + quoteTable(KettleDatabaseRepository.TABLE_R_TRANS_SLAVE) + " WHERE " + quote(KettleDatabaseRepository.FIELD_TRANS_SLAVE_ID_SLAVE) + " = ? ", id_slave);
    commit();
  } else {
    StringBuffer message = new StringBuffer();

    if (transList.length > 0) {
      message.append("Slave used by the following transformations:").append(Const.CR);
      for (int i = 0; i < transList.length; i++) {
        message.append("  ").append(transList[i]).append(Const.CR);
      }
      message.append(Const.CR);
    }
    if (clustList.length > 0) {
      message.append("Slave used by the following cluster schemas:").append(Const.CR);
      for (int i = 0; i < clustList.length; i++) {
        message.append("  ").append(clustList[i]).append(Const.CR);
      }
    }

    KettleDependencyException e = new KettleDependencyException(message.toString());
    throw new KettleDependencyException("This slave server is still in use by one or more transformations (" + transList.length + ") or cluster schemas (" + clustList.length + ") :", e);
  }
}
 
开发者ID:jjeb,项目名称:kettle-trunk,代码行数:39,代码来源:KettleDatabaseRepository.java

示例9: delPartitionSchema

import org.pentaho.di.core.exception.KettleDependencyException; //导入依赖的package包/类
public synchronized void delPartitionSchema( ObjectId id_partition_schema ) throws KettleException {
  // First, see if the schema is still used by other objects...
  // If so, generate an error!!
  //
  // We look in table R_TRANS_PARTITION_SCHEMA to see if there are any transformations using this schema.
  String[] transList = repository.getTransformationsUsingPartitionSchema( id_partition_schema );

  if ( transList.length == 0 ) {
    repository.connectionDelegate.performDelete( "DELETE FROM "
      + quoteTable( KettleDatabaseRepository.TABLE_R_PARTITION ) + " WHERE "
      + quote( KettleDatabaseRepository.FIELD_PARTITION_ID_PARTITION_SCHEMA ) + " = ? ", id_partition_schema );
    repository.connectionDelegate.performDelete(
      "DELETE FROM "
        + quoteTable( KettleDatabaseRepository.TABLE_R_PARTITION_SCHEMA ) + " WHERE "
        + quote( KettleDatabaseRepository.FIELD_PARTITION_SCHEMA_ID_PARTITION_SCHEMA ) + " = ? ",
      id_partition_schema );
  } else {
    StringBuilder message = new StringBuilder( 100 );

    message.append( "The partition schema is used by the following transformations:" ).append( Const.CR );
    for ( int i = 0; i < transList.length; i++ ) {
      message.append( "  " ).append( transList[i] ).append( Const.CR );
    }
    message.append( Const.CR );

    KettleDependencyException e = new KettleDependencyException( message.toString() );
    throw new KettleDependencyException(
      "This partition schema is still in use by one or more transformations (" + transList.length + ") :", e );
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:31,代码来源:KettleDatabaseRepositoryPartitionSchemaDelegate.java

示例10: delDatabase

import org.pentaho.di.core.exception.KettleDependencyException; //导入依赖的package包/类
public synchronized void delDatabase( ObjectId id_database ) throws KettleException {
  repository.getSecurityProvider().validateAction( RepositoryOperation.DELETE_DATABASE );

  // First, see if the database connection is still used by other connections...
  // If so, generate an error!!
  // We look in table R_STEP_DATABASE to see if there are any steps using this database.
  //
  String[] transList = repository.getTransformationsUsingDatabase( id_database );
  String[] jobList = repository.getJobsUsingDatabase( id_database );

  if ( jobList.length == 0 && transList.length == 0 ) {
    repository.connectionDelegate.performDelete( "DELETE FROM "
      + quoteTable( KettleDatabaseRepository.TABLE_R_DATABASE ) + " WHERE "
      + quote( KettleDatabaseRepository.FIELD_DATABASE_ID_DATABASE ) + " = ? ", id_database );
  } else {
    String message = " Database used by the following " + Const.CR;
    if ( jobList.length > 0 ) {
      message = "jobs :" + Const.CR;
      for ( String job : jobList ) {
        message += "\t " + job + Const.CR;
      }
    }

    message += "transformations:" + Const.CR;
    for ( String trans : transList ) {
      message += "\t " + trans + Const.CR;
    }
    KettleDependencyException e = new KettleDependencyException( message );
    throw new KettleDependencyException( "This database is still in use by "
      + jobList.length + " jobs and " + transList.length + " transformations references", e );
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:33,代码来源:KettleDatabaseRepositoryDatabaseDelegate.java

示例11: delSlave

import org.pentaho.di.core.exception.KettleDependencyException; //导入依赖的package包/类
public synchronized void delSlave(long id_slave) throws KettleException
{
    // First, see if the slave is still used by other objects...
    // If so, generate an error!!
    // We look in table R_TRANS_SLAVE to see if there are any transformations using this slave.
    // We obviously also look in table R_CLUSTER_SLAVE to see if there are any clusters that use this slave.
	//
    String[] transList = getTransformationsUsingSlave(id_slave);
    String[] clustList = getClustersUsingSlave(id_slave);

    if (transList.length==0 && clustList.length==0)
    {
        database.execStatement("DELETE FROM "+databaseMeta.getQuotedSchemaTableCombination(null, TABLE_R_SLAVE)+" WHERE "+quote(FIELD_SLAVE_ID_SLAVE)+" = " + id_slave);
        database.execStatement("DELETE FROM "+databaseMeta.getQuotedSchemaTableCombination(null, TABLE_R_TRANS_SLAVE)+" WHERE "+quote(FIELD_TRANS_SLAVE_ID_SLAVE)+" = " + id_slave);
    }
    else
    {
        StringBuffer message = new StringBuffer();
        
        if (transList.length>0)
        {
            message.append("Slave used by the following transformations:").append(Const.CR);
            for (int i = 0; i < transList.length; i++)
            {
                message.append("  ").append(transList[i]).append(Const.CR);
            }
            message.append(Const.CR);
        }
        if (clustList.length>0)
        {
            message.append("Slave used by the following cluster schemas:").append(Const.CR);
            for (int i = 0; i < clustList.length; i++)
            {
                message.append("  ").append(clustList[i]).append(Const.CR);
            }
        }
        
        KettleDependencyException e = new KettleDependencyException(message.toString());
        throw new KettleDependencyException("This slave server is still in use by one or more transformations ("+transList.length+") or cluster schemas ("+clustList.length+") :", e);
    }
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:42,代码来源:Repository.java

示例12: deleteSlave

import org.pentaho.di.core.exception.KettleDependencyException; //导入依赖的package包/类
public synchronized void deleteSlave(ObjectId id_slave) throws KettleException
  {
securityProvider.validateAction(RepositoryOperation.DELETE_SLAVE_SERVER);

// First, see if the slave is still used by other objects...
      // If so, generate an error!!
      // We look in table R_TRANS_SLAVE to see if there are any transformations using this slave.
      // We obviously also look in table R_CLUSTER_SLAVE to see if there are any clusters that use this slave.
  	//
      String[] transList = getTransformationsUsingSlave(id_slave);
      String[] clustList = getClustersUsingSlave(id_slave);

      if (transList.length==0 && clustList.length==0)
      {
        connectionDelegate.performDelete("DELETE FROM "+quoteTable(KettleDatabaseRepository.TABLE_R_SLAVE)+" WHERE "+quote(KettleDatabaseRepository.FIELD_SLAVE_ID_SLAVE)+" = ? ", id_slave);
        connectionDelegate.performDelete("DELETE FROM "+quoteTable(KettleDatabaseRepository.TABLE_R_TRANS_SLAVE)+" WHERE "+quote(KettleDatabaseRepository.FIELD_TRANS_SLAVE_ID_SLAVE)+" = ? ", id_slave);
        commit();
      }
      else
      {
          StringBuffer message = new StringBuffer();
          
          if (transList.length>0)
          {
              message.append("Slave used by the following transformations:").append(Const.CR);
              for (int i = 0; i < transList.length; i++)
              {
                  message.append("  ").append(transList[i]).append(Const.CR);
              }
              message.append(Const.CR);
          }
          if (clustList.length>0)
          {
              message.append("Slave used by the following cluster schemas:").append(Const.CR);
              for (int i = 0; i < clustList.length; i++)
              {
                  message.append("  ").append(clustList[i]).append(Const.CR);
              }
          }
          
          KettleDependencyException e = new KettleDependencyException(message.toString());
          throw new KettleDependencyException("This slave server is still in use by one or more transformations ("+transList.length+") or cluster schemas ("+clustList.length+") :", e);
      }
  }
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:45,代码来源:KettleDatabaseRepository.java

示例13: deleteSlave

import org.pentaho.di.core.exception.KettleDependencyException; //导入依赖的package包/类
public synchronized void deleteSlave( ObjectId id_slave ) throws KettleException {
  securityProvider.validateAction( RepositoryOperation.DELETE_SLAVE_SERVER );

  // First, see if the slave is still used by other objects...
  // If so, generate an error!!
  // We look in table R_TRANS_SLAVE to see if there are any transformations
  // using this slave.
  // We obviously also look in table R_CLUSTER_SLAVE to see if there are any
  // clusters that use this slave.
  //
  String[] transList = getTransformationsUsingSlave( id_slave );
  String[] clustList = getClustersUsingSlave( id_slave );

  if ( transList.length == 0 && clustList.length == 0 ) {
    connectionDelegate.performDelete( "DELETE FROM "
      + quoteTable( KettleDatabaseRepository.TABLE_R_SLAVE ) + " WHERE "
      + quote( KettleDatabaseRepository.FIELD_SLAVE_ID_SLAVE ) + " = ? ", id_slave );
    connectionDelegate.performDelete( "DELETE FROM "
      + quoteTable( KettleDatabaseRepository.TABLE_R_TRANS_SLAVE ) + " WHERE "
      + quote( KettleDatabaseRepository.FIELD_TRANS_SLAVE_ID_SLAVE ) + " = ? ", id_slave );
    commit();
  } else {
    StringBuilder message = new StringBuilder( 100 );

    if ( transList.length > 0 ) {
      message.append( "Slave used by the following transformations:" ).append( Const.CR );
      for ( int i = 0; i < transList.length; i++ ) {
        message.append( "  " ).append( transList[i] ).append( Const.CR );
      }
      message.append( Const.CR );
    }
    if ( clustList.length > 0 ) {
      message.append( "Slave used by the following cluster schemas:" ).append( Const.CR );
      for ( int i = 0; i < clustList.length; i++ ) {
        message.append( "  " ).append( clustList[i] ).append( Const.CR );
      }
    }

    KettleDependencyException e = new KettleDependencyException( message.toString() );
    throw new KettleDependencyException( "This slave server is still in use by one or more transformations ("
      + transList.length + ") or cluster schemas (" + clustList.length + ") :", e );
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:44,代码来源:KettleDatabaseRepository.java


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