-
Cannot understand meaning of integer ebayBatchesInProgress.get(0).get('batchesInQueue') in Salesforce?
I am trying to understand a class but cant understand meaning of (Integer)ebayBatchesInProgress.get(0).get('batchesInQueue') in the following program:
public static void ecommerceSyncMethod(){ // Below executing a logic to judge the pre-queued batches : //For Ebay Integer numberOfBatchesNotProcessedEbay = 0; list<AggregateResult> ebayBatchesInProgress = [Select Count(id) batchesInQueue from AsyncApexJob where (ApexClass.Name = 'BatchToAddEcommerceItemEbay' OR ApexClass.Name = 'BatchToDelistEcommerceItem' OR ApexClass.Name = 'BatchToUpdateEcommerceItem') AND Status IN ('Holding','Holding1','Queued', 'Preparing', 'Processing') ]; if(null != ebayBatchesInProgress && !ebayBatchesInProgress.isEmpty()){ numberOfBatchesNotProcessedEbay = (Integer)ebayBatchesInProgress.get(0).get('batchesInQueue'); } //For Amazon Integer numberOfBatchesNotProcessedAmazon = 0; list<AggregateResult> amazonBatchesInProgress = [Select Count(id) batchesInQueue from AsyncApexJob where ApexClass.Name = 'BatchForEcommerceItemsAmazon' AND Status IN ('Holding','Holding1','Queued', 'Preparing', 'Processing') ]; if(null != amazonBatchesInProgress && !amazonBatchesInProgress.isEmpty()){ numberOfBatchesNotProcessedAmazon = (Integer)amazonBatchesInProgress.get(0).get('batchesInQueue'); } //For Watch Facts Integer numberOfBatchesNotProcessedWatchFacts = 0; list<AggregateResult> watchFactsBatchesInProgress = [Select Count(id) batchesInQueue from AsyncApexJob where (ApexClass.Name = 'BatchForEcommerceItemsWatchFacts' OR ApexClass.Name = 'BatchToDeleteEcommerceItemWatchFacts') AND Status IN ('Holding','Queued', 'Preparing', 'Processing') ]; if(null != watchFactsBatchesInProgress && !watchFactsBatchesInProgress.isEmpty()){ numberOfBatchesNotProcessedWatchFacts = (Integer)watchFactsBatchesInProgress.get(0).get('batchesInQueue'); } //For CrownAndCaliber Integer numberOfBatchesNotProcessedCrownAndCaliber = 0; list<AggregateResult> crownAndCaliberBatchesInProgress = [Select Count(id) batchesInQueue from AsyncApexJob where ApexClass.Name = 'BatchForEcommerceItemsCrownAndCaliber' AND Status IN ('Holding','Queued', 'Preparing', 'Processing') ]; if(null != crownAndCaliberBatchesInProgress && !crownAndCaliberBatchesInProgress.isEmpty()){ numberOfBatchesNotProcessedCrownAndCaliber = (Integer)crownAndCaliberBatchesInProgress.get(0).get('batchesInQueue'); } //For Shopify Integer numberOfBatchesNotProcessedShopify = 0; list<AggregateResult> shopifyBatchesInProgress = [Select Count(id) batchesInQueue from AsyncApexJob where ApexClass.Name = 'BatchForEcommerceItemsShopify' AND Status IN ('Holding','Queued', 'Preparing', 'Processing') ]; if(null != shopifyBatchesInProgress && !shopifyBatchesInProgress.isEmpty()){ numberOfBatchesNotProcessedShopify = (Integer)shopifyBatchesInProgress.get(0).get('batchesInQueue'); } //For Jomashop Integer numberOfBatchesNotProcessedJomashop = 0; list<AggregateResult> JomashopBatchesInProgress = [Select Count(id) batchesInQueue from AsyncApexJob where ApexClass.Name = 'BatchForEcommerceItemsJomashop' AND Status IN ('Holding','Queued', 'Preparing', 'Processing') ]; if(null != JomashopBatchesInProgress && !JomashopBatchesInProgress.isEmpty()){ numberOfBatchesNotProcessedJomashop = (Integer)JomashopBatchesInProgress.get(0).get('batchesInQueue'); } //Code to be executed when the schedule class wakes up map<id,list<Listing_Event__c>> mapOfProductAddVsListingEventEbay = new map<id,list<Listing_Event__c>>(); map<id,list<Listing_Event__c>> mapOfProductUpdateVsListingEventEbay = new map<id,list<Listing_Event__c>>(); map<id,list<Listing_Event__c>> mapOfProductRemoveVsListingEventEbay = new map<id,list<Listing_Event__c>>(); map<id,list<Listing_Event__c>> listingIdVsEventListMapForEitherAddUpdateRemoveOrGetResult = new map<id,list<Listing_Event__c>>(); map<id,list<Listing_Event__c>> listingIdVsEventListMapForAddUpdateRemoveOrGetResultWatchFacts = new map<id,list<Listing_Event__c>>(); map<id,list<Listing_Event__c>> listingIdVsEventListMapForAddUpdateOrRemoveCrownAndCaliber = new map<id,list<Listing_Event__c>>(); map<id,list<Listing_Event__c>> listingIdVsEventListMapForAddUpdateOrRemoveShopify = new map<id,list<Listing_Event__c>>(); map<id,list<Listing_Event__c>> listingIdVsEventListMapForAddUpdateOrRemoveJomashop = new map<id,list<Listing_Event__c>>();
Log In to reply.
Popular Salesforce Blogs
How to Communicate Between two Lightning Components using Events?
Event: An event can be something the browser does or something a user does. Lightning framework uses event-driven programming. Handlers are written for interface events…
What are External Objects in Salesforce? | The Ultimate Guide
Salesforce is a cloud-based customer relationship management (CRM) platform that allows businesses to manage their interactions with customers and prospects. Salesforce offers a variety of…
Popular Salesforce Videos
How to Find Job as a Fresher in Salesforce - Tips and Tricks
In this video Rohit Puri gives a detailed explanation of the questions that everyone has regarding Salesforce jobs, how to find jobs in Salesforce on…
How to Delete Preloaded Sample Data in New Salesforce Organizations
When Users begin a trial or subscription with Salesforce, their org comes with a set of sample data. This data includes Accounts, Contacts, and Opportunities.…
Integrate Salesforce with External System using REST API
In this video, Path to Code explains the following topics: - What is API? - Introduction to REST API - Using cURL to consume Rest…
Popular Salesforce Infographics
Salesforce Experience Cloud Benefits For Business Growth
Explore How Salesforce Experience Cloud Can Help Your Business? Get bespoke solutions including: Data integration, time & cost savings.
The Timeline: 20 Years of Salesforce
Salesforce completed 20 years recently. The celebrations were grand with thousands of employees and trailblazers and Ohana family joining in. The world’s no. 1 CRM…
6 Tips to Evaluate the Right Salesforce QA Vendor
Salesforce is the ultimate customer success platform, which makes it important to choose the right partner for your Salesforce project especially because it governs your…