Context cx = Context.enter(); try {  aggregates.calculate(cx, getQueryScope() ); } finally { Context.exit(); }
aggregates.calculate( getQueryScope() );
		public void execute() throws DataException		{			logger.logp( Level.FINER,					PreparedQuery.Executor.class.getName( ),					"execute",					"Start to execute" );			if(this.isExecuted)				return;			// Execute the query			odiResult = executeOdiQuery( );			// Bind the row object to the odi result set			this.dataSet.setResultSet( odiResult, false );						    // Calculate aggregate values		    aggregates = new AggregateCalculator( aggrTable, odiResult );			    			Context cx = Context.enter();			try			{			    // Calculate aggregate values			    aggregates.calculate(cx, getQueryScope() );			}			finally			{				Context.exit();			}						this.isExecuted = true;						logger.logp( Level.FINER,					PreparedQuery.Executor.class.getName( ),					"execute",					"Finish executing" );		}