String queryId = (String) mapQueryToId.get(query);
String queryId = (String)report.getQueryIDs( ).get( query );
	private void prepareMetaData( ) throws EngineException	{		ReportQueryBuilder queryBuilder = new ReportQueryBuilder( );		// load query -> report item design		queryBuilder.build( report, executionContext );		mapQueryToReportItem = queryBuilder.getQueryToReportItemMap( );				// load query -> result set name		loadResultSetMetaData( );		assert mapQueryIDToResultSetName != null;		// set query -> query id		if (mapQueryToId == null) {			mapQueryToId = new HashMap();		}		mapQueryToId.putAll(report.getQueryIDs());		 		// set displayName -> result set name		if (mapDispNameToResultSetName == null)		{			mapDispNameToResultSetName = new HashMap();		}		else		{			mapDispNameToResultSetName.clear( );		}				// set displayName -> query		if( mapDispNameToQuery == null )		{			mapDispNameToQuery = new HashMap( );		}		else		{			mapDispNameToQuery.clear( );		}				// set result set name -> query		if( mapResultSetToQuery == null )		{			mapResultSetToQuery = new HashMap( );		}		else		{			mapResultSetToQuery.clear( );		}				if( mapReportItemToDisplayName == null )		{			mapReportItemToDisplayName = new HashMap( );		}		else		{			mapReportItemToDisplayName.clear( );		}		 		ArrayList queryList = report.getQueries();		int counter = 0;		for (int i = 0; i < queryList.size(); i++) {			IQueryDefinition query = (IQueryDefinition) queryList.get(i);			assert query != null;						String queryId = (String) mapQueryToId.get(query);			List resultSetList = (List) mapQueryIDToResultSetName.get(queryId);			if (resultSetList == null) {				continue;			}			// create display name			ReportItemDesign reportItem = (ReportItemDesign) mapQueryToReportItem					.get(query);			String displayName = null;			if (reportItem.getName() != null) {				displayName = reportItem.getName() + "_" + counter;			} else {				displayName = "ELEMENT_" + reportItem.getID() + "_" + counter;			}			counter++;						mapReportItemToDisplayName.put( reportItem, displayName );			// get result set name			Iterator resultSetIter = resultSetList.iterator();			while (resultSetIter.hasNext()) {				String resultSetName = (String) resultSetIter.next();								mapDispNameToResultSetName.put(displayName, resultSetName);				mapDispNameToQuery.put( displayName, query );				mapResultSetToQuery.put( resultSetName, query );			}		}				isMetaDataPrepared = true;	}