Class NativeQuery<Q extends QueryParameters,​E extends SimpleEntity,​P>

    • Constructor Detail

      • NativeQuery

        public NativeQuery​(Class<E> entityType,
                           Class<P> projectionType,
                           Q params)
    • Method Detail

      • count

        public int count()
        Returns the record count for the current query
      • getQuery

        public com.querydsl.sql.SQLQuery<?> getQuery()
      • iterateEntities

        public com.mysema.commons.lang.CloseableIterator<E> iterateEntities()
        Returns an iterator with JPA entities for the current query
      • iterateIds

        public com.mysema.commons.lang.CloseableIterator<Long> iterateIds()
        Returns an iterator with entity ids for the current query
      • iterateResults

        public com.mysema.commons.lang.CloseableIterator<P> iterateResults()
      • pageEntities

        public Page<E> pageEntities()
        Returns a page with entities for the current query
      • pageResults

        public Page<P> pageResults()
      • visibility

        public SQLUserVisibilityApplier visibility​(com.querydsl.core.types.dsl.NumberPath<Long> userId,
                                                   com.querydsl.core.types.dsl.NumberPath<Long> groupId)
        Returns a visibility applier to add the user visibility rules for the given user id and group id paths.
      • addOrderBy

        protected <FV extends SBaseFieldValues<FV>,​EV extends SBaseEnumValues<?>> void addOrderBy​(Class<FV> fvType,
                                                                                                        Class<EV> evType,
                                                                                                        com.querydsl.sql.SQLQuery<?> query,
                                                                                                        CustomField<?,​?,​?> customField,
                                                                                                        com.querydsl.core.types.dsl.NumberPath<Long> ownerIdPath,
                                                                                                        boolean descending)
        Adds an order by condition for a given custom field value
      • applyFullTextFilter

        protected void applyFullTextFilter​(com.querydsl.sql.SQLQuery<?> query,
                                           TsVectorExpression tsvectors,
                                           STsQuery q,
                                           com.querydsl.core.BooleanBuilder keywordsCondition)
      • ensureQuery

        protected com.querydsl.sql.SQLQuery<?> ensureQuery()
      • filterByDatePeriod

        protected void filterByDatePeriod​(DatePeriodDTO period,
                                          com.querydsl.core.types.dsl.DateTimeExpression<Date> path)
        Adds a query expression
      • filterByDatePeriod

        protected void filterByDatePeriod​(com.querydsl.core.support.QueryBase<?> query,
                                          DatePeriodDTO period,
                                          com.querydsl.core.types.dsl.DateTimeExpression<Date> path)
        Adds a query expression in a custom query (or subquery)
      • getLogger

        protected org.apache.logging.log4j.Logger getLogger()
      • getMainEntityAlias

        protected abstract com.querydsl.sql.RelationalPath<?> getMainEntityAlias()
        Must be implemented in order to return the alias for the main entity in the query
      • getProjection

        protected abstract com.querydsl.core.types.Expression<P> getProjection​(com.querydsl.sql.SQLQuery<?> query,
                                                                               Integer totalCount)
        Must be implemented in order to return projection for results in the query, given the total record count
      • getSessionData

        protected SessionData getSessionData()
      • initializeQuery

        protected abstract List<com.querydsl.core.types.Expression<?>> initializeQuery​(com.querydsl.sql.SQLQuery<?> query)
        Initializes the query, returning additional from expressions that should be applied after all others
      • join

        protected <T extends SBaseFieldValues<T>> T join​(Class<T> fvType,
                                                         Class<? extends SBaseEnumValues<?>> evType,
                                                         com.querydsl.sql.SQLQuery<?> query,
                                                         CustomField<?,​?,​?> customField,
                                                         com.querydsl.core.types.dsl.NumberPath<Long> ownerIdPath)
        Adds a join to a custom field value table
      • resetQuery

        protected void resetQuery()