Thursday 6 September 2012

Batch Class?


What is Batch Class?
Ans:-
 A developer can now employ batch Apex to build complex, long-running processes on the Force.com platform. For example, a developer could build an archiving solution that runs on a nightly basis, looking for records past a certain date and adding them to an archive. Or a developer could build a data cleansing operation that goes through all As ccounts and Opportunities on a nightly basis and reassigns them if necessary, based on custom criteria.
Batch Apex is exposed as an interface that must be implemented by the developer. Batch jobs can be programmatically invoked at runtime using Apex.
1. Start method-
global (Database.QueryLocator | Iterable<sObject>) start(Database.BatchableContext bc) {}

2. Execute method:
global void execute(Database.BatchableContext BC, list<P>){}

3. Finish method
global void finish(Database.BatchableContext BC){}

No comments:

Post a Comment