use of org.apache.jackrabbit.api.stats.QueryStatDto in project jackrabbit by apache.
the class QueryStatManager method asTabularData.
private TabularData asTabularData(QueryStatDto[] data) {
TabularDataSupport tds = null;
try {
CompositeType ct = QueryStatCompositeTypeFactory.getCompositeType();
TabularType tt = new TabularType(QueryStatDto.class.getName(), "Query History", ct, QueryStatCompositeTypeFactory.index);
tds = new TabularDataSupport(tt);
for (QueryStatDto q : data) {
tds.put(new CompositeDataSupport(ct, QueryStatCompositeTypeFactory.names, QueryStatCompositeTypeFactory.getValues(q)));
}
return tds;
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
Aggregations