0 Replies Latest reply on Mar 15, 2009 10:11 PM by asaf sh

    EntityQuery with constant restrictions

    asaf sh Expert


      I would like to add some constant restrictions (without value expressions) in case a request variable has a certain value,

      I was thinking about something like

      public String getEjbql() {
        if (someRequestVariable == x) {
          //somehow add the restriction

      It works fine in case I add an expression to the RestrictionExpressionString but it must be an expression,

      I was thinking about overriding parseEjbql method, invoking the super.parseEjbql and then adding some static restrictions to the parsedRestrictions but this is impossible as parsedRestrictions is a private list.

      Any other suggestions?

      Many thanks,