code: public Object javaToSql(Object source)
      {
          if (source == null)
              return null;
          try
          {
              ByteArrayOutputStream bao = new ByteArrayOutputStream();
              GZIPOutputStream gos = new GZIPOutputStream(bao);
              ObjectOutputStream oos = new ObjectOutputStream(gos);
              oos.writeObject(source);
              oos.close();
              gos.close();
              bao.close();
              byte[] result = bao.toByteArray();
              return result;
          }
          catch (Throwable t)
          {
              throw new ConversionException(t);
          }
      }
docs: /*
  @see FieldConversion#javaToSql(Object)