int id = res.getInt(1);
if (id > 0) {
survey = new Survey();
survey.setQuestions(new ArrayList<Question>());
survey.setId(id);
ApsProperties prop = new ApsProperties();
prop.loadFromXml(res.getString(2));
survey.setDescriptions(prop);
survey.setGroupName(res.getString(3).trim());
survey.setStartDate(res.getDate(4));
survey.setEndDate(res.getDate(5));
survey.setActive(res.getBoolean(6));
survey.setPublicPartialResult(res.getBoolean(7));
survey.setPublicResult(res.getBoolean(8));
survey.setQuestionnaire(res.getBoolean(9));
survey.setGatherUserInfo(res.getBoolean(10));
prop = new ApsProperties();
prop.loadFromXml(res.getString(11));
survey.setTitles(prop);
survey.setRestricted(res.getBoolean(12));
survey.setCheckCookie(res.getBoolean(13));
survey.setCheckIpAddress(res.getBoolean(14));
survey.setCheckUsername(res.getBoolean(15));
survey.setImageId(res.getString(16));
prop = new ApsProperties();
prop.loadFromXml(res.getString(17));
survey.setImageDescriptions(prop);
}
} catch (Throwable t) {
ApsSystemUtils.logThrowable(t, this, "buildSurveyRecordFromResultSet",
"Error while building a 'survey' object from the result set");