Class DataEntityQueryService

  • public class DataEntityQueryService
    extends Object
    Implements a service which can handle different types of query and paging options. This class supports standard parameters for paging and flexible parameters for filtering queries. Sorting is supported on one property. This service class only supports querying for one Entity. This service class can not be used as a singleton.
    • Constructor Detail

      • DataEntityQueryService

        public DataEntityQueryService()
    • Method Detail

      • count

        public int count()
        Count the records which fit in the filter criteria.
        the number of records in the filter.
      • list

        public List<BaseOBObject> list()
        Return the list of BaseOBObject objects retrieved by querying using the filter criteria.
        the list of retrieved objects from the db.
      • scroll

        public org.hibernate.ScrollableResults scroll()
        a result which can be scrolled forward only and the results are not cached
      • getWhereClause

        public String getWhereClause()
      • buildOBQuery

        public OBQuery<BaseOBObject> buildOBQuery()
        Build an OBQuery object using the generated where, order by and select clauses.
      • getRowNumber

        public int getRowNumber​(String targetRecordId)
      • getFirstResult

        public Integer getFirstResult()
      • setFirstResult

        public void setFirstResult​(Integer firstResult)
      • getMaxResults

        public Integer getMaxResults()
      • setMaxResults

        public void setMaxResults​(Integer maxResults)
      • setOrderBy

        public void setOrderBy​(String orderBy)
      • getEntityName

        public String getEntityName()
      • setEntityName

        public void setEntityName​(String entityName)
      • setTextMatching

        public void setTextMatching​(String textMatchingName)
        The text matching strategy used. See here for a description:
        textMatchingName - the following values are allowed: startsWith, substring, exact
      • setCriteria

        public void setCriteria​(org.codehaus.jettison.json.JSONObject criteria)
      • addFilterParameter

        public void addFilterParameter​(String key,
                                       String value)
      • setDoOrExpression

        public void setDoOrExpression()
        If called then the where clause filters will be considered to be an or expression.
      • setUseAlias

        public void setUseAlias()
        Tells the query builder to use the JsonConstants.MAIN_ALIAS as the alias for prefixing all properties in the where clause and order by.
      • isFilterOnActive

        public boolean isFilterOnActive()
      • setFilterOnActive

        public void setFilterOnActive​(boolean filterOnActive)
      • setJoinAssociatedEntities

        public void setJoinAssociatedEntities​(boolean joinAssociatedEntities)
      • setAdditionalProperties

        public void setAdditionalProperties​(List<String> additionalProperties)
      • clearCachedValues

        public void clearCachedValues()
      • getDistinct

        public String getDistinct()
      • setDistinct

        public void setDistinct​(String distinct)
      • getSummarySettings

        public String getSummarySettings()
      • setSummarySettings

        public void setSummarySettings​(String summarySettings)
      • getSummaryFields

        public List<String> getSummaryFields()
      • isFilterOnReadableOrganizations

        public boolean isFilterOnReadableOrganizations()
      • setFilterOnReadableOrganizations

        public void setFilterOnReadableOrganizations​(boolean filterOnReadableOrganizations)
      • isFilterOnReadableClients

        public boolean isFilterOnReadableClients()
      • setFilterOnReadableClients

        public void setFilterOnReadableClients​(boolean filterOnReadableClients)