my dog learned polymorphism*
The moose likes EJB and other Java EE Technologies and the fly likes Designing a Simple Java Bean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Reply locked New topic
Author

Designing a Simple Java Bean

Harish Moolchandani
Greenhorn

Joined: Mar 12, 2010
Posts: 23
Hello, I'm beginner in MVC concepts and need help in designing java beans.
I've a table names types and it has a foreign key (parentType) pointing to itself.

So what fields should I take for java bean Types.
long typeId;
String name;
String description;
long parentTypeId;

-or-

long typeId;
String name;
String description;
Type parentTypeId;

-or-


long typeId;
String name;
String description;
Type parentTypeId;
Type[] childTypes;

-or-
any other recommendation will be helpful.


???
Please Help
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60773
    
  65

Please do not post there same question more than once.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Designing a Simple Java Bean
 
Similar Threads
Passing array values using Ajax & JSP
C++ to java
Container Error in FindBy methods in JBoss
Same old problem?
Hibernate - Mapping foreign keys tables