code: @Override
      public byte[] toBytes(Object object)
      {
          if (object == null)
          {
              return null;
          }
  
          BigDecimal b = (BigDecimal) object;
          final int scale = b.scale();
          final BigInteger unscaled = b.unscaledValue();
          final byte[] value = unscaled.toByteArray();
          final byte[] bytes = new byte[value.length + 4];
          bytes[0] = (byte) (scale >>> 24);
          bytes[1] = (byte) (scale >>> 16);
          bytes[2] = (byte) (scale >>> 8);
          bytes[3] = (byte) (scale >>> 0);
          System.arraycopy(value, 0, bytes, 4, value.length);
          return bytes;
      }
docs: /*
  (non-Javadoc)
  
  @see
  com.impetus.kundera.property.PropertyAccessor#toBytes(java.lang.Object)