package eu.dnetlib.dlms.jdbc;

import java.sql.Array;
import java.sql.Blob;
import java.sql.CallableStatement;
import java.sql.Clob;
import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.NClob;
import java.sql.PreparedStatement;
import java.sql.SQLClientInfoException;
import java.sql.SQLException;
import java.sql.SQLWarning;
import java.sql.SQLXML;
import java.sql.Savepoint;
import java.sql.Statement;
import java.sql.Struct;
import java.util.Map;
import java.util.Properties;

import eu.dnetlib.dlms.rmi.DLMSConnectionService;
import eu.dnetlib.enabling.tools.ServiceResolver;

public class WSRemoteConnection implements Connection {

	private DLMSConnectionService connectionService;
	private String connectionId;
	private ServiceResolver serviceResolver;

	public WSRemoteConnection(final ServiceResolver serviceResolver, final DLMSConnectionService connectionService, final String connectionId) {
		super();
		this.serviceResolver = serviceResolver;
		this.connectionService = connectionService;
		this.connectionId = connectionId;
	}

	public Statement createStatement() throws SQLException {
		return new WSRemoteStatement(serviceResolver, this);
	}

	
	public PreparedStatement prepareStatement(final String source) throws SQLException {
		return new WSRemotePreparedStatement(serviceResolver, this, source);
	}

	
	public void clearWarnings() throws SQLException {
		// TODO Auto-generated method stub

	}

	public void close() throws SQLException {
		// TODO Auto-generated method stub

	}

	public void commit() throws SQLException {
		// TODO Auto-generated method stub

	}

	public Array createArrayOf(final String arg0, final Object[] arg1) throws SQLException {
		// TODO Auto-generated method stub
		return null;
	}

	public Blob createBlob() throws SQLException {
		// TODO Auto-generated method stub
		return null;
	}

	public Clob createClob() throws SQLException {
		// TODO Auto-generated method stub
		return null;
	}

	public NClob createNClob() throws SQLException {
		// TODO Auto-generated method stub
		return null;
	}

	public SQLXML createSQLXML() throws SQLException {
		// TODO Auto-generated method stub
		return null;
	}

	public Statement createStatement(final int arg0, final int arg1) throws SQLException {
		// TODO Auto-generated method stub
		return null;
	}

	public Statement createStatement(final int arg0, final int arg1, final int arg2) throws SQLException {
		// TODO Auto-generated method stub
		return null;
	}

	public Struct createStruct(final String arg0, final Object[] arg1) throws SQLException {
		// TODO Auto-generated method stub
		return null;
	}

	public boolean getAutoCommit() throws SQLException {
		// TODO Auto-generated method stub
		return false;
	}

	public String getCatalog() throws SQLException {
		// TODO Auto-generated method stub
		return null;
	}

	public Properties getClientInfo() throws SQLException {
		// TODO Auto-generated method stub
		return null;
	}

	public String getClientInfo(final String arg0) throws SQLException {
		// TODO Auto-generated method stub
		return null;
	}

	public int getHoldability() throws SQLException {
		// TODO Auto-generated method stub
		return 0;
	}

	public DatabaseMetaData getMetaData() throws SQLException {
		// TODO Auto-generated method stub
		return null;
	}

	public int getTransactionIsolation() throws SQLException {
		// TODO Auto-generated method stub
		return 0;
	}

	public Map<String, Class<?>> getTypeMap() throws SQLException {
		// TODO Auto-generated method stub
		return null;
	}

	public SQLWarning getWarnings() throws SQLException {
		// TODO Auto-generated method stub
		return null;
	}

	public boolean isClosed() throws SQLException {
		// TODO Auto-generated method stub
		return false;
	}

	public boolean isReadOnly() throws SQLException {
		// TODO Auto-generated method stub
		return false;
	}

	public boolean isValid(final int arg0) throws SQLException {
		// TODO Auto-generated method stub
		return false;
	}

	public String nativeSQL(final String arg0) throws SQLException {
		// TODO Auto-generated method stub
		return null;
	}

	public CallableStatement prepareCall(final String arg0) throws SQLException {
		// TODO Auto-generated method stub
		return null;
	}

	public CallableStatement prepareCall(final String arg0, final int arg1, final int arg2) throws SQLException {
		// TODO Auto-generated method stub
		return null;
	}

	public CallableStatement prepareCall(final String arg0, final int arg1, final int arg2, final int arg3) throws SQLException {
		// TODO Auto-generated method stub
		return null;
	}

	public PreparedStatement prepareStatement(final String arg0, final int arg1) throws SQLException {
		// TODO Auto-generated method stub
		return null;
	}

	public PreparedStatement prepareStatement(final String arg0, final int[] arg1) throws SQLException {
		// TODO Auto-generated method stub
		return null;
	}

	public PreparedStatement prepareStatement(final String arg0, final String[] arg1) throws SQLException {
		// TODO Auto-generated method stub
		return null;
	}

	public PreparedStatement prepareStatement(final String arg0, final int arg1, final int arg2) throws SQLException {
		// TODO Auto-generated method stub
		return null;
	}

	public PreparedStatement prepareStatement(final String arg0, final int arg1, final int arg2, final int arg3) throws SQLException {
		// TODO Auto-generated method stub
		return null;
	}

	public void releaseSavepoint(final Savepoint arg0) throws SQLException {
		// TODO Auto-generated method stub

	}

	public void rollback() throws SQLException {
		// TODO Auto-generated method stub

	}

	public void rollback(final Savepoint arg0) throws SQLException {
		// TODO Auto-generated method stub

	}

	public void setAutoCommit(final boolean arg0) throws SQLException {
		// TODO Auto-generated method stub

	}

	public void setCatalog(final String arg0) throws SQLException {
		// TODO Auto-generated method stub

	}

	public void setClientInfo(final Properties arg0) throws SQLClientInfoException {
		// TODO Auto-generated method stub

	}

	public void setClientInfo(final String arg0, final String arg1) throws SQLClientInfoException {
		// TODO Auto-generated method stub

	}

	public void setHoldability(final int arg0) throws SQLException {
		// TODO Auto-generated method stub

	}

	public void setReadOnly(final boolean arg0) throws SQLException {
		// TODO Auto-generated method stub

	}

	public Savepoint setSavepoint() throws SQLException {
		// TODO Auto-generated method stub
		return null;
	}

	public Savepoint setSavepoint(final String arg0) throws SQLException {
		// TODO Auto-generated method stub
		return null;
	}

	public void setTransactionIsolation(final int arg0) throws SQLException {
		// TODO Auto-generated method stub

	}

	public void setTypeMap(final Map<String, Class<?>> arg0) throws SQLException {
		// TODO Auto-generated method stub

	}

	public boolean isWrapperFor(final Class<?> iface) throws SQLException {
		// TODO Auto-generated method stub
		return false;
	}

	public <T> T unwrap(final Class<T> iface) throws SQLException {
		// TODO Auto-generated method stub
		return null;
	}

	public DLMSConnectionService getConnectionService() {
		return connectionService;
	}

	public void setConnectionService(final DLMSConnectionService connectionService) {
		this.connectionService = connectionService;
	}

	public String getConnectionId() {
		return connectionId;
	}

	public void setConnectionId(final String connectionId) {
		this.connectionId = connectionId;
	}

}
