/** Populates a DTO with data from a ResultSet */ protected void populateDto(Projects dto, ResultSet rs) throws SQLException { dto.setIdprojects(rs.getInt(COLUMN_IDPROJECTS)); dto.setName(rs.getString(COLUMN_NAME)); dto.setDescription(rs.getString(COLUMN_DESCRIPTION)); dto.setStartDate(rs.getDate(COLUMN_START_DATE)); dto.setEndDate(rs.getDate(COLUMN_END_DATE)); dto.setStatus(rs.getInt(COLUMN_STATUS)); if (rs.wasNull()) { dto.setStatusNull(true); } dto.setType(rs.getInt(COLUMN_TYPE)); if (rs.wasNull()) { dto.setTypeNull(true); } dto.setCompanyId(rs.getInt(COLUMN_COMPANY_ID)); if (rs.wasNull()) { dto.setCompanyIdNull(true); } dto.setBranchId(rs.getInt(COLUMN_BRANCH_ID)); if (rs.wasNull()) { dto.setBranchIdNull(true); } }