-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: Hibernate - Constructor methods
PostPosted: Tue Jul 03, 2007 1:47 pm 
Have a few questions on the constructor methods

Whats the significance of minimal constructor and full constructor methods?

When the object is instantiated which one will be called?

In minimal constructor method how the parameters are determined?

Thanks
Arun


Top
  
 
 Post subject:
PostPosted: Tue Jul 03, 2007 2:37 pm 
Expert
Expert

Joined: Tue Dec 28, 2004 7:02 am
Posts: 573
Location: Toulouse, France
What are refering to?

I guess you may be speaking about the need for hibernate to have a default constructor. At least one protected.

Then, Hibernate just uses this one and then calls the property setters (with the default access mode) one by one. I don't think it's even possible to use any parameterized constructor with H3.

_________________
Baptiste
PS : please don't forget to give credits below if you found this answer useful :)


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 04, 2007 3:17 pm 
Expert
Expert

Joined: Sat Jan 17, 2004 2:57 pm
Posts: 329
Location: In the basement in my underwear
Actually, you can use a non-default constructor. However, you either need to override the instantiate method in either an interceptor or your entity persister.

_________________
Some people are like Slinkies - not really good for anything, but you still can't help but smile when you see one tumble down the stairs.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 31, 2007 6:08 pm 
Newbie

Joined: Thu Oct 19, 2006 6:33 pm
Posts: 2
Location: Toronto, Canada
Quote:
Actually, you can use a non-default constructor. However, you either need to override the instantiate method in either an interceptor or your entity persister.


Thank you! I've been looking for this information all day. Unfortunately, I made the mistake of looking for it in the documentation. :)

Can anyone point me to the documentation for correctly implementing an interceptor and/or entity persister?

-Jonathan


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.