Announcement Announcement Module
Collapse
No announcement yet.
Interaction between simplemanager's Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Interaction between simplemanager's

    Hi there!

    I'm newbie to spring. I read the spring-mvc-step-by-step tutorial and successfully integrated hibernate to that example I could make it run without problems.

    From the reading I understood that service layer is the layer where pojos get served, isn't it? From the tutorial example: ProductManager is the service responsible for handling products (Product POJO). So, ProductManager has all "business rules" regarding products such as increasePrice.

    So... what if I have StoreManager which handles Stores (Store POJO) -with methods (business rules) that need make use of other business rules-? For example, StoreManager would have methods such as increaseProductPriceInStoreX, which finds the store "X", do some logic with the store and need to make use of increasePrice from SimpleProduct? How do I achieve that? how do I can use business logic between xyzManagers?

    The first solution that came to my mind was to set productDao in SimpleStoreManager, but in this way I will end up re-writing increasePrice business code in increaseProductPriceInStoreX from SimpleStoreManager.

    How do I can call a "business rule" (increasePrice from ProductManager) from another business handler (StoreManager)?

    Thanks,

    Angel
Working...
X