• Post Reply Bookmark Topic Watch Topic
  • New Topic

O/R Mapping Hibernate  RSS feed

 
Jan Kwiatkowski
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

In my application I use pretty complex model (there are many sets, many fields etc in each class), let's say there is a big class Project:

class Project {
//fields with setters and getters

}

Unfortunately, i need to use my own JTree(its' desktop application, using Swing) model dedicated to my Project class, and it forces me to do so :

class Project implements Serializable {
//fields with setters and getters

}

(without clause implements it doesn't work properly when I want to Drag&Drop nodes in this JTree)

It's obvious that I also needed to add implements Serializable to all of the classes which HAS Project(like ProjectState and many more).
And here's my question:
Can it seriously affect the performance of my application?
Or even: Does adding clause implements Serializable changes anything?
(I'm using Hibernate)
Please help,

j.k




 
Aurelian Tutuianu
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jan Kwiatkowski wrote:without clause implements it doesn't work properly when I want to Drag&Drop nodes in this JTree
that's because the tree need to save the status of the nodes, and for that the model should be marked as persistable, and that's done by using marker interface Serializable
Jan Kwiatkowski wrote:Can it seriously affect the performance of my application?
No
Jan Kwiatkowski wrote:Or even: Does adding clause implements Serializable changes anything?
Explained first what is changed, without Serializable the model does not know that he can perisist the model
 
Jan Kwiatkowski
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, thanks a lot for the comment.
It really helped me.
cheers,
j.k
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!