org.controlhaus.sforce
Interface sforce3_0Enterprise


public interface sforce3_0Enterprise


Method Summary
 com.sforce.soap.enterprise.SaveResult[] create(com.sforce.soap.enterprise.sobject.SObject[] sObjects)
          Create one or more sforce objects See the Online API reference for usage
 com.sforce.soap.enterprise.CreateResponseDocument createDoc(com.sforce.soap.enterprise.CreateDocument requestDoc)
          A variant of the create method that uses document-type XMLBean objects for the input and return.
 com.sforce.soap.enterprise.SaveResult createOne(com.sforce.soap.enterprise.sobject.SObject sObject)
          A simplified variant of the create method for a single object instead of an array of objects.
 com.sforce.soap.enterprise.DeleteResult[] delete(java.lang.String[] ids)
          Deletes one or more sforce objects See the Online API reference for usage
 com.sforce.soap.enterprise.DeleteResponseDocument deleteDoc(com.sforce.soap.enterprise.DeleteDocument requestDoc)
          A variant of the delete method that uses document-type XMLBean objects for the input and return.
 com.sforce.soap.enterprise.DeleteResult deleteOne(java.lang.String id)
          A simplified variant of the delete method for a single object instead of an array of objects.
 com.sforce.soap.enterprise.DescribeGlobalResult describeGlobal()
          Use describeGlobal to obtain the list of available objects for your organization.
 com.sforce.soap.enterprise.DescribeSObjectResult describeSObject(java.lang.String sObjectType)
          Describes metadata (field list and object properties) for the specified object.
 com.sforce.soap.enterprise.GetDeletedResult getDeleted(java.lang.String sObjectType, java.util.Calendar startDate, java.util.Calendar endDate)
          Retrieves the list of individual objects that have been deleted within the given timespan for the specified object
 java.util.Calendar getServerTimestamp()
          Retrieves the current system timestamp (GMT) from the sforce Web service.
 com.sforce.soap.enterprise.GetUpdatedResult getUpdated(java.lang.String sObjectType, java.util.Calendar startDate, java.util.Calendar endDate)
          Retrieves the list of individual objects that have been updated within the given timespan for the specified object
 com.sforce.soap.enterprise.GetUserInfoResult getUserInfo()
          Retrieves personal information for the user associated with the current session.
 com.sforce.soap.enterprise.LoginResult login(java.lang.String username, java.lang.String password)
          Start a session with the sforce web service.
 com.sforce.soap.enterprise.QueryResult query(java.lang.String queryString)
          Query for sforce objects based on a query string similar to a SQL SELECT statement.
 com.sforce.soap.enterprise.QueryResult queryMore(java.lang.String queryLocator)
          Query for more results based on a previous call to query() that returned more than the current batch size (default 2000).
 java.lang.String resetPassword(java.lang.String userId)
          Use resetPassword to request that the sforce Web service change a user's password and return the server-generated password string.
 void resetQueryOptionsToDefault()
          Resets query options to the @jc:sforce-properties query-batch-size value, if one is specified, or reset to the system default (2000) if the query-batch-size is not specified.
 void resetSaveOptionsToDefault()
          Resets save options to the @jc:sforce-properties save-auto-assign and save-assign-rule-id values if specified, or reset to the system defaults if values are not specified on the control.
 com.sforce.soap.enterprise.sobject.SObject retrieve(java.lang.String fieldList, java.lang.String sObjectType, java.lang.String id)
          Use the retrieve call to retrieve individual sforce objects when you knowo their ID.
 com.sforce.soap.enterprise.RetrieveResponseDocument retrieveDoc(com.sforce.soap.enterprise.RetrieveDocument requestDoc)
          A variant of the retrieve method that uses document-type XMLBean objects for the input and return.
 com.sforce.soap.enterprise.SearchResult search(java.lang.String searchString)
          Search among sforce objects based on a search string, similar to internet search syntax.
 com.sforce.soap.enterprise.SetPasswordResult setPassword(java.lang.String userId, java.lang.String password)
          Use setPassword to change a user's password to a value that you specify.
 void setQueryOptions(int batchSize)
          Set the query-batch-size value programmatically, overriding the value of the corresponding @jc:sforce-properties (if any) or the system defaults.
 void setSaveOptions(java.lang.String assignmentRuleId, boolean autoAssign)
          Set the save options programatically, overriding the value of the corresponding @jc:sforce-properties (if any) or the system defaults.
 com.sforce.soap.enterprise.SaveResult[] update(com.sforce.soap.enterprise.sobject.SObject[] sObjects)
          Update one or more sforce objects See the Online API reference for usage
 com.sforce.soap.enterprise.UpdateResponseDocument updateDoc(com.sforce.soap.enterprise.UpdateDocument requestDoc)
          A variant of the update method that takes a document-type object, used in Java Process Flows
 com.sforce.soap.enterprise.SaveResult updateOne(com.sforce.soap.enterprise.sobject.SObject sObject)
          A simplified variant of the update method for a single object instead of an array of objects.
 

Method Detail

login

public com.sforce.soap.enterprise.LoginResult login(java.lang.String username,
                                                    java.lang.String password)
Start a session with the sforce web service. See the Online API reference for usage

Parameters:
username - An sforce user name (email format)
password - The corresponding sforce password
Returns:
LoginResult Contains the session key and a new endpoint URL to use for subsequent calls

query

public com.sforce.soap.enterprise.QueryResult query(java.lang.String queryString)
Query for sforce objects based on a query string similar to a SQL SELECT statement. See the Online API reference for usage

Parameters:
queryString - A string specifying SELECT FROM WHERE
Returns:
QueryResult The objects that match the criteria specified by the query

queryMore

public com.sforce.soap.enterprise.QueryResult queryMore(java.lang.String queryLocator)
Query for more results based on a previous call to query() that returned more than the current batch size (default 2000).

Parameters:
queryLocator - The identifier returned by the query() method if number of objects that qualify exceeds the batch size
Returns:
QueryResult The objects that match the criteria specified by the query

search

public com.sforce.soap.enterprise.SearchResult search(java.lang.String searchString)
Search among sforce objects based on a search string, similar to internet search syntax. See the Online API reference for usage

Parameters:
searchString -
Returns:
SearchResult The result of the search

retrieve

public com.sforce.soap.enterprise.sobject.SObject retrieve(java.lang.String fieldList,
                                                           java.lang.String sObjectType,
                                                           java.lang.String id)
Use the retrieve call to retrieve individual sforce objects when you knowo their ID. object. User passes the fields to retrieve, the object, and the ID to retrieve. See the Online API reference for usage

Parameters:
fieldList - Field to retrieve
sObjectType - The sforce object
id - The ID to retireve
Returns:
SObject A standard base sforce object

retrieveDoc

public com.sforce.soap.enterprise.RetrieveResponseDocument retrieveDoc(com.sforce.soap.enterprise.RetrieveDocument requestDoc)
A variant of the retrieve method that uses document-type XMLBean objects for the input and return. For use in Java Process Flows.

Parameters:
requestDoc - A document-type XMLBean containing the parameters to the retrieve method.
Returns:
CreateResponseDocument The returned document-type XMLBean that contains the retrieved sObject.

create

public com.sforce.soap.enterprise.SaveResult[] create(com.sforce.soap.enterprise.sobject.SObject[] sObjects)
Create one or more sforce objects See the Online API reference for usage

Parameters:
sObjects - An array of any type of sforce objects (objects in package com.sforce.soap.sobject)
Returns:
SaveResult[] Result array of the save operation

createDoc

public com.sforce.soap.enterprise.CreateResponseDocument createDoc(com.sforce.soap.enterprise.CreateDocument requestDoc)
A variant of the create method that uses document-type XMLBean objects for the input and return. For use in Java Process Flows.

Parameters:
requestDoc - A document-type XMLBean containing the array of sObjects to create.
Returns:
CreateResponseDocument The returned document-type XMLBean that contains the SaveResult array.

createOne

public com.sforce.soap.enterprise.SaveResult createOne(com.sforce.soap.enterprise.sobject.SObject sObject)
A simplified variant of the create method for a single object instead of an array of objects.

Parameters:
sObject - A single instance of an sforce object. Can be any subclass of sObject.
Returns:
SaveResult Result of the create operation

delete

public com.sforce.soap.enterprise.DeleteResult[] delete(java.lang.String[] ids)
Deletes one or more sforce objects See the Online API reference for usage

Returns:
DeleteResult[] Result array of the delete operation

deleteDoc

public com.sforce.soap.enterprise.DeleteResponseDocument deleteDoc(com.sforce.soap.enterprise.DeleteDocument requestDoc)
A variant of the delete method that uses document-type XMLBean objects for the input and return. For use in Java Process Flows.

Parameters:
requestDoc - A document-type XMLBean containing the array of sObjects to delete.
Returns:
DeleteResponseDocument The returned document-type XMLBean that contains the DeleteResult array.

deleteOne

public com.sforce.soap.enterprise.DeleteResult deleteOne(java.lang.String id)
A simplified variant of the delete method for a single object instead of an array of objects.

Returns:
DeleteResult Result of the delete operation

getDeleted

public com.sforce.soap.enterprise.GetDeletedResult getDeleted(java.lang.String sObjectType,
                                                              java.util.Calendar startDate,
                                                              java.util.Calendar endDate)
Retrieves the list of individual objects that have been deleted within the given timespan for the specified object

Parameters:
sObjectType - sforce object type
startDate - Date where to start
endDate - Date where to end
Returns:
GetDeletedResult The result in SOAP object

update

public com.sforce.soap.enterprise.SaveResult[] update(com.sforce.soap.enterprise.sobject.SObject[] sObjects)
Update one or more sforce objects See the Online API reference for usage

Parameters:
sObjects - An array of any type of sforce objects (objects in package com.sforce.soap.sobject)
Returns:
SaveResult[] Result array of the save operation

updateDoc

public com.sforce.soap.enterprise.UpdateResponseDocument updateDoc(com.sforce.soap.enterprise.UpdateDocument requestDoc)
A variant of the update method that takes a document-type object, used in Java Process Flows

Parameters:
requestDoc - The document-type XMLBean containing the array of sObjects to update
Returns:
UpdateResponseDocument The retrieved document-type object containing the SaveResult array

updateOne

public com.sforce.soap.enterprise.SaveResult updateOne(com.sforce.soap.enterprise.sobject.SObject sObject)
A simplified variant of the update method for a single object instead of an array of objects.

Parameters:
sObject - A single instance of an sforce object. Can be any subclass of sObject.
Returns:
SaveResult Result of the update operation

getUpdated

public com.sforce.soap.enterprise.GetUpdatedResult getUpdated(java.lang.String sObjectType,
                                                              java.util.Calendar startDate,
                                                              java.util.Calendar endDate)
Retrieves the list of individual objects that have been updated within the given timespan for the specified object

Parameters:
sObjectType - sforce object type
startDate - Date where to start
endDate - Date where to end
Returns:
GetUpdatedResult The result in SOAP object

describeGlobal

public com.sforce.soap.enterprise.DescribeGlobalResult describeGlobal()
Use describeGlobal to obtain the list of available objects for your organization. See the Online API reference for usage

Returns:
DescribeGlobalResult use this object to navigate through.

describeSObject

public com.sforce.soap.enterprise.DescribeSObjectResult describeSObject(java.lang.String sObjectType)
Describes metadata (field list and object properties) for the specified object. See the Online API reference for usage

Parameters:
sObjectType - Typwe of the sforce object
Returns:
DescribeSObjectResult The described object properties

getServerTimestamp

public java.util.Calendar getServerTimestamp()
Retrieves the current system timestamp (GMT) from the sforce Web service.

Returns:
Calendar The server timestamp

getUserInfo

public com.sforce.soap.enterprise.GetUserInfoResult getUserInfo()
Retrieves personal information for the user associated with the current session.

Returns:
GetUserInfoResult The returned user information.

resetPassword

public java.lang.String resetPassword(java.lang.String userId)
Use resetPassword to request that the sforce Web service change a user's password and return the server-generated password string. Use setPassword instead if you want to set the password to a specific value.

Parameters:
userId - the id of the logged user
Returns:
String The password

setPassword

public com.sforce.soap.enterprise.SetPasswordResult setPassword(java.lang.String userId,
                                                                java.lang.String password)
Use setPassword to change a user's password to a value that you specify. For example, a client application might prompt a user to specify a different password, and then invoke setPassword to change the user's login password. Use resetPassword instead if you want to reset the password with an sforce Web service-generated value. Your must be logged in with sufficient access rights to change the password for the specified user

Parameters:
userId - the id of the user
Returns:
String The password

setQueryOptions

public void setQueryOptions(int batchSize)
Set the query-batch-size value programmatically, overriding the value of the corresponding @jc:sforce-properties (if any) or the system defaults. The new options stay in effect until another call to setQueryOptions or a call to resetQueryOptionsToDefault.

Parameters:
batchSize - The new batch size value, setting the maximum number of objects to return in one call to query() or queryMore()

setSaveOptions

public void setSaveOptions(java.lang.String assignmentRuleId,
                           boolean autoAssign)
Set the save options programatically, overriding the value of the corresponding @jc:sforce-properties (if any) or the system defaults. The new options stay in effect until another call to setSaveOptions or a call to resetSaveOptionsToDefault.

Parameters:
assignmentRuleId - The new assignment rule Id
autoAssign - The new autoAssign parameter. By default is true

resetQueryOptionsToDefault

public void resetQueryOptionsToDefault()
Resets query options to the @jc:sforce-properties query-batch-size value, if one is specified, or reset to the system default (2000) if the query-batch-size is not specified.


resetSaveOptionsToDefault

public void resetSaveOptionsToDefault()
Resets save options to the @jc:sforce-properties save-auto-assign and save-assign-rule-id values if specified, or reset to the system defaults if values are not specified on the control.