This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Use of Helper classes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Use of Helper classes" Watch "Use of Helper classes" New topic
Author

Use of Helper classes

Mohankumar G
Greenhorn

Joined: Jul 30, 2003
Posts: 2
Can any one help me in explaining the need of helper classes and where we can use it?
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

You mean Helper classes for EJB?


Groovy
Mohankumar G
Greenhorn

Joined: Jul 30, 2003
Posts: 2
Yes. for EJB
Vishwa Kumba
Ranch Hand

Joined: Aug 27, 2003
Posts: 1064
One example that I have come across is :
Order and OrderlineItems. These need not be 2 different Entity Beans.
The design could have only 1 EJB, the OrderEJB containing a Collection of
OrderlineItems, which are just simple java classes, called as Helper Classes. Orders and OrderlineItems are still stored in different tables.
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

You could have a helper class for sending confirmation emails to Customers.
Sivasundaram Umapathy
Ranch Hand

Joined: Aug 10, 2002
Posts: 360
Helper classes can be used as dependent objects(OrderlineItems of vishkumar) or may be as Value Object POJO's or as Utility classes (like email sender of pradeep).


Siva
Co-Author - SCMAD Exam Guide - ISBN:9780070077881
Author - Java certification success, Part 4: SCEA
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Use of Helper classes