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: Declaring filters on common interface
PostPosted: Thu Jun 23, 2011 7:53 am 
Newbie

Joined: Wed May 25, 2011 9:33 am
Posts: 3
Hi Lads,
I'd like to ask you whether is possible to declare hibernate filters on common interface?

Code:
@FilterDef(name = IHasLifeCycle.FILTER_STATUS,
        parameters = @ParamDef(name = IHasLifeCycle.FILTER_STATUS_PARAM_STATUS, type = "int"))
@Filter(name = IHasLifeCycle.FILTER_STATUS,
        condition = "status=:" + IHasLifeCycle.FILTER_STATUS_PARAM_STATUS)
public interface IHasLifeCycle {

    /**
     * Filter name - it filters objects according to its life cycle status.
     */
    String FILTER_STATUS = "ihaslifecycle_status";

    /**
     * Parameter status used in filter called {@linkplain #FILTER_STATUS}.
     */
    String FILTER_STATUS_PARAM_STATUS = "status";

    /**
     * Getter for life cycle status.
     * @return Return life cycle component status.
     */
    Integer getStatus();

    /**
     * Setter for life cycle status.
     * @param status New life cycle component status.
     */
    void setStatus(Integer status);
}


The reason why Im asking you for help is that hibernate thrown an exception called: Caused by: org.hibernate.HibernateException: No such filter configured

From my point of view this shouldn't be a problem.


Top
 Profile  
 
 Post subject: Re: Declaring filters on common interface
PostPosted: Thu Jun 23, 2011 8:45 am 
Newbie

Joined: Thu Jun 23, 2011 8:43 am
Posts: 1
i dont know about that....

_________________
santa fe nm hotels - taos - taos hotelssanta fe nm hotels - taos -


Top
 Profile  
 
 Post subject: Re: Declaring filters on common interface
PostPosted: Fri Jun 24, 2011 4:06 am 
Newbie

Joined: Fri Jun 24, 2011 4:03 am
Posts: 1
hi everyone

_________________
34 weeks pregnant - 28 weeks pregnant - 20 weeks pregnant


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.