com.metamatrix.connector.salesforce.connection
Class SalesforceConnection

java.lang.Object
  extended by org.teiid.connector.basic.BasicConnection
      extended by com.metamatrix.connector.salesforce.connection.SalesforceConnection
All Implemented Interfaces:
Connection

public class SalesforceConnection
extends BasicConnection


Constructor Summary
SalesforceConnection(java.lang.String username, java.lang.String password, java.net.URL url, ConnectorEnvironment env)
           
 
Method Summary
 void close()
          Release the connection.
 void closeCalled()
          Called by the pool to indicate that the connection was returned to the pool.
 int create(DataPayload data)
           
 ResultSetExecution createResultSetExecution(IQueryCommand command, ExecutionContext executionContext, RuntimeMetadata metadata)
           
 UpdateExecution createUpdateExecution(ICommand command, ExecutionContext executionContext, RuntimeMetadata metadata)
           
 int delete(java.lang.String[] ids)
           
 boolean isAlive()
          Called to determine whether the connection is open
 QueryResult query(java.lang.String queryString, int maxBatchSize)
           
 QueryResult queryMore(java.lang.String queryLocator)
           
 int update(java.util.List<DataPayload> updateDataList)
           
 
Methods inherited from class org.teiid.connector.basic.BasicConnection
createExecution, createProcedureExecution, getCapabilities, setConnectorIdentity
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SalesforceConnection

public SalesforceConnection(java.lang.String username,
                            java.lang.String password,
                            java.net.URL url,
                            ConnectorEnvironment env)
                     throws ConnectorException
Throws:
ConnectorException
Method Detail

createResultSetExecution

public ResultSetExecution createResultSetExecution(IQueryCommand command,
                                                   ExecutionContext executionContext,
                                                   RuntimeMetadata metadata)
                                            throws ConnectorException
Overrides:
createResultSetExecution in class BasicConnection
Throws:
ConnectorException

createUpdateExecution

public UpdateExecution createUpdateExecution(ICommand command,
                                             ExecutionContext executionContext,
                                             RuntimeMetadata metadata)
                                      throws ConnectorException
Overrides:
createUpdateExecution in class BasicConnection
Throws:
ConnectorException

close

public void close()
Description copied from interface: Connection
Release the connection. This will be called when MetaMatrix has completed using the connection for an execution.


query

public QueryResult query(java.lang.String queryString,
                         int maxBatchSize)
                  throws ConnectorException
Throws:
ConnectorException

queryMore

public QueryResult queryMore(java.lang.String queryLocator)
                      throws ConnectorException
Throws:
ConnectorException

isAlive

public boolean isAlive()
Description copied from interface: Connection
Called to determine whether the connection is open

Specified by:
isAlive in interface Connection
Overrides:
isAlive in class BasicConnection
Returns:
true if open, false if there is a source error.

closeCalled

public void closeCalled()
Description copied from interface: Connection
Called by the pool to indicate that the connection was returned to the pool. The actual close call will be made when the pool wants to purge this connection.

Specified by:
closeCalled in interface Connection
Overrides:
closeCalled in class BasicConnection

delete

public int delete(java.lang.String[] ids)
           throws ConnectorException
Throws:
ConnectorException

create

public int create(DataPayload data)
           throws ConnectorException
Throws:
ConnectorException

update

public int update(java.util.List<DataPayload> updateDataList)
           throws ConnectorException
Throws:
ConnectorException


Copyright © 2009. All Rights Reserved.