-
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
Introducing Junction Objects in Salesforce
A Junction is an object which is utilized to combine two master-detail relationships. In a layman’s dialect, when two relationships come together, they shape one…
Getting Started With Salesforce Einstein Discovery
What Is Einstein Discovery? Einstein Discovery expands your information examination with the force of AI, man-made brainpower (AI), and factual investigation. Einstein Discovery rapidly dissects…
Must-Have Tools For Start-ups | Salesforce Guide
Starting your own startup business can be a daunting experience, especially if you’re still at a delicate stage. Everything needs to be error-free, as a…
Popular Salesforce Videos
Salesforce Professional Services Helps Customers Get Value From Salesforce, Faster
Our experts have helped thousands of customers transform their businesses, operating models, and cultures, all backed by the full power of Salesforce. Watch this video…
Top 5 FAQs' of Salesforce Commerce Cloud
Salesforce Commerce Cloud, formerly known as Demandware, is a user-friendly and streamlined e-Commerce platform designed with a simple goal to help a company expand its…
Why Salesforce India is Primed for Growth
Amarendra Kumar, RVP of Alliances and Channels for India at Salesforce, says the region is poised for tremendous growth and opportunity over the next few…
Popular Salesforce Infographics
What is the Significance of Salesforce Implementation in Business Growth?
Salesforce is the CRM or Customer Relationship Management software that is used to manage several business operations. Companies use Salesforce to manage and improve their…
How Salesforce Improves User Experience Through Hyper-Personalization?
Personalized service has become an imperative part for any business to succeed in the cut-throat competitive market. 66% of people want companies to understand their…
Growth of Salesforce (Data and figures)
Salesforce.com is the #1 Customer Relationship Management (CRM) company in the world with regard to the market share. It provides numerous CRM software that helps…