code: public static String[] toWhereArgs(Object... args) {
  		String[] arr = new String[args.length];
  		for (int i = 0; i < args.length; i++) {
  			Object arg = args[i];
  			String argStr;
  			if (arg == null) {
  				argStr = "NULL";
  			} else if (arg instanceof Boolean) {
  				argStr = ((Boolean) arg) ? "1" : "0";
  			} else if (arg instanceof Date) {
  				argStr = String.valueOf(((Date) arg).getTime());
  			} else if (arg instanceof Entity) {
  				argStr = String.valueOf(((Entity) arg)._id);
  			} else {
  				argStr = arg.toString();
  			}
  			arr[i] = argStr;
  		}
  		return arr;
  	}
docs: StatementBuilder