Monday, March 8, 2010

Spring EYE on JAVA EE - 6

Now continue with the function façade. Spring strongly promote code to interface concept. Interface I_OrderFunction was created along with the implementing class OrderFunctionImp.java. I can presumably certain that the required DAO object will be there thanks for the IoC or DI, the magic of Spring. Unit test is similar to the above one.


I_OrderFunction.java Ignore the annotation for now.




And OrderFunctionImp.java




Need to modify the spring configuration file by adding the following cause now we are dealing with full entity hierarchy. OrderItem is not needed cause it has composition relationship with Order, means can not exists without Order. Therefore no need for its own DAO.




Previous    Next

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home