1 Reply Latest reply on Nov 22, 2008 2:08 AM by Ingo Jobling

    Advice on using EntityQuery needed

    Ivan B Novice


      Is it possible to use EntityQuery with several different sets of restrictions?
      Could I still get the whole list of entities if I don't provide values for e.g. kundeList.kunde in the exaple below?

      private static final String[] RESTRICTIONS = {
                "lower(kunde.name) like concat(lower(#{kundeList.kunde.name}),'%')",
                "lower(kunde.tel1) like concat(lower(#{kundeList.kunde.tel1}),'%')",
                "lower(kunde.tel2) like concat(lower(#{kundeList.kunde.tel2}),'%')",
                "lower(kunde.fax) like concat(lower(#{kundeList.kunde.fax}),'%')",
                "lower(kunde.email) like concat(lower(#{kundeList.kunde.email}),'%')",
                "lower(kunde.www) like concat(lower(#{kundeList.kunde.www}),'%')", };

      I wonder if a new EntityQuery subclass object should be created for different restrictions, or I'd much rather keep all of them in the same component.