private static CategoryFilter createCategoryFilter(UNREDDCategories category) {
return new CategoryFilter(category.getName(), SearchOperator.EQUAL_TO);
}
protected static RESTResource createStatsDataResource(String statsDefName, String year, String month, String day, String csv) {
UNREDDStatsData statsData = new UNREDDStatsData();
statsData.setAttribute(UNREDDStatsData.Attributes.STATSDEF, statsDefName);
statsData.setAttribute(UNREDDStatsData.Attributes.YEAR, year);
if (month != null) {
statsData.setAttribute(UNREDDStatsData.Attributes.MONTH, month);
}
if (day != null) {
statsData.setAttribute(UNREDDStatsData.Attributes.DAY, day);
}
RESTResource res = statsData.createRESTResource();
String resName = NameUtils.buildStatsDataName(statsDefName, year, month, day);
res.setName(resName);
RESTStoredData storedData = new RESTStoredData();