-->
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.  [ 2 posts ] 
Author Message
 Post subject: POJO's Propreties Modifiers
PostPosted: Mon Mar 13, 2006 6:07 am 
Newbie

Joined: Fri Mar 03, 2006 1:28 pm
Posts: 9
Hi all.

I'm used to develop POJO's with simply private attributes and public assessor methods, even with inheritance involved.
This thins is, in the simple example of a POJO in the manual reference, i find public getters but i find:
- default setters (no modifier)
- protected setters (in child classes)
My question is, is there any optimizing or other reasons for this? I use inheritance all the time but i tend to place the whole "family tree" in the same package.

Thanks in advance for any replies.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 13, 2006 6:46 am 
Newbie

Joined: Fri Mar 03, 2006 1:28 pm
Posts: 9
Another question: I read in that same chapter: "A subclass must also observe the first and second rules.", whereas the second rule is "Implement a default constructor". But right below of it, the example of the DomesticCat has no constructor defined. Does it inherit the default constructor from its parent? Or does it have to be explicity defined?

Also, where can I get a sample mapping file for a child class? Is there any major differences?

Thanks once again.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.