-->
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: polymorphic reference to a 3rd party interface
PostPosted: Sun Oct 18, 2009 1:35 pm 
Newbie

Joined: Sun Oct 18, 2009 12:57 pm
Posts: 1
Hi anyone!

I consider this a common problem, yet i could not find any answers so far.

I want to map a class which has a member that is declared as an association to a 3rd party interface:

Code:
public class MyClass {

public Unmapped3rdPartyInterface getMember() {...}

}


That interface is not mapped but my custom implementations of that interface are. I know that this is somehow dangerous because that member could possibly reference an unmapped implementation. But this is how the design is, independent from any persistence considerations.

The only solution I could find so far is using 'any' but the documentation of the @Any-Annotation somehow discourages the usage. Is there a common approach to such kind of problems?

Thanks a lot in advance!


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.