Qore SalesforceRestDataProvider Module Reference 1.0.1
Loading...
Searching...
No Matches
SalesforceRestDataProvider::SalesforceRestObjectDataProvider Class Reference

The SalesforceRestObjectDataProvider data provider class. More...

#include <SalesforceRestObjectDataProvider.qc.dox.h>

Inheritance diagram for SalesforceRestDataProvider::SalesforceRestObjectDataProvider:
[legend]

Public Member Methods

 constructor (SalesforceRestClient rest, string name, hash< auto > sobject)
 Creates the object from the arguments.
 
*string getDesc ()
 Returns the data provider description.
 
string getName ()
 Returns the data provider name.
 
- Public Member Methods inherited from SalesforceRestDataProvider::SalesforceRestDataProviderBase
 constructor ()
 Creates the object.
 
 constructor (SalesforceRestClient::SalesforceRestClient rest)
 Creates the object.
 
 setLogger (*LoggerInterface logger)
 Accepts a LoggerInterface object for logging (or clears it)
 

Public Attributes

string name
 current object name
 
hash< auto > sobject
 sobject description
 

Private Member Methods

*hash< auto > createRecordImpl (hash< auto > rec, *hash< auto > create_options)
 Creates the given record to the data provider. More...
 
int deleteRecordsImpl (*hash< auto > where_cond, *hash< auto > search_options)
 Deletes zero or more records. More...
 
 deleteSingleRecord (string id)
 deletes a single record
 
*hash< auto > fixSalesforceRecord (*hash< auto > rec)
 Fix salesforce records for serialization. More...
 
 getRecordInfoIntern ()
 Retrieves the record type.
 
hash< DataProviderInfo > getStaticInfoImpl ()
 Returns data provider static info.
 
hash< SalesforceRestRecordInforecord_info ()
 Record info for this object.
 
AbstractDataProviderRecordIterator searchRecordsImpl (*hash< auto > where_cond, *hash< auto > search_options)
 Returns an iterator for zero or more records matching the search options. More...
 
int updateRecordsImpl (hash< auto > set, hash< auto > where_cond, *hash< auto > search_options)
 Updates zero or more records matching the search options. More...
 
 updateSingleRecord (string id, hash< auto > set)
 updates a single record
 
string upsertRecordImpl (hash< auto > rec, *hash< auto > upsert_options)
 Upserts the given record to the data provider. More...
 

Private Attributes

hash< auto > desc
 The description of this object type.
 
- Private Attributes inherited from SalesforceRestDataProvider::SalesforceRestDataProviderBase
SalesforceRestClient rest
 The REST client object for API calls.
 

Detailed Description

The SalesforceRestObjectDataProvider data provider class.

Member Function Documentation

◆ createRecordImpl()

*hash< auto > SalesforceRestDataProvider::SalesforceRestObjectDataProvider::createRecordImpl ( hash< auto >  rec,
*hash< auto >  create_options 
)
private

Creates the given record to the data provider.

Parameters
reca hash representing a single input record
create_optionsthe create options after processing by validateCreateOptions()
Returns
the data written to the data provider with the "id" field of the new record
Exceptions
DUPLICATE-RECORDthis exception should be thrown if the provider fails due to an attempt to create a duplicate record

◆ deleteRecordsImpl()

int SalesforceRestDataProvider::SalesforceRestObjectDataProvider::deleteRecordsImpl ( *hash< auto >  where_cond,
*hash< auto >  search_options 
)
private

Deletes zero or more records.

Parameters
where_conda hash for identifying the record(s) to be deleted
search_optionsthe delete options after processing by validateSearchOptions()
Returns
the number of records deleted

◆ fixSalesforceRecord()

*hash< auto > SalesforceRestDataProvider::SalesforceRestObjectDataProvider::fixSalesforceRecord ( *hash< auto >  rec)
private

Fix salesforce records for serialization.

Ensure that:

  • DATE fields are serialized as YYYY-MM-DD strings
  • TIME fields are serialized as HH:mm:SS.xx strings

◆ searchRecordsImpl()

AbstractDataProviderRecordIterator SalesforceRestDataProvider::SalesforceRestObjectDataProvider::searchRecordsImpl ( *hash< auto >  where_cond,
*hash< auto >  search_options 
)
private

Returns an iterator for zero or more records matching the search options.

Parameters
where_condthe search criteria
search_optionsthe search options after processing by validateSearchOptions()
See also
requestSearchRecordsImpl()

◆ updateRecordsImpl()

int SalesforceRestDataProvider::SalesforceRestObjectDataProvider::updateRecordsImpl ( hash< auto >  set,
hash< auto >  where_cond,
*hash< auto >  search_options 
)
private

Updates zero or more records matching the search options.

Parameters
setthe hash of field data to set
where_conda hash for identifying the record(s) to be updated
search_optionsthe update options after processing by validateSearchOptions()
Returns
the number of records updated

◆ upsertRecordImpl()

string SalesforceRestDataProvider::SalesforceRestObjectDataProvider::upsertRecordImpl ( hash< auto >  rec,
*hash< auto >  upsert_options 
)
private

Upserts the given record to the data provider.

Parameters
reca hash representing a single input record
upsert_optionsthe create options after processing by validateUpsertOptions()
Returns
see DB Provider Upsert Result Codes for possible values