• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java TransformationHasTransLogConfiguredImportRule类的典型用法和代码示例

java 1次浏览

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

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

示例1: setCompositeData

点赞 2

import org.pentaho.di.imp.rules.TransformationHasTransLogConfiguredImportRule; //导入依赖的package包/类
public void setCompositeData( ImportRuleInterface importRule ) {
  TransformationHasTransLogConfiguredImportRule rule =
    (TransformationHasTransLogConfiguredImportRule) importRule;
  schemaText.setText( Const.NVL( rule.getSchemaName(), "" ) );
  tableText.setText( Const.NVL( rule.getTableName(), "" ) );
  connectionText.setText( Const.NVL( rule.getConnectionName(), "" ) );
}
 

开发者ID:pentaho,
项目名称:pentaho-kettle,
代码行数:8,
代码来源:TransformationHasTransLogConfiguredImportRuleComposite.java

示例2: getCompositeData

点赞 2

import org.pentaho.di.imp.rules.TransformationHasTransLogConfiguredImportRule; //导入依赖的package包/类
public void getCompositeData( ImportRuleInterface importRule ) {
  TransformationHasTransLogConfiguredImportRule rule =
    (TransformationHasTransLogConfiguredImportRule) importRule;
  rule.setSchemaName( schemaText.getText() );
  rule.setTableName( tableText.getText() );
  rule.setConnectionName( connectionText.getText() );
}
 

开发者ID:pentaho,
项目名称:pentaho-kettle,
代码行数:8,
代码来源:TransformationHasTransLogConfiguredImportRuleComposite.java

示例3: setCompositeData

点赞 2

import org.pentaho.di.imp.rules.TransformationHasTransLogConfiguredImportRule; //导入依赖的package包/类
public void setCompositeData(ImportRuleInterface importRule) {
  TransformationHasTransLogConfiguredImportRule rule = (TransformationHasTransLogConfiguredImportRule) importRule;
  schemaText.setText(Const.NVL(rule.getSchemaName(), ""));
  tableText.setText(Const.NVL(rule.getTableName(), ""));
  connectionText.setText(Const.NVL(rule.getConnectionName(), ""));
}
 

开发者ID:yintaoxue,
项目名称:read-open-source-code,
代码行数:7,
代码来源:TransformationHasTransLogConfiguredImportRuleComposite.java

示例4: getCompositeData

点赞 2

import org.pentaho.di.imp.rules.TransformationHasTransLogConfiguredImportRule; //导入依赖的package包/类
public void getCompositeData(ImportRuleInterface importRule) {
  TransformationHasTransLogConfiguredImportRule rule = (TransformationHasTransLogConfiguredImportRule) importRule;
  rule.setSchemaName(schemaText.getText());
  rule.setTableName(tableText.getText());
  rule.setConnectionName(connectionText.getText());
}
 

开发者ID:yintaoxue,
项目名称:read-open-source-code,
代码行数:7,
代码来源:TransformationHasTransLogConfiguredImportRuleComposite.java

示例5: testRule

点赞 2

import org.pentaho.di.imp.rules.TransformationHasTransLogConfiguredImportRule; //导入依赖的package包/类
public void testRule() throws Exception {
  
  TransMeta transMeta = new TransMeta();
  DatabaseMeta logDbMeta = new DatabaseMeta("LOGDB", "MYSQL", "JDBC", "localhost", "test", "3306", "foo", "bar");
  transMeta.addDatabase(logDbMeta);
  TransLogTable logTable = transMeta.getTransLogTable();
 
  PluginRegistry registry = PluginRegistry.getInstance();
  
  PluginInterface plugin = registry.findPluginWithId(ImportRulePluginType.class, "TransformationHasTransLogConfigured");
  assertNotNull("The 'transformation has trans log table configured' rule could not be found in the plugin registry!", plugin);
  
  TransformationHasTransLogConfiguredImportRule rule = (TransformationHasTransLogConfiguredImportRule) registry.loadClass(plugin);
  assertNotNull("The 'transformation has trans log table configured' class could not be loaded by the plugin registry!", plugin);

  rule.setEnabled(true);

  List<ImportValidationFeedback> feedback = rule.verifyRule(transMeta);
  assertTrue("We didn't get any feedback from the 'transformation has trans log table configured'", !feedback.isEmpty());
  assertTrue("An error ruling was expected", feedback.get(0).getResultType()==ImportValidationResultType.ERROR);

  logTable.setTableName("SCHEMA");
  logTable.setTableName("LOGTABLE");
  logTable.setConnectionName(logDbMeta.getName());
  feedback = rule.verifyRule(transMeta);
  assertTrue("We didn't get any feedback from the 'transformation has description rule'", !feedback.isEmpty());
  assertTrue("An approval ruling was expected", feedback.get(0).getResultType()==ImportValidationResultType.APPROVAL);

  // Make the rules stricter!
  //
  rule.setTableName("SCHEMA");
  rule.setTableName("LOGTABLE");
  rule.setConnectionName(logDbMeta.getName());
  feedback = rule.verifyRule(transMeta);
  assertTrue("We didn't get any feedback from the 'transformation has description rule'", !feedback.isEmpty());
  assertTrue("An approval ruling was expected", feedback.get(0).getResultType()==ImportValidationResultType.APPROVAL);

  // Break the rule
  //
  rule.setSchemaName("INCORRECT_SCHEMA");
  rule.setTableName("LOGTABLE");
  rule.setConnectionName(logDbMeta.getName());
  feedback = rule.verifyRule(transMeta);
  assertTrue("We didn't get any feedback from the 'transformation has description rule'", !feedback.isEmpty());
  assertTrue("An error ruling was expected", feedback.get(0).getResultType()==ImportValidationResultType.ERROR);

  rule.setSchemaName("SCHEMA");
  rule.setTableName("INCORRECT_LOGTABLE");
  rule.setConnectionName(logDbMeta.getName());
  feedback = rule.verifyRule(transMeta);
  assertTrue("We didn't get any feedback from the 'transformation has description rule'", !feedback.isEmpty());
  assertTrue("An error ruling was expected", feedback.get(0).getResultType()==ImportValidationResultType.ERROR);
  
  rule.setSchemaName("SCHEMA");
  rule.setTableName("LOGTABLE");
  rule.setConnectionName("INCORRECT_DATABASE");
  feedback = rule.verifyRule(transMeta);
  assertTrue("We didn't get any feedback from the 'transformation has description rule'", !feedback.isEmpty());
  assertTrue("An error ruling was expected", feedback.get(0).getResultType()==ImportValidationResultType.ERROR);

  // No feedback expected!
  //
  rule.setEnabled(false);

  feedback = rule.verifyRule(transMeta);
  assertTrue("We didn't expect any feedback from the 'transformation has trans log table configured' since the rule is not enabled", feedback.isEmpty());
}
 

开发者ID:bsspirit,
项目名称:kettle-4.4.0-stable,
代码行数:68,
代码来源:TransformationHasTransLogConfiguredImportRuleTest.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)