Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Salesforce Lightning Platform Enterprise Architecture

You're reading from   Salesforce Lightning Platform Enterprise Architecture Architect and deliver packaged applications that cater to enterprise business needs

Arrow left icon
Product type Paperback
Published in Nov 2019
Publisher Packt
ISBN-13 9781789956719
Length 646 pages
Edition 3rd Edition
Languages
Concepts
Arrow right icon
Author (1):
Arrow left icon
Andrew Fawcett Andrew Fawcett
Author Profile Icon Andrew Fawcett
Andrew Fawcett
Arrow right icon
View More author details
Toc

Table of Contents (17) Chapters Close

Preface 1. Building and Publishing Your Application FREE CHAPTER 2. Leveraging Platform Features 3. Application Storage 4. Apex Execution and Separation of Concerns 5. Application Service Layer 6. Application Domain Layer 7. Application Selector Layer 8. Building User Interfaces 9. User Interfaces with Lightning Framework 10. Providing Integration and Extensibility 11. Asynchronous Processing and Big Data Volumes 12. Unit Testing 13. Source Control and Continuous Integration 14. Integrating with External Services 15. Adding AI with Einstein 16. Other Books You May Enjoy

Implementing the custom query logic

Take a look at the implementation of the selectSObjectById base class method we have been using so far in this chapter. The following buildQuerySObjectById method code gives us an indication of how we implement custom Selector methods; it also highlights the newQueryFactory base class method usage:

public List<SObject> selectSObjectsById(Set<Id>idSet) { 
  return Database.query(buildQuerySObjectById()); 
} 
private String buildQuerySObjectById() { 
  return newQueryFactory(). 
           setCondition('id in :idSet'). 
           toSOQL(); 
} 

The newQueryFactory method exposes an alternative object-orientated way to express a SOQL query. It follows the fluent design model with its methods, making code less verbose. For more information on this approach, see https://en.wikipedia.org/wiki/Fluent_interface.

The instance...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image