public void padField ( String sourceField , String targetField , String length , String character , String direction ) { TransformationStep step = new TransformationStep ( ) ; step . setSourceFields ( sourceField ) ; step . setTargetField ( targetField ) ; step . setOperationParameter ( TransformationConstants . PAD_LENGTH_PARAM , length ) ; step . setOperationParameter ( TransformationConstants . PAD_CHARACTER_PARAM , character ) ; step . setOperationParameter ( TransformationConstants . PAD_DIRECTION_PARAM , direction ) ; step . setOperationName ( "pad" ) ; steps . add ( step ) ; }
Adds a pad step to the transformation description . The source and the target field need to be of String type . Performs padding operation on the string of the source field and writes the result to the target field . The length describes to which size the padding should be done the pad character describes which character to use for the padding . The direction describes if the padding should be done at the start or at the end . The standard value for the direction is at the beginning . Values for direction could be Start or End .