Developing a Batch Apex Class

Although the class in Listing 9.1 performs no useful work, it leaves a trail of its activity in the debug log. This is helpful in understanding how Force.com handles your batch-enabled code. It also illustrates the basic elements of a Batch Apex class, listed next:

Image The class must implement the Database.Batchable interface. This is a parameterized interface, so you also need to provide a type name. Use SObject for batches with a QueryLocator scope, or any database object type for an Iterable scope.

Image The class must be ...

Get Development with the Force.com Platform: Building Business Applications in the Cloud, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.