org.teiid.resource.adapter.salesforce
Class SalesforceConnectionImpl

java.lang.Object
  extended by org.teiid.resource.spi.BasicConnection
      extended by org.teiid.resource.adapter.salesforce.SalesforceConnectionImpl
All Implemented Interfaces:
javax.resource.cci.Connection, SalesforceConnection

public class SalesforceConnectionImpl
extends BasicConnection
implements SalesforceConnection


Constructor Summary
SalesforceConnectionImpl(java.lang.String username, java.lang.String password, java.net.URL url, long pingInterval, int timeout)
           
 
Method Summary
 void close()
           
 int create(DataPayload data)
           
 int delete(java.lang.String[] ids)
           
 DeletedResult getDeleted(java.lang.String objectName, javax.xml.datatype.XMLGregorianCalendar startCalendar, javax.xml.datatype.XMLGregorianCalendar endCalendar)
           
 DescribeSObjectResult getObjectMetaData(java.lang.String objectName)
           
 DescribeGlobalResult getObjects()
           
 UpdatedResult getUpdated(java.lang.String objectType, javax.xml.datatype.XMLGregorianCalendar startDate, javax.xml.datatype.XMLGregorianCalendar endDate)
           
 boolean isValid()
           
 QueryResult query(java.lang.String queryString, int batchSize, java.lang.Boolean queryAll)
           
 QueryResult queryMore(java.lang.String queryLocator, int batchSize)
           
 QueryResult retrieve(java.lang.String fieldList, java.lang.String sObjectType, java.util.List<java.lang.String> ids)
           
 int update(java.util.List<DataPayload> updateDataList)
           
 
Methods inherited from class org.teiid.resource.spi.BasicConnection
cleanUp, createInteraction, getLocalTransaction, getMetaData, getResultSetInfo, getXAResource, isAlive
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.resource.cci.Connection
createInteraction, getLocalTransaction, getMetaData, getResultSetInfo
 

Constructor Detail

SalesforceConnectionImpl

public SalesforceConnectionImpl(java.lang.String username,
                                java.lang.String password,
                                java.net.URL url,
                                long pingInterval,
                                int timeout)
                         throws javax.resource.ResourceException
Throws:
javax.resource.ResourceException
Method Detail

isValid

public boolean isValid()
Specified by:
isValid in interface SalesforceConnection

query

public QueryResult query(java.lang.String queryString,
                         int batchSize,
                         java.lang.Boolean queryAll)
                  throws javax.resource.ResourceException
Specified by:
query in interface SalesforceConnection
Throws:
javax.resource.ResourceException

queryMore

public QueryResult queryMore(java.lang.String queryLocator,
                             int batchSize)
                      throws javax.resource.ResourceException
Specified by:
queryMore in interface SalesforceConnection
Throws:
javax.resource.ResourceException

delete

public int delete(java.lang.String[] ids)
           throws javax.resource.ResourceException
Specified by:
delete in interface SalesforceConnection
Throws:
javax.resource.ResourceException

create

public int create(DataPayload data)
           throws javax.resource.ResourceException
Specified by:
create in interface SalesforceConnection
Throws:
javax.resource.ResourceException

update

public int update(java.util.List<DataPayload> updateDataList)
           throws javax.resource.ResourceException
Specified by:
update in interface SalesforceConnection
Throws:
javax.resource.ResourceException

getUpdated

public UpdatedResult getUpdated(java.lang.String objectType,
                                javax.xml.datatype.XMLGregorianCalendar startDate,
                                javax.xml.datatype.XMLGregorianCalendar endDate)
                         throws javax.resource.ResourceException
Specified by:
getUpdated in interface SalesforceConnection
Throws:
javax.resource.ResourceException

getDeleted

public DeletedResult getDeleted(java.lang.String objectName,
                                javax.xml.datatype.XMLGregorianCalendar startCalendar,
                                javax.xml.datatype.XMLGregorianCalendar endCalendar)
                         throws javax.resource.ResourceException
Specified by:
getDeleted in interface SalesforceConnection
Throws:
javax.resource.ResourceException

retrieve

public QueryResult retrieve(java.lang.String fieldList,
                            java.lang.String sObjectType,
                            java.util.List<java.lang.String> ids)
                     throws javax.resource.ResourceException
Specified by:
retrieve in interface SalesforceConnection
Throws:
javax.resource.ResourceException

getObjects

public DescribeGlobalResult getObjects()
                                throws javax.resource.ResourceException
Specified by:
getObjects in interface SalesforceConnection
Throws:
javax.resource.ResourceException

getObjectMetaData

public DescribeSObjectResult getObjectMetaData(java.lang.String objectName)
                                        throws javax.resource.ResourceException
Specified by:
getObjectMetaData in interface SalesforceConnection
Throws:
javax.resource.ResourceException

close

public void close()
           throws javax.resource.ResourceException
Specified by:
close in interface javax.resource.cci.Connection
Throws:
javax.resource.ResourceException


Copyright © 2010. All Rights Reserved.