@Override
public IStatsComponent getStatsDownloadComponent()
{
CrisStatDownloadTopObjectComponent component = instanceNewCrisStatsDownloadComponent();
BeanFacetComponent bean = new BeanFacetComponent();
bean.setFacetQuery(ASolrStatsConfigurerComponent.FILE + ":*");
bean.setFacetField(ASolrStatsConfigurerComponent.FILE);
bean.setQuery(getRelationConfiguration().getQuery());
for(String key : getTypes().keySet()) {
bean.getSubQueries().put(key, getTypes().get(key).getFacetQuery());
}
component.setFromField("search.uniqueid");
component.setBean(bean);
component.setTargetObjectClass(getTarget());
component.setRelationObjectClass(getRelationObjectClass());
component.setApplicationService(getApplicationService());
try
{
component.setRelationObjectType(CrisConstants.getEntityType(getRelationObjectClass()));
}
catch (InstantiationException e)
{
log.error(e.getMessage(), e);
}
catch (IllegalAccessException e)
{
log.error(e.getMessage(), e);
}
component.setCrisSearchService((CrisSearchService) getSearchService());
return component;
}