public static byte[] convertToBytes(Object obj) {
Class clazz = obj.getClass();
BaseConverter converter = stdConverters.get(clazz);
if(converter == null)
throw new IllegalArgumentException("Type clazz="+clazz+" is not supported at this time");
return converter.convertToNoSql(obj);
}
/**
* Special method as if you convert 5 or 876, they convert to BigInteger byte form but here we
* specifically want BigDecimal byte form so we need to force that.