Bug 182061 Data engine changes to support result set sharing
data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/PreparedQuery.java
{
	/**
	 * 
	 * @param baseQyeryDef
	 * @return
	 */
	static IBaseQueryDefinition copy( IBaseQueryDefinition baseQyeryDef )
	{
		if( baseQyeryDef instanceof SubqueryDefinition )
		{
			SubqueryDefinition srcSubQueryDefn = (SubqueryDefinition) baseQyeryDef;
			SubqueryDefinition destSubQueryDefn = new SubqueryDefinition(
					srcSubQueryDefn.getName( ), baseQyeryDef
							.getParentQuery( ) );
			destSubQueryDefn.setApplyOnGroupFlag( srcSubQueryDefn.applyOnGroup( ) );
			destSubQueryDefn.setMaxRows( srcSubQueryDefn.getMaxRows( ) );
			destSubQueryDefn.setUsesDetails( srcSubQueryDefn.usesDetails( ) );
			copyGroupList( srcSubQueryDefn, destSubQueryDefn );