@Override public String getKey() { QueryKey key = new QueryKey(); key.add( getDimension() ); getItems().forEach( e -> key.add( e.getDimensionItem() ) ); return key .add( allItems ) .addIgnoreNull( legendSet ) .addIgnoreNull( aggregationType ) .addIgnoreNull( filter ).asPlainKey(); }
/** * Equal to {@link QueryKey#build()}. */ @Override public String toString() { return build(); } }
public String getKey() { QueryKey key = new QueryKey(); key.add( getItemId() ).addIgnoreNull( getFiltersAsString() ); if ( legendSet != null ) { key.add( legendSet.getUid() ); } return key.build(); }
/** * Adds a component to this key if the given object is not null, provided * by the given object. * * @param object the object to check for null. * @param keySupplier the supplier of the key component. */ public QueryKey addIgnoreNull( Object object, Supplier<String> keySupplier ) { if ( object != null ) { this.addIgnoreNull( keySupplier.get() ); } return this; }
QueryKey key = new QueryKey(); dimensions.forEach( e -> key.add( "[" + e.getKey() + "]" ) ); filters.forEach( e -> key.add( "[" + e.getKey() + "]" ) ); measureCriteria.forEach( ( k, v ) -> key.add( ( String.valueOf( k ) + v ) ) ); preAggregateMeasureCriteria.forEach( ( k, v ) -> key.add( ( String.valueOf( k ) + v ) ) ); .add( aggregationType ) .add( skipMeta ) .add( skipData ) .add( skipHeaders ) .add( skipRounding ) .add( completedOnly ) .add( hierarchyMeta ) .add( ignoreLimit ) .add( hideEmptyRows ) .add( hideEmptyColumns ) .add( showHierarchy ) .add( includeNumDen ) .add( includePeriodStartEndDates ) .add( includeMetadataDetails ) .add( displayProperty ) .add( outputIdScheme ) .add( outputFormat ) .add( duplicatesOnly ) .add( approvalLevel ) .add( startDate ) .add( endDate )
QueryKey key = new QueryKey() .add( super.getKey() ); items.forEach( e -> key.add( "[" + e.getKey() + "]" ) ); itemFilters.forEach( e -> key.add( "[" + e.getKey() + "]" ) ); itemProgramIndicators.forEach( e -> key.add( e.getUid() ) ); asc.forEach( e -> e.getUid() ); desc.forEach( e -> e.getUid() ); .addIgnoreNull( value, () -> value.getUid() ) .addIgnoreNull( programIndicator, () -> programIndicator.getUid() ) .addIgnoreNull( organisationUnitMode ) .addIgnoreNull( page ) .addIgnoreNull( pageSize ) .addIgnoreNull( sortOrder ) .addIgnoreNull( limit ) .addIgnoreNull( outputType ) .addIgnoreNull( eventStatus ) .addIgnoreNull( collapseDataDimensions ) .addIgnoreNull( coordinatesOnly ) .addIgnoreNull( geometryOnly ) .addIgnoreNull( aggregateData ) .addIgnoreNull( clusterSize ) .addIgnoreNull( coordinateField ) .addIgnoreNull( bbox ) .addIgnoreNull( includeClusterPoints ) .addIgnoreNull( programStatus ) .addIgnoreNull( includeMetadataDetails ) .addIgnoreNull( dataIdScheme )