This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes Persist Object in Data Base Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Persist Object in Data Base" Watch "Persist Object in Data Base" New topic

Persist Object in Data Base

SeetaramRao Rayarao

Joined: Mar 30, 2007
Posts: 3
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 :

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.
- 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..
Paul Sturrock

Joined: Apr 14, 2004
Posts: 10336

Sounds like you are looking for something like Hibernate. Have you had a look at it?

(NB: why are you using Vectors and Hashtables?)

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
SeetaramRao Rayarao

Joined: Mar 30, 2007
Posts: 3
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.
I agree. Here's the link:
subject: Persist Object in Data Base
It's not a secret anymore!