public AggregationType getActiveAggregationType() { if ( getAggregationType() == null ) { AggregationType aggType = logicalColumn.getAggregationType(); if ( aggType == null ) { return AggregationType.NONE; } else { return aggType; } } else { return getAggregationType(); } }
} else { if ( ( column.getAggregationType() == setting ) || column.getAggregationList() != null && column.getAggregationList().contains( setting ) ) { aggsetting = setting;
/** * This is a utility method that looks into an old domain for the same column ids, and then copies over the old * metadata into the new. * * @param oldDomain * @param newDomain */ public void copyOverMetadata( Domain oldDomain, Domain newDomain ) { Category category = newDomain.getLogicalModels().get( 0 ).getCategories().get( 0 ); LogicalModel oldModel = oldDomain.getLogicalModels().get( 0 ); for ( LogicalColumn column : category.getLogicalColumns() ) { LogicalColumn oldColumn = oldModel.findLogicalColumn( column.getId() ); if ( oldColumn != null ) { column.setDataType( oldColumn.getDataType() ); column.setName( oldColumn.getName() ); column.setAggregationList( oldColumn.getAggregationList() ); column.setAggregationType( oldColumn.getAggregationType() ); } } }
protected void addOrderBy( Query query, Category category, String columnId, String aggregation, Order.Type orderType ) throws PentahoMetadataException { if ( category == null ) { throw new PentahoMetadataException( Messages.getErrorString( "QueryXmlHelper.ERROR_0016_BUSINESS_CATEGORY_NULL" ) ); //$NON-NLS-1$ } LogicalColumn column = category.findLogicalColumn( columnId ); if ( column == null ) { throw new PentahoMetadataException( Messages.getErrorString( "QueryXmlHelper.ERROR_0013_BUSINESS_COL_NOT_FOUND", category.getId(), columnId ) ); //$NON-NLS-1$ } // this code verifies the aggregation setting provided is a // valid option AggregationType aggsetting = null; if ( aggregation != null ) { AggregationType setting = AggregationType.valueOf( aggregation.toUpperCase() ); if ( ( column.getAggregationType() == setting ) || column.getAggregationList() != null && column.getAggregationList().contains( setting ) ) { aggsetting = setting; } } query.getOrders().add( new Order( new Selection( category, column, aggsetting ), orderType ) ); }
xml.append( "\"" ); //$NON-NLS-1$ String typeDesc = convertToMondrian( businessColumn.getAggregationType() ); if ( typeDesc != null ) { xml.append( " aggregator=\"" ); //$NON-NLS-1$
if ( logicalColumn.getAggregationType() != null ) { setDefaultAggregation( logicalColumn.getAggregationType() );
if ( aggregation != null ) { AggregationType setting = AggregationType.valueOf( aggregation.toUpperCase() ); if ( ( column.getAggregationType() == setting ) || column.getAggregationList() != null && column.getAggregationList().contains( setting ) ) { aggsetting = setting;
if ( c.getAggregationType() != null ) { defaultAggType = c.getAggregationType();
theMeasureMD.setDefaultAggregation( theMeasure.getLogicalColumn().getAggregationType() ); String possibleMeasureName = theMeasure.getLogicalColumn().getId(); if ( !theMeasure.getLogicalColumn().getId().endsWith( BaseModelerWorkspaceHelper.OLAP_SUFFIX ) AggregationType aggType = col.getAggregationType();