public void load() {

    SqlConn con = null;
    logger.debug("dao load method");

    try {
      con = ConnFactory.getConnection(DB);
      String s = "select * from " + table + " where " + PK + "=:::";

      if (fields.get(PK).getType() == DAOutils.INT_TYPE)
        s = s.replace(":::", String.valueOf(fields.get(PK).getValueAsInt()));

      if (fields.get(PK).getType() == DAOutils.STRING_TYPE)
        s = s.replace(":::", "'" + fields.get(PK).getValueAsString() + "'");

      ResultSet rs = con.query(s);

      while (rs.next()) {
        for (Field field : fields.values()) {

          // for field names not in the DB that we want to use
          // programatically, we start the field name with "EMPTY_"
          if (field.name.startsWith("EMPTY_")) continue;

          logger.debug("setting field " + field.name + " with value " + rs.getObject(field.name));

          switch (field.getType()) {
            case DAOutils.STRING_TYPE:
              field.setValue(rs.getString(field.name));
              break;
            case DAOutils.INT_TYPE:
              field.setValue(-1);
              field.setValue(rs.getInt(field.name));
              break;
            case DAOutils.TIMESTAMP_TYPE:
              field.setValue(rs.getTimestamp(field.name));
              break;
            case DAOutils.FLOAT_TYPE:
              field.setValue(rs.getFloat(field.name));
              break;
            case DAOutils.DATE_TYPE:
              field.setValue(rs.getDate(field.name));
              break;
            case DAOutils.PASSWORD_TYPE:
              field.setValue(rs.getString(field.name));
              break;
            case DAOutils.BLOB_TYPE:
              field.setValue(rs.getBlob(field.name));
              break;
          }
        }
      }
    } catch (SQLException e) {
      logger.error(
          "failed to load object "
              + this.getClass().getName()
              + " from table "
              + table
              + " with id "
              + fields.get(PK).getValueAsString()
              + " -- "
              + e.getMessage(),
          e);
    } finally {
      if (con != null) con.close();
    }
  }