Java Code Examples for org.pentaho.di.core.Const#NULL_BIGNUMBER

The following examples show how to use org.pentaho.di.core.Const#NULL_BIGNUMBER . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Value.java    From pentaho-kettle with Apache License 2.0 6 votes vote down vote up
/**
 * Converts a BigNumber value to a String, optionally padding the result to the specified length.
 *
 * @param pad
 *          true if you want to pad the resulting string to length.
 * @return a String optionally padded to the specified length.
 */
private String toStringBigNumber() {
  if ( value == null ) {
    return null;
  }
  String retval;

  if ( isNull() ) {
    retval = Const.NULL_BIGNUMBER;
  } else {
    if ( value.getBigNumber() == null ) {
      retval = null;
    } else {
      retval = value.getString();

      // Localise . to ,
      if ( Const.DEFAULT_DECIMAL_SEPARATOR != '.' ) {
        retval = retval.replace( '.', Const.DEFAULT_DECIMAL_SEPARATOR );
      }
    }
  }

  return retval;
}