-
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
Sinergify: Tailor Your Unique Business Needs into Salesforce and Jira Integration
Most businesses will agree that it is imperative to go the extra mile to deliver a personalized experience to their customers. But why is personalization…
TriggerFactory in Salesforce Apex | The Developer Guide
Trigger structures in Apex are something clever. We as a whole realize we need them, we as a whole realize that it is best practice…
Salesforce Lightning Experience Vs. The Classic UI
With the better versions coming every quarter in Salesforce, we all are aware of the debate about the Salesforce Lightning experience versus the Salesforce Classic…
Popular Salesforce Videos
Salesforce Heroku Integration | Heroku Connect
Heroku is a cloud platform that lets deploy, run and manage applications and websites. It is part of Salesforce Platform. This video will explain about…
Salesforce Spring ’20 Release - Our Top 10 Features
The Salesforce Spring ’20 release is just around the corner - so it’s time to get ready for some great new features. Here's our top…
Salesforce Tutorial Video | Salesforce Walkthroughs
Salesforce Walkthroughs is a new feature for Summer '20 which allows myTrailhead customers to create a series of up to 10 connected prompts to direct…
Popular Salesforce Infographics
Salesforce and QuickBooks Integration - Transform your Business
Do you know that you can convert 30% of your opportunities into leads when you integrate Salesforce and QuickBooks together? Sounds Interesting right? Our connector eShopSync…
Introduction to The Salesforce Architecture
Have you ever wondered what is so special about Salesforce? How does it manage to accomplish so much in such less time? Well, the secret…
Salesforce Marketing Automation: Sales or Marketing Tool? [infographic]
Marketing automation has a hidden talent. Despite being marketed for years as a tool for, well, marketers, automation is changing the shape of the modern…