• pinal2
  • NEWBIE
  • 0 Points
  • Member since 2010

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 7
    Replies

Hi Everyone,

 

I am trying to understand how Apex Batch works. Does Apex Batch do Job partioning? Below snippet is from the following link: http://www.salesforce.com/us/developer/docs/apexcode/index_Left.htm#StartTopic=Content%2Fapex_batch_interface.htm|SkinName=webhelp

 

"Each execution of a batch Apex job is considered a discrete transaction. For example, a batch Apex job that contains 1,000 records and is executed without the optional scope parameter from Database.executeBatch is considered five transactions of 200 records each. The Apex governor limits are reset for each transaction. If the first transaction succeeds but the second fails, the database updates made in the first transaction are not rolled back."

 

Based on above snippet, does Apex Batch executes the five transactions at a same time, like parellel processing? Or does it just executes the chunk of 200 records at a time sequentially? I am assuming it runs all five parllely. Please shed some lights.

 

Also, the start method of Database.Batchable Interface returns QueryLocator, does it return all the data in one call? Just trying to understand what QueryLocator does.

 

Thanks so much in advance! I'll look forward to your postings :-)

 

Regards!

Hello everyone,

 

I have a scenerio where I need to show multiple sObjects ( for eg: Account, Contact etc) information in the same page in one request. If I am correct, I think I can create a custom controller which can invoke these objects to retrieve the data. The question I have is the controller can be bind to only one sObject at a time, in this case Account or Contact. So, Should I create an another custom object which will have these two sObjects as an attribute so that I can bind the custom object to the custom controller for just rendering purpose?  What is the best design approach?

 

Thanks for your valuable response in advance!

 

 

Hello All,

 

I am very new to the Force.com. The question I have is how is validation rule gets executed on a given object?  I see that validation rules are set within the sobjects/custom objects itself. For example, if I want to set validation rules on Account tab, then I would go to Account object to set validation rules. What I am having a hard time understanding from a design/sequential flow is who calls the validation rules? Is the Controller responsible for calling the validation rules on sObject/custom object before saving the data in the database?

 

Thanks for your valuable response in advance!

 

Regards!

Hello everyone,

 

I am very new to Force.com. I am currently go through various documentation/article to understand Force.com technology. I have a question on a code snippet (please see below)  from "Visualforce Developer's Guide".

 

My question comes from the line "this.acct = (Account)stdController.getRecord();". How does the StandardController knows to retrieve Account record without providing any information pertaining to Account to StandarController. If for example, if I substitue the casting of (Account) to (Contacts), will I get the record information of Contacts?

 

public class myControllerExtension {
private final Account acct;
// The extension constructor initializes the private member
// variable acct by using the getRecord method from the standard
// controller.
public myControllerExtension(ApexPages.StandardController stdController) {
this.acct = (Account)stdController.getRecord();
}
public String getGreeting() {
return 'Hello ' + acct.name + ' (' + acct.id + ')';
}
}

 

 

Thanks for your valuable response in advance!

 

Regards!