private void emitCriteriaRow(JwCsvBuffer b, JwList<Object> v) { int len = b.getLength(); for (Object e : v) if (e == null) b.addField(""); else b.addField(e.toString()); if (len != b.getLength()) b.endRecord(); }
public void emitGenerated(JwCsvBuffer b) { if (getState().getExportTimestamp()) { b.addField("Report Generated (UTC)"); ScServletData data = ScServletData.getLocal(); JwTimestampPolicy tp = data.getPreferredTimestampPolicy(); b.addField(JwTimestamp.createNowUtc(), tp); b.endRecord(); b.endRecord(); } }
private void emitColumn( ScServletData data, JwCsvBuffer buf, ScGridColumn<T> col, T e, int currentChamber) { Object o = col.getCellDivisionExportObject(e, currentChamber); Object m = col.getCellDivisionModel(e, currentChamber); if (m == null && o instanceof JwAdaptorIF) o = null; buf.addField(getExportStringForObject(data, o, m)); }
private void emitMainHeaders(JwCsvBuffer b, int rowIndex, boolean isLastRow) { for (ScGridColumn c : getColumns()) { if (!c.isExportable()) continue; if (rowIndex < c.getTitleCount()) b.addField(c.getExportTitleString(rowIndex).toUpperCase()); else b.skipField(); } }
private void emitGridTitle(JwCsvBuffer b) { String s = getState().getExportGridTitle(); if (s != null) { b.addField(s); b.endRecord(); } }
public String getCsvExportFor(String airportCode, String roleOrRoleGroup) { JwSqlSelect st = getUserAirportAndRolesAndRoleGroupsSelect(airportCode, roleOrRoleGroup); JwCsvBuffer buffer = new JwCsvBuffer(); buffer.addField("Login"); buffer.addField("First Name"); buffer.addField("Last Name"); buffer.addField("Roles"); buffer.addField("Role Groups"); buffer.addField("Airports"); buffer.endRecord(); JwSqlResultSetProcessorIF p = getUserAirportAndRolesAndRoleGroupsResultSetProcessor(buffer); processResults(st, p); return buffer.toString(); }