
238 Use the Data Management Service
View the fill methods
A fill method of the assembler class is called as a result of the client-side DataService’s fill()
method being called. The following code example shows the two methods that are specified as
fill methods in the contact destination definition. The methods have the same name but
different signatures, yet both return a List object that contains Contact objects. One method
takes no arguments, while the other takes a name of type String as an argument. One of the
methods is called, depending on whether or not the
DataService.fill() request from the
client specifies an argument of type String.
...
import flex.data.ChangeObject;
...
public class ContactAssembler {
...
public List loadContacts() {
ContactDAO dao = new ContactDAO();
return dao.getContacts();
}
public List loadContacts(String name) {
ContactDAO dao = new ContactDAO();
return dao.getContacts(name);
}
...
Comentários a estes Manuais