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

Persist Object in Data Base

 
SeetaramRao Rayarao
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please let me know any related info to slove my problem.

I want to persist Object into database. That typically contains Hashtables, Vectors.
Here is the my class definition :

Class : NAME
Instance variables are :
String name; (Ex: Hyd-Shelf)
String moType; (Ex: Shelf,card,ring etc)
String neName; (Ex : 10.29.128.160)

Class : AMO
NAME key;
Vector parents;
Hashtable data;
Vector children

I need to store AMO objects and each AMO object is identified by key (NAME).
As of now, we are storing them in hash tables like this :
--------Shelf (moType of AMO class )-------+
|
+ 10.29.128.160
+ 10.29.128.
+ 10.29.129.11----+
|
-Hyd_bad_Shelf
- Sec-Shelf
1. Here key as "moType" to get value as all hashtables.
2. Here key as "neName" to get values as Hashtable
3. At last give key as "name" to get AMO object

Thanks in advance..
Seetaram
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds like you are looking for something like Hibernate. Have you had a look at it?

(NB: why are you using Vectors and Hashtables?)
 
SeetaramRao Rayarao
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here my class contains data as hastable to store some network element information.
Some AMOs are act as parents and childers, to maintian whoe are the parents of this AMO . I need to persist this data.. hiw can I do that? I heard about Hibernet. I need to store vectors and hastbales in database.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic