Results 1 to 4 of 4
- 12-12-2007, 03:55 PM #1
Member
- Join Date
- Dec 2007
- Location
- Chichester, West Sussex
- Posts
- 3
- Rep Power
- 0
What is this Object relationship?
Hello Chaps,
I'm new to the forums so a big hello to you all as a strarter. I'm also relativly new to JAVA, however I'm comming from a background in web development, mainly Adobe ColdFusion so have a pretty fair working knowledge of the language and the methodology behind it.
I've spent this morning studying the different logging frameworks available to us, mainly the native logging API supplied as part of the platform, and also the Log4J which comes from apache I believe, both of which seem perfectly extensive and simple enough to use.
Whilst studying their documentation and source code I've found a particular type of object relationship I've not seen before and was hoping you'd be able to shed a little light on exactly how it works.
If you wouldnt mind taking a look at the API doc for the 'Level' class which can be found here Level (Java 2 Platform SE v1.4.2) you'll notice that the class appears to contain multiple instance of itself as the properties, is that right? I've not seen this type of composition before, what is it called? and what are the benefits of using it?
I'm also trying to understand exactly what a 'field' is. is this just a publicly accessible property inside the class which is accessible without a getter? or somthing slightly different?
Thanks for any info guys, I look forward to speaking with you all over the comming weeks.
Rob
- 12-12-2007, 04:49 PM #2
Interesting question. I'm going to look into that myself. I have some ideas and I think I know how they are used but it's all speculation at this point. Keep me updated on what you find and I'll do the same.
- 12-14-2007, 12:07 PM #3
Member
- Join Date
- Dec 2007
- Location
- Chichester, West Sussex
- Posts
- 3
- Rep Power
- 0
Hey Shoe,
Well I've been searching for the past few days on this and I'm still none the wiser on how it works, it seems to be some form of subclassing perhaps, but I've only ever handled subclassing using 'extends' so I'm assuming this isnt proper subclassing, perhaps subclassing through compoisition? I dont know, its got me baffled :-D
Rob
- 12-14-2007, 03:17 PM #4
Similar Threads
-
Operator < cannot be applied to java.lang.Object, Object
By Albert in forum Advanced JavaReplies: 2Last Post: 11-26-2010, 02:12 AM -
How to update data for a JPA many-to-many relationship?
By abhijit.sarkar in forum Enterprise JavaBeans (EJB)Replies: 1Last Post: 11-04-2008, 08:48 AM -
Object ID
By javaplus in forum New To JavaReplies: 4Last Post: 11-26-2007, 12:08 PM -
problem with ejb 3.0 entity beans with manyToMany relationship
By makcro in forum Enterprise JavaBeans (EJB)Replies: 0Last Post: 07-26-2007, 07:37 PM -
Creating object of Type Object class
By venkatv in forum New To JavaReplies: 3Last Post: 07-17-2007, 03:33 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks