Since im quite new to java here, im abit confused about the term 'business object' and 'business logic'.... is the business object regarded as Customer object which produced by the Data Access LAyer? and the 'business logic' is the functions/methods/logic written in those business object??
I saw that the usually the beans from the Data Aceess Layer has all this get/set methods. So let say i have 'Customer' object which could has more than one 'Order'. Then i got this Customer.addOrder(Order) and Customer.getOrder() which return List,
and please remember that this Customer and Order is produced from the Data Access Layer
then in my swing application i got this function to add more order, so i would do something like Customer.addOrder(newOrder) in the Swing controller. But then, where is the code that really add the 'newORder' to the database? isnt the code inside the Customer get/set is only about returning the private variable and setting the private variable of the Customer???
I thought of 'planting' the code which contact the Data Access Layer inside the Customer.addOrder
So inside it will be something like...
Factory f = getFactory();
OrderMgr om = f.getOrderMgr();
is it the preferred way ????
Any opinion is highly appreciated