public ObjectResultData<T> addObject(T infoBean) { try { contentObject.accumulateAsJSONObject(OBJECTS_ACCESSOR, infoBean); } catch (GfJsonException e) { throw new ResultDataException(e.getMessage()); } return this; }
public SectionResultData setFooter(String footerText) { try { sectionGfJsonObject.put(RESULT_FOOTER, footerText); } catch (GfJsonException e) { throw new ResultDataException(e.getMessage()); } return this; }
public TabularResultData accumulate(String accumulateFor, Object value) { try { contentObject.accumulate(accumulateFor, value); } catch (GfJsonException e) { throw new ResultDataException(e.getMessage()); } return this; }
public CompositeResultData addSeparator(char buildSeparatorFrom) { try { contentObject.put(SEPARATOR, buildSeparatorFrom); } catch (GfJsonException e) { throw new ResultDataException(e.getMessage()); } return this; }
public CompositeResultData addSeparator(char buildSeparatorFrom) { try { contentObject.put(SEPARATOR, buildSeparatorFrom); } catch (GfJsonException e) { throw new ResultDataException(e.getMessage()); } return this; }
public SectionResultData setHeader(String headerText) { try { sectionGfJsonObject.put(RESULT_HEADER, headerText); } catch (GfJsonException e) { throw new ResultDataException(e.getMessage()); } return this; }
public SectionResultData addData(String name, Object value) { try { sectionGfJsonObject.put(name, value); } catch (GfJsonException e) { throw new ResultDataException(e.getMessage()); } return this; }
public ObjectResultData<T> addObject(T infoBean) { try { contentObject.accumulateAsJSONObject(OBJECTS_ACCESSOR, infoBean); } catch (GfJsonException e) { throw new ResultDataException(e.getMessage()); } return this; }
public ObjectResultData<T> addCollection(Collection<T> infoBeans) { for (T infoBean : infoBeans) { try { contentObject.accumulateAsJSONObject(OBJECTS_ACCESSOR, infoBean); } catch (GfJsonException e) { throw new ResultDataException(e.getMessage()); } } return this; }
public SectionResultData setHeader(String headerText) { try { sectionGfJsonObject.put(RESULT_HEADER, headerText); } catch (GfJsonException e) { throw new ResultDataException(e.getMessage()); } return this; }
public SectionResultData addSeparator(char buildSeparatorFrom) { try { sectionGfJsonObject.put(SEPARATOR, buildSeparatorFrom); } catch (GfJsonException e) { throw new ResultDataException(e.getMessage()); } return this; }
public ObjectResultData<T> addCollection(Collection<T> infoBeans) { for (T infoBean : infoBeans) { try { contentObject.accumulateAsJSONObject(OBJECTS_ACCESSOR, infoBean); } catch (GfJsonException e) { throw new ResultDataException(e.getMessage()); } } return this; }
public TabularResultData accumulate(String accumulateFor, Object value) { try { contentObject.accumulate(accumulateFor, value); } catch (GfJsonException e) { throw new ResultDataException(e.getMessage()); } return this; }
public SectionResultData setFooter(String footerText) { try { sectionGfJsonObject.put(RESULT_FOOTER, footerText); } catch (GfJsonException e) { throw new ResultDataException(e.getMessage()); } return this; }
public SectionResultData addSeparator(char buildSeparatorFrom) { try { sectionGfJsonObject.put(SEPARATOR, buildSeparatorFrom); } catch (GfJsonException e) { throw new ResultDataException(e.getMessage()); } return this; }
public SectionResultData addData(String name, Object value) { try { sectionGfJsonObject.put(name, value); } catch (GfJsonException e) { throw new ResultDataException(e.getMessage()); } return this; }
/** * * @param line message to add * @return this InfoResultData */ public InfoResultData addLine(String line) { try { contentObject.accumulate(RESULT_CONTENT_MESSAGE, line); } catch (GfJsonException e) { throw new ResultDataException(e.getMessage()); } return this; }
/** * * @param line message to add * @return this InfoResultData */ public InfoResultData addLine(String line) { try { contentObject.accumulate(RESULT_CONTENT_MESSAGE, line); } catch (GfJsonException e) { throw new ResultDataException(e.getMessage()); } return this; }
public List<String> retrieveAllValues(String columnName) { List<String> values = new ArrayList<String>(); try { GfJsonArray jsonArray = contentObject.getJSONArray(columnName); int size = jsonArray.size(); for (int i = 0; i < size; i++) { values.add(String.valueOf(jsonArray.get(i))); } } catch (GfJsonException e) { throw new ResultDataException(e.getMessage()); } return values; } }
/** * * @param headerText * @return this ResultData * @throws ResultDataException * If the value is non-finite number or if the key is null. */ public AbstractResultData setHeader(String headerText) { try { gfJsonObject.put(RESULT_HEADER, headerText); } catch (GfJsonException e) { throw new ResultDataException(e.getMessage()); } return this; }