Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-12-2007, 04:55 PM
Member
 
Join Date: Dec 2007
Location: Chichester, West Sussex
Posts: 3
SirRawlins is on a distinguished road
Send a message via MSN to SirRawlins
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
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 12-12-2007, 05:49 PM
ShoeNinja's Avatar
Senior Member
 
Join Date: Oct 2007
Posts: 112
ShoeNinja is on a distinguished road
Send a message via AIM to ShoeNinja
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.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 12-14-2007, 01:07 PM
Member
 
Join Date: Dec 2007
Location: Chichester, West Sussex
Posts: 3
SirRawlins is on a distinguished road
Send a message via MSN to SirRawlins
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
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 12-14-2007, 04:17 PM
ShoeNinja's Avatar
Senior Member
 
Join Date: Oct 2007
Posts: 112
ShoeNinja is on a distinguished road
Send a message via AIM to ShoeNinja
Sorry. I've been busy the last couple days and haven't had time to look. I take a peek when I get off work tonight.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to update data for a JPA many-to-many relationship? abhijit.sarkar Enterprise JavaBeans 0 12-13-2007 07:12 PM
Object ID javaplus New To Java 4 11-26-2007 01:08 PM
problem with ejb 3.0 entity beans with manyToMany relationship makcro Enterprise JavaBeans 0 07-26-2007 08:37 PM
Creating object of Type Object class venkatv New To Java 3 07-17-2007 04:33 PM
Operator < cannot be applied to java.lang.Object, Object Albert Advanced Java 1 07-13-2007 04:19 PM


All times are GMT +3. The time now is 04:22 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org