Class FindAllSpecificationInterceptor

    • Constructor Detail

      • FindAllSpecificationInterceptor

        protected FindAllSpecificationInterceptor​(@NonNull
                                                  RepositoryOperations operations)
        Default constructor.
        Parameters:
        operations - The operations
    • Method Detail

      • intercept

        public java.lang.Object intercept​(RepositoryMethodKey methodKey,
                                          io.micronaut.aop.MethodInvocationContext<java.lang.Object,​java.lang.Object> context)
        Description copied from interface: DataInterceptor
        Intercepts a data method execution.
        Parameters:
        methodKey - The method key
        context - The context
        Returns:
        The result
      • addSort

        protected void addSort​(java.lang.Object sortObject,
                               javax.persistence.criteria.CriteriaQuery<java.lang.Object> query,
                               javax.persistence.criteria.Root<java.lang.Object> root,
                               javax.persistence.criteria.CriteriaBuilder criteriaBuilder)
        Add sort to the query.
        Parameters:
        sortObject - The sort object
        query - The query
        root - The root
        criteriaBuilder - The criteria builder