public static final String getUpdateTypeCode( boolean upd, int t ) { if ( !upd ) { return ValueMetaFactory.getValueMetaName( t ); } else { return typeCodes[t]; } }
/** * @return The description of the target Value type */ public String getTargetTypeDesc() { return ValueMetaFactory.getValueMetaName( targetType ); }
/** * @return The description of the target Value type */ public String getTargetTypeDesc() { return ValueMetaFactory.getValueMetaName( targetType ); }
/** * TODO: change Desc to Code all over the place. Make sure we can localise this stuff later on. * * @param type * the type * @return the description (code) of the type */ public static final String getTypeDesc( int type ) { return ValueMetaFactory.getValueMetaName( type ); // return typeCodes[type]; }
public static final String getUpdateType( boolean upd, int t ) { if ( !upd ) { return ValueMetaFactory.getValueMetaName( t ); } else { return typeDesc[t]; } }
public String getTypeDescription() { switch ( type ) { case ValueMetaInterface.TYPE_BOOLEAN: return "boolean"; case ValueMetaInterface.TYPE_INTEGER: return "int"; default: return ValueMetaFactory.getValueMetaName( type ); } }
public String getTypeDesc() { return ValueMetaFactory.getValueMetaName( type ); }
public String getTypeDesc() { return ValueMetaFactory.getValueMetaName( type ); }
public String getTypeDesc() { return ValueMetaFactory.getValueMetaName( type ); }
public String getTypeDesc() { return ValueMetaFactory.getValueMetaName( type ); }
public String getTypeDesc() { return ValueMetaFactory.getValueMetaName( type ); }
public String getTypeDescription() { return ValueMetaFactory.getValueMetaName( type ); }
public String getTypeDesc() { return ValueMetaFactory.getValueMetaName( type ); }
@Override public String toString() { return "{" + key + ":" + ValueMetaFactory.getValueMetaName( valueType ) + ( value == null ? "" : "(" + value.toString() + ")" ) + "}"; }
public String getXML() { StringBuilder xml = new StringBuilder(); xml.append( XMLHandler.openTag( XML_TAG ) ); xml.append( XMLHandler.addTagValue( "field_name", fieldName ) ); xml.append( XMLHandler.addTagValue( "formula_string", formula ) ); xml.append( XMLHandler.addTagValue( "value_type", ValueMetaFactory.getValueMetaName( valueType ) ) ); xml.append( XMLHandler.addTagValue( "value_length", valueLength ) ); xml.append( XMLHandler.addTagValue( "value_precision", valuePrecision ) ); xml.append( XMLHandler.addTagValue( "replace_field", replaceField ) ); xml.append( XMLHandler.closeTag( XML_TAG ) ); return xml.toString(); }
@Before public void setup() throws KettlePluginException { rowMeta = spy( new RowMeta() ); groupByMeta = spy( new GroupByMeta() ); mockStatic( ValueMetaFactory.class ); when( ValueMetaFactory.createValueMeta( anyInt() ) ).thenCallRealMethod(); when( ValueMetaFactory.createValueMeta( anyString(), anyInt() ) ).thenCallRealMethod(); when( ValueMetaFactory.createValueMeta( "maxDate", 3, -1, -1 ) ).thenReturn( new ValueMetaDate( "maxDate" ) ); when( ValueMetaFactory.createValueMeta( "minDate", 3, -1, -1 ) ).thenReturn( new ValueMetaDate( "minDate" ) ); when( ValueMetaFactory.createValueMeta( "countDate", 5, -1, -1 ) ).thenReturn( new ValueMetaInteger( "countDate" ) ); when( ValueMetaFactory.getValueMetaName( 3 ) ).thenReturn( "Date" ); when( ValueMetaFactory.getValueMetaName( 5 ) ).thenReturn( "Integer" ); }
public String getXML() { String xml = ""; xml += "<" + XML_TAG + ">"; xml += XMLHandler.addTagValue( "field_name", fieldName ); xml += XMLHandler.addTagValue( "formula_string", formula ); xml += XMLHandler.addTagValue( "value_type", ValueMetaFactory.getValueMetaName( valueType ) ); xml += XMLHandler.addTagValue( "value_length", valueLength ); xml += XMLHandler.addTagValue( "value_precision", valuePrecision ); xml += XMLHandler.addTagValue( "replace_field", replaceField ); xml += "</" + XML_TAG + ">"; return xml; }
public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step, int nr ) throws KettleException { rep.saveStepAttribute( id_transformation, id_step, nr, "field_name", fieldName ); rep.saveStepAttribute( id_transformation, id_step, nr, "formula_string", formula ); rep.saveStepAttribute( id_transformation, id_step, nr, "value_type", ValueMetaFactory.getValueMetaName( valueType ) ); rep.saveStepAttribute( id_transformation, id_step, nr, "value_length", valueLength ); rep.saveStepAttribute( id_transformation, id_step, nr, "value_precision", valuePrecision ); rep.saveStepAttribute( id_transformation, id_step, nr, "replace_field", replaceField ); }
public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step, int nr ) throws KettleException { rep.saveStepAttribute( id_transformation, id_step, nr, "field_name", fieldName ); rep.saveStepAttribute( id_transformation, id_step, nr, "formula_string", formula ); rep.saveStepAttribute( id_transformation, id_step, nr, "value_type", ValueMetaFactory.getValueMetaName( valueType ) ); rep.saveStepAttribute( id_transformation, id_step, nr, "value_length", valueLength ); rep.saveStepAttribute( id_transformation, id_step, nr, "value_precision", valuePrecision ); rep.saveStepAttribute( id_transformation, id_step, nr, "replace_field", replaceField ); }
public void saveRep( Repository rep, IMetaStore metaStore, ObjectId transformationId, ObjectId stepId, int fieldNr ) throws KettleException { rep.saveStepAttribute( transformationId, stepId, fieldNr, "field_name", name ); rep.saveStepAttribute( transformationId, stepId, fieldNr, "field_rename", rename ); rep.saveStepAttribute( transformationId, stepId, fieldNr, "field_type", ValueMetaFactory.getValueMetaName( type ) ); rep.saveStepAttribute( transformationId, stepId, fieldNr, "field_length", length ); rep.saveStepAttribute( transformationId, stepId, fieldNr, "field_precision", precision ); rep.saveStepAttribute( transformationId, stepId, fieldNr, "field_conversion_mask", conversionMask ); rep.saveStepAttribute( transformationId, stepId, fieldNr, "field_decimal", decimalSymbol ); rep.saveStepAttribute( transformationId, stepId, fieldNr, "field_grouping", groupingSymbol ); rep.saveStepAttribute( transformationId, stepId, fieldNr, "field_trim_type", ValueMetaString .getTrimTypeCode( trimType ) ); }