/** * Method declaration * * @param rs * @param questionContainerPK * @return * @throws SQLException * @see */ public static QuestionContainerHeader getQuestionContainerHeaderFromResultSet( ResultSet rs, QuestionContainerPK questionContainerPK) throws SQLException { String id = Integer.toString(rs.getInt(1)); String title = rs.getString(2); String description = rs.getString(3); String comment = rs.getString(4); String creatorId = rs.getString(5); String creationDate = rs.getString(6); String beginDate = rs.getString(7); if (beginDate.equals(nullBeginDate)) { beginDate = null; } String endDate = rs.getString(8); if (endDate.equals(nullEndDate)) { endDate = null; } int isClosed = rs.getInt(9); boolean closed = false; if (isClosed == 1) { closed = true; } int nbVoters = rs.getInt(10); int nbQuestionsPage = rs.getInt(11); int nbMaxParticipations = rs.getInt(12); int nbParticipationsBeforeSolution = rs.getInt(13); int maxTime = rs.getInt(14); boolean anonymous = (rs.getInt(15) == 1); String instanceId = rs.getString(16); questionContainerPK.setComponentName(instanceId); QuestionContainerHeader result = new QuestionContainerHeader( new QuestionContainerPK(id, questionContainerPK), title, description, comment, creatorId, creationDate, beginDate, endDate, closed, nbVoters, nbQuestionsPage, nbMaxParticipations, nbParticipationsBeforeSolution, maxTime, anonymous); return result; }