public class SalesforceConnection extends Object
| Constructor and Description |
|---|
SalesforceConnection(org.pentaho.di.core.logging.LogChannelInterface logInterface,
String url,
String username,
String password)
Construct a new Salesforce Connection
|
| Modifier and Type | Method and Description |
|---|---|
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(com.sforce.soap.partner.Field[] fields)
Method returns names of the fields specified.
|
String[] |
getFields(String objectName)
Method returns specified object's fields' names, use #getObjectFields to get fields itself
|
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,
String fieldname) |
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) |
public SalesforceConnection(org.pentaho.di.core.logging.LogChannelInterface logInterface,
String url,
String username,
String password)
throws org.pentaho.di.core.exception.KettleException
org.pentaho.di.core.exception.KettleExceptionpublic boolean isRollbackAllChangesOnError()
public void rollbackAllChangesOnError(boolean value)
public boolean isQueryAll()
public void queryAll(boolean value)
public void setCalendar(int recordsFilter,
GregorianCalendar startDate,
GregorianCalendar endDate)
throws org.pentaho.di.core.exception.KettleException
org.pentaho.di.core.exception.KettleExceptionpublic void setCondition(String condition)
public String getCondition()
public void setSQL(String sql)
public void setFieldsList(String fieldsList)
public void setModule(String module)
public String getURL()
public String getSQL()
public Date getServerTimestamp()
public String getModule()
public com.sforce.soap.partner.QueryResult getQueryResult()
public com.sforce.soap.partner.SoapBindingStub getBinding()
public void setTimeOut(int timeout)
public int getTimeOut()
public boolean isUsingCompression()
public void setUsingCompression(boolean useCompression)
public String getUsername()
public void setUsername(String value)
public String getPassword()
public void setPassword(String value)
public void connect()
throws org.pentaho.di.core.exception.KettleException
org.pentaho.di.core.exception.KettleExceptionpublic void query(boolean specifyQuery)
throws org.pentaho.di.core.exception.KettleException
org.pentaho.di.core.exception.KettleExceptionpublic void close()
throws org.pentaho.di.core.exception.KettleException
org.pentaho.di.core.exception.KettleExceptionpublic int getQueryResultSize()
public int getRecordsCount()
public SalesforceRecordValue getRecord(int recordIndex)
public String getRecordValue(com.sforce.soap.partner.sobject.SObject con, String fieldname) throws org.pentaho.di.core.exception.KettleException
org.pentaho.di.core.exception.KettleExceptionpublic org.apache.axis.message.MessageElement[] getElements()
throws Exception
Exceptionpublic boolean queryMore()
throws org.pentaho.di.core.exception.KettleException
org.pentaho.di.core.exception.KettleExceptionpublic String[] getAllAvailableObjects(boolean OnlyQueryableObjects) throws org.pentaho.di.core.exception.KettleException
org.pentaho.di.core.exception.KettleExceptionpublic com.sforce.soap.partner.Field[] getObjectFields(String objectName) throws org.pentaho.di.core.exception.KettleException
org.pentaho.di.core.exception.KettleExceptionpublic String[] getFields(String objectName) throws org.pentaho.di.core.exception.KettleException
objectName - object nameorg.pentaho.di.core.exception.KettleException - in case of errorgetObjectFields(String)public String[] getFields(com.sforce.soap.partner.Field[] fields) throws org.pentaho.di.core.exception.KettleException
fields - fieldsorg.pentaho.di.core.exception.KettleException - in case of errorgetObjectFields(String)public com.sforce.soap.partner.UpsertResult[] upsert(String upsertField, com.sforce.soap.partner.sobject.SObject[] sfBuffer) throws org.pentaho.di.core.exception.KettleException
org.pentaho.di.core.exception.KettleExceptionpublic com.sforce.soap.partner.SaveResult[] insert(com.sforce.soap.partner.sobject.SObject[] sfBuffer)
throws org.pentaho.di.core.exception.KettleException
org.pentaho.di.core.exception.KettleExceptionpublic com.sforce.soap.partner.SaveResult[] update(com.sforce.soap.partner.sobject.SObject[] sfBuffer)
throws org.pentaho.di.core.exception.KettleException
org.pentaho.di.core.exception.KettleExceptionpublic com.sforce.soap.partner.DeleteResult[] delete(String[] id) throws org.pentaho.di.core.exception.KettleException
org.pentaho.di.core.exception.KettleExceptionpublic static org.apache.axis.message.MessageElement createMessageElement(String name, Object value, boolean useExternalKey) throws Exception
Exceptionpublic static org.apache.axis.message.MessageElement fromTemplateElement(String name, Object value, boolean setValue) throws SOAPException
SOAPException