/** * Returns a string representing the graph of ancestors. The string is delimited * by "/". The ancestors are ordered by root first and represented by UIDs. * * @param roots the root organisation units, if null using real roots. */ public String getParentGraph( Collection<OrganisationUnit> roots ) { Set<String> rootUids = roots != null ? Sets.newHashSet( IdentifiableObjectUtils.getUids( roots ) ) : null; List<String> ancestors = getAncestorUids( rootUids ); return StringUtils.join( ancestors, PATH_SEP ); }
Collection<String> dataElements = IdentifiableObjectUtils.getUids( dataElementService.getDataElementsByAggregationLevel( level ) );
/** * Returns filter items for all filters associated with this * query item. If no filter items are specified, return all * items part of the option set. If not option set is specified, * returns null. */ public List<String> getOptionSetFilterItemsOrAll() { if ( !hasOptionSet() ) { return null; } return hasFilter() ? getOptionSetQueryFilterItems() : IdentifiableObjectUtils.getUids( optionSet.getOptions() ); }
/** * Returns filter items for all filters associated with this * query item. If no filter items are specified, return all * items part of the legend set. If not legend set is specified, * returns null. */ public List<String> getLegendSetFilterItemsOrAll() { if ( !hasLegendSet() ) { return null; } return hasFilter() ? getQueryFilterItems() : IdentifiableObjectUtils.getUids( legendSet.getSortedLegends() ); }
getUids( params.getDimensionOrFilterItems( PERIOD_DIM_ID ) ) : getLocalPeriodIdentifiers( params.getDimensionOrFilterItems( PERIOD_DIM_ID ), calendar );
String isoPeriodString = getCommaDelimitedString( IdentifiableObjectUtils.getUids( relativePeriods ) );
getUids( params.getDimensionOrFilterItems( PERIOD_DIM_ID ) ) : getLocalPeriodIdentifiers( params.getDimensionOrFilterItems( PERIOD_DIM_ID ), calendar );
sql += sqlHelper.whereAnd() + " " + col + " in (" + getQuotedCommaDelimitedString( getUids( dim.getItems() ) ) + ") ";
violation = "Data elements must be of a value and aggregation type that allow aggregation: " + getUids( nonAggDataElements );
hql += hlp.whereAnd() + " a.workflow.uid in (" + getQuotedCommaDelimitedString( getUids( params.getWorkflows() ) ) + ") "; hql += hlp.whereAnd() + " a.level.uid in (" + getQuotedCommaDelimitedString( getUids( params.getLevels() ) ) + ") "; hql += hlp.whereAnd() + " a.organisationUnit.uid in (" + getQuotedCommaDelimitedString( getUids( params.getOrganisationUnits() ) ) + ") "; hql += hlp.whereAnd() + " a.attributeOptionCombo.uid in (" + getQuotedCommaDelimitedString( getUids( params.getAttributeOptionCombos() ) ) + ") ";
List<String> uids = getUids( items );
sql += sqlHelper.whereAnd() + " " + quote( ANALYTICS_TBL_ALIAS, params.getPeriodType().toLowerCase() ) + " in (" + getQuotedCommaDelimitedString( getUids( params.getDimensionOrFilterItems( PERIOD_DIM_ID ) ) ) + ") "; sql += sqlHelper.whereAnd() + " ou in (" + getQuotedCommaDelimitedString( getUids( params.getDimensionOrFilterItems( ORGUNIT_DIM_ID ) ) ) + ") "; sql += sqlHelper.whereAnd() + " ou in (" + getQuotedCommaDelimitedString( getUids( params.getOrganisationUnitChildren() ) ) + ") "; sql += "and " + col + " in (" + getQuotedCommaDelimitedString( getUids( dim.getItems() ) ) + ") ";
sql += sqlHelper.whereAnd() + " " + quote( alias, params.getPeriodType().toLowerCase() ) + " in (" + getQuotedCommaDelimitedString( getUids( params.getDimensionOrFilterItems( PERIOD_DIM_ID ) ) ) + ") "; sql += sqlHelper.whereAnd() + " " + orgUnitCol + " in (" + getQuotedCommaDelimitedString( getUids( params.getDimensionOrFilterItems( ORGUNIT_DIM_ID ) ) ) + ") "; sql += sqlHelper.whereAnd() + " " + orgUnitCol + " in (" + getQuotedCommaDelimitedString( getUids( params.getOrganisationUnitChildren() ) ) + ") "; sql += sqlHelper.whereAnd() + " " + col + " in (" + getQuotedCommaDelimitedString( getUids( dim.getItems() ) ) + ") ";
hql += hlp.whereAnd() + "pi.organisationUnit.uid in (" + getQuotedCommaDelimitedString( getUids( params.getOrganisationUnits() ) ) + ")";
hql += hlp.whereAnd() + "tei.organisationUnit.uid in (" + getQuotedCommaDelimitedString( getUids( params.getOrganisationUnits() ) ) + ")";