This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem in storing an object to the database!

 
yuvaraj KumarAmudhan
Ranch Hand
Posts: 110
  • 0
  • 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: 33696
316
Eclipse IDE Java VI Editor
  • 0
  • 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
  • 0
  • 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: 33696
316
Eclipse IDE Java VI Editor
  • 0
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yuvaraj:

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

John.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic