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:
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
The class must be ...