try {
rs = (ResultSet) st.executeQuery();
if (rs.next()) {
UserInfo info = new UserInfo();
UserSettings settings = new UserSettings();
bean.setId(rs.getInt("id"));
bean.setName(rs.getString("user_name"));
info.setEmail(rs.getString("user_mail"));
bean.setStatus(rs.getInt("user_status"));
bean.setIntime(rs.getTimestamp("last_intime"));
if (fullinfo) {
settings.setAutologin(rs.getBoolean("auto_login"));
bean.setPassword(rs.getString("user_pass"));
settings.setMes_per_page(rs.getInt("mes_per_page"));
}
info.setCity(rs.getString("user_city"));
info.setIcq(rs.getString("user_icq"));
info.setBirthday(rs.getDate("user_dob"));
info.setHomepage(rs.getString("user_hp"));
info.setOccupation(rs.getString("user_occupation"));
settings.setShow_user_mail(rs.getBoolean("show_user_mail"));
settings.setSignature(rs.getString("user_signature"));
bean.setInfo(info);
bean.setSettings(settings);
}