-
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

Salesforce Product : Commerce Cloud
Salesforce Product : Commerce Cloud Commerce Cloud is one of the product among other products of Salesforce also plays a key role for making Salesforce…

Want to Hire the Best Salesforce Consultants? Here’s Everything You Should Know!
There’s hardly anyone in the business industry who is unaware of Salesforce. We all know Salesforce to be the no. 1 CRM in the world…

What Salesforce Einstein Chatbots Can Do? Use Cases Overview for Every Industry
You may have encountered AI chatbots in your lifetime, for leisure or business. Chatbots are not a new concept. Their current surge in popularity reflects…
Popular Salesforce Videos
Marketing Automation with Salesforce Journey Builder
Marketing Automation which is future of marketing can be simply understood as automating your marketing communication programs. we are going to talk about Salesforce Journey…
Apex Classes and Apex Triggers in Salesforce
In this video, Salesforce developer Artem will demonstrate real-world applications of both Apex classes and triggers with practical business scenarios. Apex classes and Apex triggers…
Tips on Lightning Combo Box, Events in Lightning App Builder, and More
Watch this video by Salesforce Developers to get the tips on Lightning Combo Box, Events in Lightning App Builder, and more. Watch and learn, do…
Popular Salesforce Infographics

How to Create Campaign in Salesforce for Sales Departments: 5 Best Practices
Salesforce Sales Cloud is a powerful platform with several facilities for maintaining and improving the sales function. One of the dominant features offered by Salesforce…

Einstein in Action – Unleash the Power of AI in Salesforce
Drowning in data but thirsty for insights? Salesforce Einstein can be your life raft. This infographic dives into the world of AI for CRM, exploring…

Know 5 Reasons to Use Salesforce for Your Business
Salesforce is a customer relationship management (CRM) platform that can be used by businesses of all sizes to manage and analyze customer interactions and data.…