
236 Use the Data Management Service
The previous example calls out the following elements of the contact destination definition:
Destination section Description
adapter
References the Java object adapter configuration that the contact
destination uses. This is also defined in the data-management-
config.xml file. The Java object adapter lets you interact with a Java
object to obtain data and commit data to a server-side data resource.
source
Specifies the assembler class, which is the Java class that passes
data between a server-side data resource and the client-side
DataService component.
The assembler class is a custom class that you write. It is usually an
implementation of the Transfer Object Assembler design pattern,
which is described at http://java.sun.com/blueprints/
corej2eepatterns/Patterns/TransferObject.html.
The
scope element below the source element indicates the scope of
the class; valid values are
application, session, and request.
network
Contains settings for how data messages are passed between the
server-side Data Management Service and the client-side
DataService component. For example, the
paging element specifies
whether data sent from the server to the client is chunked into
smaller subsets of data instead of being sent all at once.
fill-method
Specifies a mapping to a fill method that is invoked when the client-
side
DataService.fill() method is called to fill an ArrayCollection
object. You can implement any number of methods as fill methods,
but they must be differentiated by the types of their parameters. Each
of these methods can accept an arbitrary number of parameters of
varying types. Based on the parameters that the client-side
DataService.fill() method provides, the appropriate fill method on
the assembler class is invoked.
sync-method
Specifies a method that accepts a list of data changes to allow
synchronization of data among multiple clients and the backend data
resource.
A sync method takes a single argument, which is a standard
java.util.List implementation that contains objects of type
flex.data.ChangeObject. Each ChangeObject object in the list
contains methods to access the application-specific changed Object
instance, as well as convenience methods for describing the type of
change and for accessing the changed data members.
Kommentare zu diesen Handbüchern