Class QueryCriteria


  • public class QueryCriteria
    extends Object
    This object contains the following information:
    1. The listId, which refers to the field that this criteria applies to
      • See QueryParameterIdentifiers
    2. The values of the criteria, which will be applied to the listId field
      • For example, it could be a list of numbers "1, 22, 3"
    3. Whether this is a union ("OR") or intersection ("AND") critieria
    4. The type of criteria: normal, like (JPQL regex) or range
    5. The grouping information of the phrase (see below)

    With regard to the grouping information in this class, we treat JPQL/SQL as a "prefix" language here, which means that this class represents the following regular expression/BNF string:
       [)]{0,} [OR|AND] [(]{0,} <CRITERIA>
     
    This structure is then represented by the following fields:
       [endGroups] [union] [startGroupos] [values]
     
    The main reason to include the grouping status in this object is that other data structures (nested lists, etc) are much harder to de/serialize correctly.
    • Method Detail

      • getListId

        public String getListId()
      • setListId

        public void setListId​(String listId)
      • isUnion

        public boolean isUnion()
      • setUnion

        public void setUnion​(boolean union)
      • isFirst

        public boolean isFirst()
      • setFirst

        public void setFirst​(boolean first)
      • setValues

        public void setValues​(List<Object> values)
      • getDateValues

        public List<Date> getDateValues()
      • setDateValues

        public void setDateValues​(List<Date> dateValues)
      • isGroupCriteria

        public boolean isGroupCriteria()
      • hasValues

        public boolean hasValues()
      • hasDateValues

        public boolean hasDateValues()
      • hasCriteria

        public boolean hasCriteria()
      • getParameters

        public List<Object> getParameters()
        This method returns a list that should only be read
        Returns:
      • addCriteria

        public void addCriteria​(QueryCriteria criteria)