Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Should the add service always invoke a doAdd service?

doAdd invoke service
0
Posted

Should the add service always invoke a doAdd service?

0

Index Yes. The doAdd encapsulates the assignment implementation of the collaboration. For example, how a farmer is stored within a MilkingTransaction. (See also: How to Implement Collaboration Rules). In fact the addFarmer method should look like this: /* MilkingTransaction service */ public void addFarmer(Farmer Farmer) throws BusinessRuleException { if (Farmer == null) { throw new BusinessRuleException(“Tried to add null farmer”); } this.testAddFarmer(aFarmer); aFarmer.testAddMilkingTransaction(this); this.doAddFarmer(aFarmer); aFarmer.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123