I am working with JDK 7.
I have all my business logic classes in com.srh.bll.businesslogic
package.
I am concerned about how to return data from one business logic class to another business logic class.
For example I have 2 business logic classes ReferenceYearBusinessLogic
and AnniversaryBusinessLogic
.
Now methodA
of ReferenceYearBusinessLogic
needs to call methodA
of AnniversaryBusinessLogic
and expects to get 3 things back: referenceDate, anniversaryNumber and vacationRate.
And methodC
of ReferenceYearBusinessLogic
needs to call methodB
of AnniversaryBusinessLogic
and expects to get 2 things back: payScale and payRate.
And so on...
So I think I need to define classes to pass data in this case; one class would have 3 properties: referenceDate, anniversaryNumber and vacationRate while another class would have 2 properties: payScale and payRate.
What would be these classes called in design pattern world? I thought of them as DTOs but DTOs are used to transfer data between layers while in my case they will be used only within one layer and will not be needed outside of that layer. Any thoughts?
Aucun commentaire:
Enregistrer un commentaire