aspose file tools*
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
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: 61661
    
  67

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