Bug 128495 Provides BIRT Adapter of DTP Oda Design objects to/from ROM ODA Data Handles
core/org.eclipse.birt.core/src/org/eclipse/birt/core/data/DataTypeUtil.java
public static BigDecimal toBigDecimal( Object source ) throws BirtException
	{
		if ( source == null )
			return null;
		
		if ( source instanceof Integer )
		{
			String str = ( (Integer) source ).toString( );
			return new BigDecimal( str );
		}
		else if ( source instanceof BigDecimal )
		{
			return (BigDecimal) source;
		}
		else if ( source instanceof Boolean )
		{
			if ( true == ( (Boolean) source ).booleanValue( ) )
				return new BigDecimal( 1d );
			return new BigDecimal( 0d );
		}
		else if ( source instanceof Date )
		{
			long longValue = ( (Date) source ).getTime( );
			return new BigDecimal( longValue );
		}
		else if ( source instanceof Double )
		{
			double doubleValue = ( (Double) source ).doubleValue( );
			return new BigDecimal( doubleValue );
		}