public static SmartObject prepare(SmartObject so)
        throws SmartObjectException {
  try {
    StringBuffer sb = new StringBuffer("INSERT INTO ");
    sb.append(so.getTableName());
    sb.append(" VALUES (NULL, ");
    PropertyDescriptor[] props =
            Introspector.getBeanInfo(so.getClass()).getPropertyDescriptors();
    synchronized (so) {
      for (int i = 0; i < props.length; i++) {
        String prop = getPropertyName(props[i]);
        String methodName = getReadMethodName(props[i]);
        if (!methodName.startsWith("java.") && 
                !methodName.startsWith("com.neo.smartobjects.SmartObject")) {
          // Complter avec le bon nombre de valeurs vides.
          sb.append("\'\', ");
        }
      }
      sb.deleteCharAt(sb.length() - 2);
      sb.append(")");
      try {
        String[] keyFields = {"id"};
        Connection con = ds.getConnection();
        Statement s = con.createStatement();
        s.execute(sb.toString(), keyFields);
        ResultSet rs = s.getResultSet();
        rs.next();
        so.setID(rs.getInt("id"));
        so.setClean(true);
        closeAll(rs, s, con);
        return so;
      }
      catch (SQLException sqle) {
        throw new SmartObjectException("Object creation failed when trying to insert into database.", sqle);
      }
    }
  }
  catch (Exception e) {
    throw new SmartObjectException("Exception creating object: " + so, e);
  }
}