-
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
![Howsalesforceistransofrmingengagement-ezgif.com-webp-to-png-converter](https://images.forcetalks.com/wp-content/uploads/2024/06/10074014/Howsalesforceistransofrmingengagement-ezgif.com-webp-to-png-converter.png)
How Salesforce is Transforming Customer Engagement with AI?
Table of Contents Introduction Salesforce Einstein: Customer Engagement with AI Key Features of Salesforce Einstein Einstein GPT: Bringing Generative AI into the Mix Key Capabilities…
![](https://images.forcetalks.com/wp-content/uploads/2017/09/25084103/sa_1505455828HEROKU.png)
A Complete Introduction to Heroku
There are still minutes when I specify Heroku just to be met with a blank gaze. Which is really awful on the grounds that Heroku…
![Salesforce CPQ Implementation](https://images.forcetalks.com/wp-content/uploads/2022/09/19154314/Salesforce-CPQ-Implementation.jpg)
Best Salesforce CPQ Implementation Practices to Follow
Understanding what the customer needs, keeping an account of all their custom preferences, and pricing is a huge task in itself. Sales teams begin with…
Popular Salesforce Videos
What is the Growth and Future of Salesforce Administrators In India
What is the Growth and Future of Salesforce Administrators In India? Listen to #shreysharma guiding and answering all of your queries.
Case Management App on Salesforce AppExchange
Is your customer support struggling with customer satisfaction for high service cost? Don't know how to work on right priority cases? Don't worry Algoworks presents…
Connect ZOOM with Salesforce | Zapier | Salesforce Tutorials
In this video, you will learn to connect the most usable business video-conferencing application the ZOOM app with Salesforce Org using ZAPIER. I will create…
Popular Salesforce Infographics
![salesforce engage](https://images.forcetalks.com/wp-content/uploads/2018/01/20144128/salesforce-engage.png)
Salesforce Engage : Best Practices Guide for Sales Users
Salesforce Engage is a new solution from Salesforce Pardot that unites Sales and Marketing teams to sell more effectively than ever before. With Salesforce Engage,…
![](https://images.forcetalks.com/wp-content/uploads/2018/12/20070547/7-new-app-.jpg)
7 Must Know Features on the New Salesforce AppExchange
The AppExchange is an online marketplace for Salesforce apps, components, and consulting services. If you're a Lightning Platform developer or consultant, the AppExchange is the…
![](https://images.forcetalks.com/wp-content/uploads/2021/04/05110843/sa_1617620872C1WhatisCPQ.png)
Why You Should Know About Order to Cash Process - Step by Step | Salesforce Guide
The order-to-cash (O2C) process is a defining part of a company’s success, and it also plays a big role in driving an organization’s relationship with…