// Path: src/main/java/com/stratio/connector/deep/connection/DeepConnectionHandler.java
// public class DeepConnectionHandler extends ConnectionHandler {
// 
// 	/**
// 	 * Basic constructor.
// 	 * 
// 	 * @param configuration
// 	 * 						The configuration
// 	 */
// 	public DeepConnectionHandler(IConfiguration configuration) {
// 		super(configuration);
// 	}
// 
// 	/**
// 	 * Use config & Credentials to create Deep native connection.
// 	 * 
// 	 * @param iCredentials
// 	 *            			The credentials
// 	 * @param connectorClusterConfig
// 	 *            					The connector cluster configuration
// 	 * 
// 	 * @return DeepConnection
// 	 **/
// 	@Override
// 	protected Connection createNativeConnection(ICredentials iCredentials, ConnectorClusterConfig connectorClusterConfig)
// 			throws ConnectionException {
// 
// 		Connection connection;
// 
// 		connection = new DeepConnection(iCredentials, connectorClusterConfig);
// 
// 
// 		return connection;
// 	}
// 
// }


import com.stratio.connector.commons.engine.CommonsQueryEngine;
import com.stratio.connector.deep.connection.DeepConnectionHandler;
import com.stratio.crossdata.common.connector.IResultHandler;
import com.stratio.crossdata.common.exceptions.ConnectorException;
import com.stratio.crossdata.common.exceptions.ExecutionException;
import com.stratio.crossdata.common.exceptions.UnsupportedException;
import com.stratio.crossdata.common.logicalplan.LogicalWorkflow;
import com.stratio.crossdata.common.result.QueryResult;
import com.stratio.deep.core.context.DeepSparkContext;
/*
 * Licensed to STRATIO (C) under one or more contributor license agreements.
 * See the NOTICE file distributed with this work for additional information
 * regarding copyright ownership.  The STRATIO (C) licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */

package com.stratio.connector.deep.engine.query;


/**
 * 
 * Subclass that extends CommonsQueryEngine.
 *
 */
public class DeepQueryEngine extends CommonsQueryEngine {

	private final DeepSparkContext deepContext;

	private final DeepConnectionHandler deepConnectionHandler;

	/**
	 * Basic constructor.
	 * 
	 * @param deepContext
	 * 						The Deep Context
	 * @param deepConnectionHandler
	 * 								The connection handler
	 */
// Path: src/main/java/com/stratio/connector/deep/connection/DeepConnectionHandler.java
// public class DeepConnectionHandler extends ConnectionHandler {
// 
// 	/**
// 	 * Basic constructor.
// 	 * 
// 	 * @param configuration
// 	 * 						The configuration
// 	 */
// 	public DeepConnectionHandler(IConfiguration configuration) {
// 		super(configuration);
// 	}
// 
// 	/**
// 	 * Use config & Credentials to create Deep native connection.
// 	 * 
// 	 * @param iCredentials
// 	 *            			The credentials
// 	 * @param connectorClusterConfig
// 	 *            					The connector cluster configuration
// 	 * 
// 	 * @return DeepConnection
// 	 **/
// 	@Override
// 	protected Connection createNativeConnection(ICredentials iCredentials, ConnectorClusterConfig connectorClusterConfig)
// 			throws ConnectionException {
// 
// 		Connection connection;
// 
// 		connection = new DeepConnection(iCredentials, connectorClusterConfig);
// 
// 
// 		return connection;
// 	}
// 
// }


// Path: src/main/java/com/stratio/connector/deep/engine/query/DeepQueryEngine.java
import com.stratio.connector.commons.engine.CommonsQueryEngine;
import com.stratio.connector.deep.connection.DeepConnectionHandler;
import com.stratio.crossdata.common.connector.IResultHandler;
import com.stratio.crossdata.common.exceptions.ConnectorException;
import com.stratio.crossdata.common.exceptions.ExecutionException;
import com.stratio.crossdata.common.exceptions.UnsupportedException;
import com.stratio.crossdata.common.logicalplan.LogicalWorkflow;
import com.stratio.crossdata.common.result.QueryResult;
import com.stratio.deep.core.context.DeepSparkContext;

/*
 * Licensed to STRATIO (C) under one or more contributor license agreements.
 * See the NOTICE file distributed with this work for additional information
 * regarding copyright ownership.  The STRATIO (C) licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */

package com.stratio.connector.deep.engine.query;


/**
 * 
 * Subclass that extends CommonsQueryEngine.
 *
 */
public class DeepQueryEngine extends CommonsQueryEngine {

	private final DeepSparkContext deepContext;

	private final DeepConnectionHandler deepConnectionHandler;

	/**
	 * Basic constructor.
	 * 
	 * @param deepContext
	 * 						The Deep Context
	 * @param deepConnectionHandler
	 * 								The connection handler
	 */
	public DeepQueryEngine(DeepSparkContext deepContext, DeepConnectionHandler deepConnectionHandler) {