public Builder withCategory( Category category ) { this.params.setDimensionOptions( category.getUid(), DimensionType.CATEGORY, null, new ArrayList<>( category.getItems() ) ); return this; }
/** * Returns meta-data mapping for this analytical object. Includes a identifier * to name mapping for dynamic dimensions. */ public Map<String, String> getMetaData() { final Map<String, String> meta = new HashMap<>(); //TODO use getDimension() instead of getUid() ? dataElementGroupSetDimensions.forEach( dim -> meta.put( dim.getDimension().getUid(), dim.getDimension().getDisplayName() ) ); organisationUnitGroupSetDimensions.forEach( group -> meta.put( group.getDimension().getUid(), group.getDimension().getDisplayName() ) ); categoryDimensions.forEach( dim -> meta.put( dim.getDimension().getUid(), dim.getDimension().getDisplayName() ) ); return meta; }
log.warn( "Could not get sub-total for category: " + category.getUid() + " for data set report: " + dataSet + ", not a data dimension" ); continue;
@Override public String getCreateTempTableStatement() { String statement = "create table " + getTempTableName() + " (" + "categoryoptioncomboid integer not null, " + "categoryoptioncomboname varchar(255), "; for ( Category category : objects ) { quote( category.getName() ); statement += quote( category.getName() ) + " varchar(230), "; statement += quote( category.getUid() ) + " character(11), "; } for ( CategoryOptionGroupSet groupSet : groupSets ) { statement += quote( groupSet.getName() ) + " varchar(230), "; statement += quote( groupSet.getUid() ) + " character(11), "; } statement += "primary key (categoryoptioncomboid))"; return statement; }
"where coc.categoryoptioncomboid = cocco.categoryoptioncomboid " + "and cco.categoryid = " + category.getId() + " " + "limit 1) as " + quote( category.getUid() ) + ", ";