org.pentaho.di.trans.steps.salesforceinput
Class SalesforceConnection

java.lang.Object
  extended by org.pentaho.di.trans.steps.salesforceinput.SalesforceConnection

public class SalesforceConnection
extends Object


Constructor Summary
SalesforceConnection(LogChannelInterface logInterface, String url, String username, String password)
          Construct a new Salesforce Connection
 
Method Summary
 void close()
           
 void connect()
           
static org.apache.axis.message.MessageElement createMessageElement(String name, Object value, boolean useExternalKey)
           
 com.sforce.soap.partner.DeleteResult[] delete(String[] id)
           
static org.apache.axis.message.MessageElement fromTemplateElement(String name, Object value, boolean setValue)
           
 String[] getAllAvailableObjects(boolean OnlyQueryableObjects)
           
 com.sforce.soap.partner.SoapBindingStub getBinding()
           
 String getCondition()
           
 org.apache.axis.message.MessageElement[] getElements()
           
 String[] getFields(String objectName)
           
 String getModule()
           
 com.sforce.soap.partner.Field[] getObjectFields(String objectName)
           
 String getPassword()
           
 com.sforce.soap.partner.QueryResult getQueryResult()
           
 int getQueryResultSize()
           
 SalesforceRecordValue getRecord(int recordIndex)
           
 int getRecordsCount()
           
 String getRecordValue(com.sforce.soap.partner.sobject.SObject con, int valueIndex)
           
 Date getServerTimestamp()
           
 String getSQL()
           
 int getTimeOut()
           
 String getURL()
           
 String getUsername()
           
 com.sforce.soap.partner.SaveResult[] insert(com.sforce.soap.partner.sobject.SObject[] sfBuffer)
           
 boolean isQueryAll()
           
 boolean isRollbackAllChangesOnError()
           
 boolean isUsingCompression()
           
 void query(boolean specifyQuery)
           
 void queryAll(boolean value)
           
 boolean queryMore()
           
 void rollbackAllChangesOnError(boolean value)
           
 void setCalendar(int recordsFilter, GregorianCalendar startDate, GregorianCalendar endDate)
           
 void setCondition(String condition)
           
 void setFieldsList(String fieldsList)
           
 void setModule(String module)
           
 void setPassword(String value)
           
 void setSQL(String sql)
           
 void setTimeOut(int timeout)
           
 void setUsername(String value)
           
 void setUsingCompression(boolean useCompression)
           
 com.sforce.soap.partner.SaveResult[] update(com.sforce.soap.partner.sobject.SObject[] sfBuffer)
           
 com.sforce.soap.partner.UpsertResult[] upsert(String upsertField, com.sforce.soap.partner.sobject.SObject[] sfBuffer)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SalesforceConnection

public SalesforceConnection(LogChannelInterface logInterface,
                            String url,
                            String username,
                            String password)
                     throws KettleException
Construct a new Salesforce Connection

Throws:
KettleException
Method Detail

isRollbackAllChangesOnError

public boolean isRollbackAllChangesOnError()

rollbackAllChangesOnError

public void rollbackAllChangesOnError(boolean value)

isQueryAll

public boolean isQueryAll()

queryAll

public void queryAll(boolean value)

setCalendar

public void setCalendar(int recordsFilter,
                        GregorianCalendar startDate,
                        GregorianCalendar endDate)
                 throws KettleException
Throws:
KettleException

setCondition

public void setCondition(String condition)

getCondition

public String getCondition()

setSQL

public void setSQL(String sql)

setFieldsList

public void setFieldsList(String fieldsList)

setModule

public void setModule(String module)

getURL

public String getURL()

getSQL

public String getSQL()

getServerTimestamp

public Date getServerTimestamp()

getModule

public String getModule()

getQueryResult

public com.sforce.soap.partner.QueryResult getQueryResult()

getBinding

public com.sforce.soap.partner.SoapBindingStub getBinding()

setTimeOut

public void setTimeOut(int timeout)

getTimeOut

public int getTimeOut()

isUsingCompression

public boolean isUsingCompression()

setUsingCompression

public void setUsingCompression(boolean useCompression)

getUsername

public String getUsername()

setUsername

public void setUsername(String value)

getPassword

public String getPassword()

setPassword

public void setPassword(String value)

connect

public void connect()
             throws KettleException
Throws:
KettleException

query

public void query(boolean specifyQuery)
           throws KettleException
Throws:
KettleException

close

public void close()
           throws KettleException
Throws:
KettleException

getQueryResultSize

public int getQueryResultSize()

getRecordsCount

public int getRecordsCount()

getRecord

public SalesforceRecordValue getRecord(int recordIndex)

getRecordValue

public String getRecordValue(com.sforce.soap.partner.sobject.SObject con,
                             int valueIndex)

getElements

public org.apache.axis.message.MessageElement[] getElements()
                                                     throws Exception
Throws:
Exception

queryMore

public boolean queryMore()
                  throws KettleException
Throws:
KettleException

getAllAvailableObjects

public String[] getAllAvailableObjects(boolean OnlyQueryableObjects)
                                throws KettleException
Throws:
KettleException

getObjectFields

public com.sforce.soap.partner.Field[] getObjectFields(String objectName)
                                                throws KettleException
Throws:
KettleException

getFields

public String[] getFields(String objectName)
                   throws KettleException
Throws:
KettleException

upsert

public com.sforce.soap.partner.UpsertResult[] upsert(String upsertField,
                                                     com.sforce.soap.partner.sobject.SObject[] sfBuffer)
                                              throws KettleException
Throws:
KettleException

insert

public com.sforce.soap.partner.SaveResult[] insert(com.sforce.soap.partner.sobject.SObject[] sfBuffer)
                                            throws KettleException
Throws:
KettleException

update

public com.sforce.soap.partner.SaveResult[] update(com.sforce.soap.partner.sobject.SObject[] sfBuffer)
                                            throws KettleException
Throws:
KettleException

delete

public com.sforce.soap.partner.DeleteResult[] delete(String[] id)
                                              throws KettleException
Throws:
KettleException

createMessageElement

public static org.apache.axis.message.MessageElement createMessageElement(String name,
                                                                          Object value,
                                                                          boolean useExternalKey)
                                                                   throws Exception
Throws:
Exception

fromTemplateElement

public static org.apache.axis.message.MessageElement fromTemplateElement(String name,
                                                                         Object value,
                                                                         boolean setValue)
                                                                  throws javax.xml.soap.SOAPException
Throws:
javax.xml.soap.SOAPException