-->
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.  [ 1 post ] 
Author Message
 Post subject: How to determinine if two entities are associated
PostPosted: Fri May 17, 2013 8:36 am 
Newbie

Joined: Mon Mar 04, 2013 12:48 pm
Posts: 6
Hello folks,

having to entity instances, how do i determine if the two entities are directly or indirectly associated? More specifically: assume we multiple separate graphs of entities. I need to create a method that can tell about two randomly picked entities whether or not they are in the same entity graph.

For example:
Code:
PersonA
  - CarA1
    - LicenseCarA1
  - CarA2
    - LicenseCarA2

PersonB
  - CarB1
    - LicenseCarB1
  - CarB2
    - LicenseCarB2

Say our method is named "isReachable"
Code:
isReachable(PersonA, LicenseCarA2) -> true
isReachable(PersonA, LicenseCarB2) -> false

What is the most appropriate way to implement such a method?


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

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.