@Test public void assessmentStoreTest_02() throws Exception { String data = ""; try { String questId = "A126"; data = assessmentStore.read(questId); System.out.println("data:::::::::" + data); assertTrue(StringUtils.isNotBlank(data)); } catch (Exception e) { e.printStackTrace(); } }
public String read(String questionId) throws Exception { String bodyData = ""; try { List<Row> rows = getPropertiesValueById("question_id", questionId, "blobAsText(body) as data"); Row row = rows.get(0); bodyData = row.getString("data"); } catch (Exception e) { throw new ResourceNotFoundException("ERR_ASSESSMENT_DATA", "Data Not Found."); } return bodyData; }
AssessmentStore { public String read(String questionId) throws Exception { String bodyData = ""; try { List<Row> rows = getPropertiesValueById("question_id", questionId, "blobAsText(body) as data"); Row row = rows.get(0); bodyData = row.getString("data"); } catch (Exception e) { throw new ResourceNotFoundException("ERR_ASSESSMENT_DATA", "Data Not Found."); } return bodyData; } }
AssessmentStore { public String read(String questionId) throws Exception { String bodyData = ""; try { List<Row> rows = getPropertiesValueById("question_id", questionId, "blobAsText(body) as data"); Row row = rows.get(0); bodyData = row.getString("data"); } catch (Exception e) { throw new ResourceNotFoundException("ERR_ASSESSMENT_DATA", "Data Not Found."); } return bodyData; } AssessmentStore(); }
AssessmentStore { public String read(String questionId) throws Exception { String bodyData = ""; try { List<Row> rows = getPropertiesValueById("question_id", questionId, "blobAsText(body) as data"); Row row = rows.get(0); bodyData = row.getString("data"); } catch (Exception e) { throw new ResourceNotFoundException("ERR_ASSESSMENT_DATA", "Data Not Found."); } return bodyData; } AssessmentStore(); void save(String questionId, String body); String read(String questionId); Map<String, Object> getAssessmentProperties(String questionId, List properties); void update(String questionId, String body); void updateAssessmentProperties(String questionId, Map<String, Object> map); Map<String, Object> getItems(List<String> identifiers, List<String> properties); }
AssessmentStore { public String read(String questionId) throws Exception { String bodyData = ""; try { List<Row> rows = getPropertiesValueById("question_id", questionId, "blobAsText(body) as data"); Row row = rows.get(0); bodyData = row.getString("data"); } catch (Exception e) { throw new ResourceNotFoundException("ERR_ASSESSMENT_DATA", "Data Not Found."); } return bodyData; } AssessmentStore(); void save(String questionId, String body); String read(String questionId); Map<String, Object> getAssessmentProperties(String questionId, List properties); void update(String questionId, String body); void updateAssessmentProperties(String questionId, Map<String, Object> map); Map<String, Object> getItems(List<String> identifiers, List<String> properties);  }