On Wednesday, December 11, 2002, at 05:18 PM, Garth A. Fisher wrote:
I recently faced this issue and I did something like this:Sounds like it will work. Kinda similar to my approach.
public interface SalesDepartment {
public void addSalesPerson(SalesPerson sp);
public SalesPerson getSalesPerson(ID id); // each SalesPerson has a unique ID
public SalesPerson[] getSalesPersons();
public void updateSalesPerson(SalesPerson);
public void removeSalesPerson(ID);
// other SalesDepartment methods ...
}
The idea is that SalesPerson is a component, but more
specifically SalesPerson is a service data component
managed by the SalesDepartment service.
I would be very interested to see what others think of this
approach, since I am new to Avalon.
I have a 'DataManager' which is a component that manages 'DataObjects', component-like but not full components themselves. So to match your example I would have a SalesPersonManager and SalesDepartmentManager as peers. A SalesDepartment only has a handle back to its SalesDepartmentManager, on which it can execute a method loadChildren() and pass in the type of child it wants and receive back an array of SalesPerson objects.
-pete
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>