Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
    Bookmark Topic Watch Topic
  • New Topic

Designing a Simple Java Bean

 
Harish Moolchandani
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Report post to moderator
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
Pie
Posts: 64827
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please do not post there same question more than once.
 
    Bookmark Topic Watch Topic
  • New Topic