public static TransactionParameterBuffer processMapping(String mapping) throws FBResourceException {
  TransactionParameterBuffer result=new TransactionParameterBufferImpl();
  StringTokenizer st=new StringTokenizer(mapping,",");
  while (st.hasMoreTokens()) {
    String token=st.nextToken();
    Integer argValue=null;
    if (token.contains("=")) {
      String[] parts=token.split("=");
      try {
        argValue=Integer.valueOf(parts[1]);
      }
 catch (      NumberFormatException ex) {
        throw new FBResourceException(parts[1] + " is not valid integer value");
      }
      token=parts[0];
    }
    Integer value=ParameterBufferHelper.getTpbParam(token);
    if (value == null) {
      throw new FBResourceException("Keyword " + token + " unknown. Please check your mapping.");
    }
    if (argValue == null) {
      result.addArgument(value);
    }
 else {
      result.addArgument(value,argValue);
    }
  }
  return result;
}

public static TransactionParameterBuffer processMapping ( String mapping ) throws FBResourceException { TransactionParameterBuffer result = new TransactionParameterBufferImpl ( ) ; StringTokenizer st = new StringTokenizer ( mapping , "," ) ; while ( st . hasMoreTokens ( ) ) { String token = st . nextToken ( ) ; Integer argValue = null ; if ( token . contains ( "=" ) ) { String [ ] parts = token . split ( "=" ) ; try { argValue = Integer . valueOf ( parts [ 1 ] ) ; } catch ( NumberFormatException ex ) { throw new FBResourceException ( parts [ 1 ] + " is not valid integer value" ) ; } token = parts [ 0 ] ; } Integer value = ParameterBufferHelper . getTpbParam ( token ) ; if ( value == null ) { throw new FBResourceException ( "Keyword " + token + " unknown. Please check your mapping." ) ; } if ( argValue == null ) { result . addArgument ( value ) ; } else { result . addArgument ( value , argValue ) ; } } return result ; }
process comma - separated list of keywords and convert them into tpb values .
