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.