-->
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.  [ 3 posts ] 
Author Message
 Post subject: Hibernate Annotations and interface
PostPosted: Thu May 19, 2005 1:27 am 
Regular
Regular

Joined: Tue Nov 09, 2004 5:15 pm
Posts: 100
Hi All,

I'm just 2 days new to Hibernate annotations. I've got the simple things working but my POJOs all implement Historizable interface (This is for HistoryInterceptor implementation)

For example, i've a class ApplicationRole that implements Historizable


My Historizable interface looks as follows:

Code:

public interface Historizable {
 
    /**
     * @return
     */
    Set getHistoryEntries();

    /**
     * @param entries
     */
    void setHistoryEntries(Set entries);
   

}


As ApplicationRole implements Historizable, i've provided implementation for these methods from Historizable interface. This class has an attribute

Set HistoryEntries


I'm not sure how should i write annotations for this???

I tried @OneToMany but what should be the targetEntity (please note that i'm NOT using generics)

Any input on how to do this is greatly appreciated.


Thanks in advance!


Top
 Profile  
 
 Post subject: Re: Hibernate Annotations and interface
PostPosted: Thu May 19, 2005 9:04 am 
Beginner
Beginner

Joined: Mon Dec 15, 2003 5:25 am
Posts: 48
Location: Delhi, India
ssa1 wrote:
Hi All,
For example, i've a class ApplicationRole that implements Historizable

As ApplicationRole implements Historizable, i've provided implementation for these methods from Historizable interface. This class has an attribute

Set HistoryEntries


I'm not sure how should i write annotations for this???

I tried @OneToMany but what should be the targetEntity (please note that i'm NOT using generics)

Thanks in advance!


Should not it be ApplicationRole in case of ApplicationRole.class

_________________
Vinod K. Singh


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 20, 2005 10:27 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
the fully qualified class name of HistoryEntry.

_________________
Emmanuel


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