private JSONArray serializeColumns(CrosstabDefinition crosstabDefinition) throws JSONException {
List<Column> columns = crosstabDefinition.getColumns();
JSONArray toReturn = new JSONArray();
for (int i = 0; i < columns.size(); i++) {
Column column = columns.get(i);
JSONObject obj = new JSONObject();
obj.put(CrosstabSerializationConstants.ID, column.getEntityId());
obj.put(CrosstabSerializationConstants.ALIAS, column.getAlias());
obj.put(CrosstabSerializationConstants.ICON_CLS, column.getIconCls());
obj.put(CrosstabSerializationConstants.NATURE, column.getNature());
toReturn.put(obj);
}
return toReturn;
}