@Test public void testGetRow() throws KettleValueException { DatabaseImpact testObject = new DatabaseImpact( DatabaseImpact.TYPE_IMPACT_READ, "myTrans", "aStep", "ProdDB", "DimCustomer", "Customer_Key", "MyValue", "Calculator 2", "SELECT * FROM dimCustomer", "Some remarks" ); RowMetaAndData rmd = testObject.getRow(); assertNotNull( rmd ); assertEquals( 10, rmd.size() ); assertEquals( ValueMetaInterface.TYPE_STRING, rmd.getValueMeta( 0 ).getType() ); assertEquals( BaseMessages.getString( PKG, "DatabaseImpact.RowDesc.Label.Type" ), rmd.getValueMeta( 0 ).getName() ); assertEquals( "Read", rmd.getString( 0, "default" ) ); assertEquals( ValueMetaInterface.TYPE_STRING, rmd.getValueMeta( 1 ).getType() ); assertEquals( BaseMessages.getString( PKG, "DatabaseImpact.RowDesc.Label.Transformation" ), rmd.getValueMeta( 1 ) .getName() ); assertEquals( "myTrans", rmd.getString( 1, "default" ) ); assertEquals( ValueMetaInterface.TYPE_STRING, rmd.getValueMeta( 2 ).getType() ); assertEquals( BaseMessages.getString( PKG, "DatabaseImpact.RowDesc.Label.Step" ), rmd.getValueMeta( 2 ).getName() ); assertEquals( "aStep", rmd.getString( 2, "default" ) ); assertEquals( ValueMetaInterface.TYPE_STRING, rmd.getValueMeta( 3 ).getType() ); assertEquals( BaseMessages.getString( PKG, "DatabaseImpact.RowDesc.Label.Database" ), rmd.getValueMeta( 3 ) .getName() ); assertEquals( "ProdDB", rmd.getString( 3, "default" ) ); assertEquals( ValueMetaInterface.TYPE_STRING, rmd.getValueMeta( 4 ).getType() ); assertEquals( BaseMessages.getString( PKG, "DatabaseImpact.RowDesc.Label.Table" ), rmd.getValueMeta( 4 ) .getName() ); assertEquals( "DimCustomer", rmd.getString( 4, "default" ) ); assertEquals( ValueMetaInterface.TYPE_STRING, rmd.getValueMeta( 5 ).getType() ); assertEquals( BaseMessages.getString( PKG, "DatabaseImpact.RowDesc.Label.Field" ), rmd.getValueMeta( 5 ) .getName() ); assertEquals( "Customer_Key", rmd.getString( 5, "default" ) ); assertEquals( ValueMetaInterface.TYPE_STRING, rmd.getValueMeta( 6 ).getType() ); assertEquals( BaseMessages.getString( PKG, "DatabaseImpact.RowDesc.Label.Value" ), rmd.getValueMeta( 6 ) .getName() ); assertEquals( "MyValue", rmd.getString( 6, "default" ) ); assertEquals( ValueMetaInterface.TYPE_STRING, rmd.getValueMeta( 7 ).getType() ); assertEquals( BaseMessages.getString( PKG, "DatabaseImpact.RowDesc.Label.ValueOrigin" ), rmd.getValueMeta( 7 ) .getName() ); assertEquals( "Calculator 2", rmd.getString( 7, "default" ) ); assertEquals( ValueMetaInterface.TYPE_STRING, rmd.getValueMeta( 8 ).getType() ); assertEquals( BaseMessages.getString( PKG, "DatabaseImpact.RowDesc.Label.SQL" ), rmd.getValueMeta( 8 ).getName() ); assertEquals( "SELECT * FROM dimCustomer", rmd.getString( 8, "default" ) ); assertEquals( ValueMetaInterface.TYPE_STRING, rmd.getValueMeta( 9 ).getType() ); assertEquals( BaseMessages.getString( PKG, "DatabaseImpact.RowDesc.Label.Remarks" ), rmd.getValueMeta( 9 ) .getName() ); assertEquals( "Some remarks", rmd.getString( 9, "default" ) ); }
public RowMetaAndData getRow() { RowMetaAndData r = new RowMetaAndData(); r.addValue( new ValueMetaString( BaseMessages.getString( PKG, "DatabaseImpact.RowDesc.Label.Type" ) ), getTypeDesc() ); r.addValue( new ValueMetaString( BaseMessages.getString( PKG, "DatabaseImpact.RowDesc.Label.Transformation" ) ), getTransformationName() ); r.addValue( new ValueMetaString( BaseMessages.getString( PKG, "DatabaseImpact.RowDesc.Label.Step" ) ), getStepName() ); r .addValue( new ValueMetaString( BaseMessages.getString( PKG, "DatabaseImpact.RowDesc.Label.Database" ) ), getDatabaseName() ); r.addValue( new ValueMetaString( BaseMessages.getString( PKG, "DatabaseImpact.RowDesc.Label.Table" ) ), getTable() ); r.addValue( new ValueMetaString( BaseMessages.getString( PKG, "DatabaseImpact.RowDesc.Label.Field" ) ), getField() ); r.addValue( new ValueMetaString( BaseMessages.getString( PKG, "DatabaseImpact.RowDesc.Label.Value" ) ), getValue() ); r.addValue( new ValueMetaString( BaseMessages.getString( PKG, "DatabaseImpact.RowDesc.Label.ValueOrigin" ) ), getValueOrigin() ); r.addValue( new ValueMetaString( BaseMessages.getString( PKG, "DatabaseImpact.RowDesc.Label.SQL" ) ), getSQL() ); r .addValue( new ValueMetaString( BaseMessages.getString( PKG, "DatabaseImpact.RowDesc.Label.Remarks" ) ), getRemark() ); return r; }
DatabaseImpact { public RowMetaAndData getRow() { RowMetaAndData r = new RowMetaAndData(); r.addValue( new ValueMetaString( BaseMessages.getString( PKG, "DatabaseImpact.RowDesc.Label.Type" ) ), getTypeDesc() ); r.addValue( new ValueMetaString( BaseMessages.getString( PKG, "DatabaseImpact.RowDesc.Label.Transformation" ) ), getTransformationName() ); r.addValue( new ValueMetaString( BaseMessages.getString( PKG, "DatabaseImpact.RowDesc.Label.Step" ) ), getStepName() ); r .addValue( new ValueMetaString( BaseMessages.getString( PKG, "DatabaseImpact.RowDesc.Label.Database" ) ), getDatabaseName() ); r.addValue( new ValueMetaString( BaseMessages.getString( PKG, "DatabaseImpact.RowDesc.Label.Table" ) ), getTable() ); r.addValue( new ValueMetaString( BaseMessages.getString( PKG, "DatabaseImpact.RowDesc.Label.Field" ) ), getField() ); r.addValue( new ValueMetaString( BaseMessages.getString( PKG, "DatabaseImpact.RowDesc.Label.Value" ) ), getValue() ); r.addValue( new ValueMetaString( BaseMessages.getString( PKG, "DatabaseImpact.RowDesc.Label.ValueOrigin" ) ), getValueOrigin() ); r.addValue( new ValueMetaString( BaseMessages.getString( PKG, "DatabaseImpact.RowDesc.Label.SQL" ) ), getSQL() ); r .addValue( new ValueMetaString( BaseMessages.getString( PKG, "DatabaseImpact.RowDesc.Label.Remarks" ) ), getRemark() ); return r; } }
DatabaseImpact { public RowMetaAndData getRow() { RowMetaAndData r = new RowMetaAndData(); r.addValue( new ValueMetaString( BaseMessages.getString( PKG, "DatabaseImpact.RowDesc.Label.Type" ) ), getTypeDesc() ); r.addValue( new ValueMetaString( BaseMessages.getString( PKG, "DatabaseImpact.RowDesc.Label.Transformation" ) ), getTransformationName() ); r.addValue( new ValueMetaString( BaseMessages.getString( PKG, "DatabaseImpact.RowDesc.Label.Step" ) ), getStepName() ); r .addValue( new ValueMetaString( BaseMessages.getString( PKG, "DatabaseImpact.RowDesc.Label.Database" ) ), getDatabaseName() ); r.addValue( new ValueMetaString( BaseMessages.getString( PKG, "DatabaseImpact.RowDesc.Label.Table" ) ), getTable() ); r.addValue( new ValueMetaString( BaseMessages.getString( PKG, "DatabaseImpact.RowDesc.Label.Field" ) ), getField() ); r.addValue( new ValueMetaString( BaseMessages.getString( PKG, "DatabaseImpact.RowDesc.Label.Value" ) ), getValue() ); r.addValue( new ValueMetaString( BaseMessages.getString( PKG, "DatabaseImpact.RowDesc.Label.ValueOrigin" ) ), getValueOrigin() ); r.addValue( new ValueMetaString( BaseMessages.getString( PKG, "DatabaseImpact.RowDesc.Label.SQL" ) ), getSQL() ); r .addValue( new ValueMetaString( BaseMessages.getString( PKG, "DatabaseImpact.RowDesc.Label.Remarks" ) ), getRemark() ); return r; } DatabaseImpact( int type, String transname, String stepname, String dbname, String table, String field,
    String valuename, String valueorigin, String sql, String remark ); }
DatabaseImpact { public RowMetaAndData getRow() { RowMetaAndData r = new RowMetaAndData(); r.addValue( new ValueMetaString( BaseMessages.getString( PKG, "DatabaseImpact.RowDesc.Label.Type" ) ), getTypeDesc() ); r.addValue( new ValueMetaString( BaseMessages.getString( PKG, "DatabaseImpact.RowDesc.Label.Transformation" ) ), getTransformationName() ); r.addValue( new ValueMetaString( BaseMessages.getString( PKG, "DatabaseImpact.RowDesc.Label.Step" ) ), getStepName() ); r .addValue( new ValueMetaString( BaseMessages.getString( PKG, "DatabaseImpact.RowDesc.Label.Database" ) ), getDatabaseName() ); r.addValue( new ValueMetaString( BaseMessages.getString( PKG, "DatabaseImpact.RowDesc.Label.Table" ) ), getTable() ); r.addValue( new ValueMetaString( BaseMessages.getString( PKG, "DatabaseImpact.RowDesc.Label.Field" ) ), getField() ); r.addValue( new ValueMetaString( BaseMessages.getString( PKG, "DatabaseImpact.RowDesc.Label.Value" ) ), getValue() ); r.addValue( new ValueMetaString( BaseMessages.getString( PKG, "DatabaseImpact.RowDesc.Label.ValueOrigin" ) ), getValueOrigin() ); r.addValue( new ValueMetaString( BaseMessages.getString( PKG, "DatabaseImpact.RowDesc.Label.SQL" ) ), getSQL() ); r .addValue( new ValueMetaString( BaseMessages.getString( PKG, "DatabaseImpact.RowDesc.Label.Remarks" ) ), getRemark() ); return r; } DatabaseImpact( int type, String transname, String stepname, String dbname, String table, String field,
    String valuename, String valueorigin, String sql, String remark ); String getTransformationName(); String getStepName(); String getValueOrigin(); String getDatabaseName(); String getTable(); String getField(); String getValue(); String getSQL(); String getRemark(); String getTypeDesc(); static final int getTypeDesc( String typedesc ); int getType(); RowMetaAndData getRow(); }
DatabaseImpact { public RowMetaAndData getRow() { RowMetaAndData r = new RowMetaAndData(); r.addValue( new ValueMetaString( BaseMessages.getString( PKG, "DatabaseImpact.RowDesc.Label.Type" ) ), getTypeDesc() ); r.addValue( new ValueMetaString( BaseMessages.getString( PKG, "DatabaseImpact.RowDesc.Label.Transformation" ) ), getTransformationName() ); r.addValue( new ValueMetaString( BaseMessages.getString( PKG, "DatabaseImpact.RowDesc.Label.Step" ) ), getStepName() ); r .addValue( new ValueMetaString( BaseMessages.getString( PKG, "DatabaseImpact.RowDesc.Label.Database" ) ), getDatabaseName() ); r.addValue( new ValueMetaString( BaseMessages.getString( PKG, "DatabaseImpact.RowDesc.Label.Table" ) ), getTable() ); r.addValue( new ValueMetaString( BaseMessages.getString( PKG, "DatabaseImpact.RowDesc.Label.Field" ) ), getField() ); r.addValue( new ValueMetaString( BaseMessages.getString( PKG, "DatabaseImpact.RowDesc.Label.Value" ) ), getValue() ); r.addValue( new ValueMetaString( BaseMessages.getString( PKG, "DatabaseImpact.RowDesc.Label.ValueOrigin" ) ), getValueOrigin() ); r.addValue( new ValueMetaString( BaseMessages.getString( PKG, "DatabaseImpact.RowDesc.Label.SQL" ) ), getSQL() ); r .addValue( new ValueMetaString( BaseMessages.getString( PKG, "DatabaseImpact.RowDesc.Label.Remarks" ) ), getRemark() ); return r; } DatabaseImpact( int type, String transname, String stepname, String dbname, String table, String field,
    String valuename, String valueorigin, String sql, String remark ); String getTransformationName(); String getStepName(); String getValueOrigin(); String getDatabaseName(); String getTable(); String getField(); String getValue(); String getSQL(); String getRemark(); String getTypeDesc(); static final int getTypeDesc( String typedesc ); int getType(); RowMetaAndData getRow(); static final int TYPE_IMPACT_NONE; static final int TYPE_IMPACT_READ; static final int TYPE_IMPACT_WRITE; static final int TYPE_IMPACT_READ_WRITE; static final int TYPE_IMPACT_TRUNCATE; static final int TYPE_IMPACT_DELETE; static final int TYPE_IMPACT_UPDATE; static final String[] typeDesc; }