Two closely related list controllers are used in different circumstances to manage instances of Business Objects within the AddressBookModel Application. PersistableList is a specialized ObservableList that deals with persistent Business Objects. Both the persistent and non-persistent flavours of these list controllers:
- control the membership, order and current instance of business objects for the view in the form of a java.utils.List
- may contain a Query that defines the instructions for retrieving the Business objects from the datasource
- have the ability to be chained with other list controllers to provide master - detail relationships. These links can be established through relationships expressed in the Business Object Model (known as an Object Link) or via queries that co-relate objects (known as a Query Link) that are not otherwise related in the Busines Object Model, and that may be from different data sources.
PersistableLists add the following features to the ObservableList:
- tracks the persistent state of the Business Objects it contains (providing that they are associated to a persistent data source). This includes the modified fields, added / removed instances, etc. while the user is manipulating the business objects.
- invokes persistence operations like add, remove and update and submits them to the datasource's transaction manager when the user wants to commit their changes
Observable / persistable lists are frequently used to populate the Combo / List models for the visual components.
|