@Test public void assertNumeric_String() throws Exception { ValueMetaString metaString = new ValueMetaString( "string" ); assertNotNull( "General strings are not allowed", validator.assertNumeric( metaString, "qwerty", new Validation() ) ); }
KettleValidatorException assertNumeric( ValueMetaInterface valueMeta, Object valueData, Validation field ) throws KettleValueException { if ( valueMeta.isNumeric() || containsOnlyDigits( valueMeta.getString( valueData ) ) ) { return null; } return new KettleValidatorException( this, field, KettleValidatorException.ERROR_NON_NUMERIC_DATA, BaseMessages.getString( PKG, "Validator.Exception.NonNumericDataNotAllowed", field.getFieldName(), valueMeta.toStringMeta() ), field.getFieldName() ); }
Validator extends BaseStep implements StepInterface { KettleValidatorException assertNumeric( ValueMetaInterface valueMeta, Object valueData, Validation field ) throws KettleValueException { if ( valueMeta.isNumeric() || containsOnlyDigits( valueMeta.getString( valueData ) ) ) { return null; } return new KettleValidatorException( this, field, KettleValidatorException.ERROR_NON_NUMERIC_DATA, BaseMessages.getString( PKG, "Validator.Exception.NonNumericDataNotAllowed", field.getFieldName(), valueMeta.toStringMeta() ), field.getFieldName() ); } }
Validator extends BaseStep implements StepInterface { KettleValidatorException assertNumeric( ValueMetaInterface valueMeta, Object valueData, Validation field ) throws KettleValueException { if ( valueMeta.isNumeric() || containsOnlyDigits( valueMeta.getString( valueData ) ) ) { return null; } return new KettleValidatorException( this, field, KettleValidatorException.ERROR_NON_NUMERIC_DATA, BaseMessages.getString( PKG, "Validator.Exception.NonNumericDataNotAllowed", field.getFieldName(), valueMeta.toStringMeta() ), field.getFieldName() ); } Validator( StepMeta stepMeta, StepDataInterface stepDataInterface, int copyNr, TransMeta transMeta,
                    Trans trans ); }
Validator extends BaseStep implements StepInterface { KettleValidatorException assertNumeric( ValueMetaInterface valueMeta, Object valueData, Validation field ) throws KettleValueException { if ( valueMeta.isNumeric() || containsOnlyDigits( valueMeta.getString( valueData ) ) ) { return null; } return new KettleValidatorException( this, field, KettleValidatorException.ERROR_NON_NUMERIC_DATA, BaseMessages.getString( PKG, "Validator.Exception.NonNumericDataNotAllowed", field.getFieldName(), valueMeta.toStringMeta() ), field.getFieldName() ); } Validator( StepMeta stepMeta, StepDataInterface stepDataInterface, int copyNr, TransMeta transMeta,
                    Trans trans ); boolean processRow( StepMetaInterface smi, StepDataInterface sdi ); boolean init( StepMetaInterface smi, StepDataInterface sdi ); }
Validator extends BaseStep implements StepInterface { KettleValidatorException assertNumeric( ValueMetaInterface valueMeta, Object valueData, Validation field ) throws KettleValueException { if ( valueMeta.isNumeric() || containsOnlyDigits( valueMeta.getString( valueData ) ) ) { return null; } return new KettleValidatorException( this, field, KettleValidatorException.ERROR_NON_NUMERIC_DATA, BaseMessages.getString( PKG, "Validator.Exception.NonNumericDataNotAllowed", field.getFieldName(), valueMeta.toStringMeta() ), field.getFieldName() ); } Validator( StepMeta stepMeta, StepDataInterface stepDataInterface, int copyNr, TransMeta transMeta,
                    Trans trans ); boolean processRow( StepMetaInterface smi, StepDataInterface sdi ); boolean init( StepMetaInterface smi, StepDataInterface sdi );  }