title: How to append conditional query dynamically in Hibernate Filter
body: <p>I have hibernate filter on one entity.</p>
  
  <pre><code>@Entity
  @Cacheable
  @Table(name="table_check")
  @NamedQueries({
      @NamedQuery(name = "table_check.check_condition1", query = "SELECT obj FROM table_check obj WHERE 1 = 1")
  })
  @XmlRootElement
  @FilterDefs({ 
      @FilterDef(name="table_test_filter" ,
                  defaultCondition="test_condition = :param1")
      })
  
  @Filters({
      @Filter(name="table_test_filter")})
  
  public class Table extends TableChecksEntity implements java.io.Serializable {
      private static final long serialVersionUID = 1L;
  
  }
  </code></pre>
  
  <p>I need to generate one dynamic query through java code before enabling this filter. </p>
  
  <p>This query string will contain One or more tables other than current entity (Basically it will be a join with current entity).</p>
  
  <p>Is it possible to add this query string to the above hibernate filter (which will be created via hibernate annotations) ?</p>