• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem in storing an object to the database!

 
yuvaraj KumarAmudhan
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this question may be silly but i have to ask. Can i store a java object into the database?
For example, An object of class 'Object' can be stored?

thanks if you answer me smoothly.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34229
341
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can store a Serializable object in a BLOB.
 
yuvaraj KumarAmudhan
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in what manner the objects stored and retrieved by java? How can i retrieve an object from the database? with mehtods like getObject and getBlob?


thanks
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34229
341
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yuvaraj yuvan wrote:in what manner the objects stored and retrieved by java? How can i retrieve an object from the database? with mehtods like getObject and getBlob?


thanks

See the Serialization tutorial. You get a binary stream and then unserialize it into an Object.
 
John de Michele
Rancher
Posts: 600
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yuvaraj:

You may want to look into Hibernate, or another ORM platform.

John.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic