Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Force.com Enterprise Architecture

You're reading from   Force.com Enterprise Architecture Blend industry best practices to architect and deliver packaged Force.com applications that cater to enterprise business needs

Arrow left icon
Product type Paperback
Published in Sep 2014
Publisher
ISBN-13 9781782172994
Length 402 pages
Edition 1st Edition
Languages
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 (13) Chapters Close

Preface 1. Building, Publishing, and Supporting 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. User Interface 9. Providing Integration and Extensibility 10. Asynchronous Processing and Big Data Volumes 11. Source Control and Continuous Integration Index

Implementing the standard query logic


The previous Selector usage example required a cast of the list returned to a list of Race__c objects, which is not ideal. To improve this, you can easily add a new method to the class to provide a more specific version of the base class method, as follows:

public List<Race__c> selectById(Set<Id> raceIds)
{
  return (List<Race__c>) selectSObjectsById(raceIds);
}

Thus, the usage code now looks like this:

List<Race__c> races = new RacesSelector().selectById(raceIds); 

Standard features of the selectSObjectsById method

In addition to forming the field list used in the SOQL query, the base class and the selectSObjectById method used also provide additional functionality that would normally have to be replicated each time this section outlines these features. Some of these are also available to custom Selector methods you write.

Tip

You can, of course, extend the standard features of this base class further. Perhaps there is something you...

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 €18.99/month. Cancel anytime