All Downloads are FREE. Search and download functionalities are using the official Maven repository.

th.co.geniustree.springdata.jpa.repository.JpaSpecificationExecutorWithProjection Maven / Gradle / Ivy

package th.co.geniustree.springdata.jpa.repository;

import java.io.Serializable;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.data.jpa.repository.EntityGraph;
import org.springframework.data.jpa.repository.query.JpaEntityGraph;
import org.springframework.data.repository.NoRepositoryBean;

import java.util.Optional;

/**
 * Created by pramoth on 9/29/2016 AD.
 */
@NoRepositoryBean
public interface JpaSpecificationExecutorWithProjection {

     Optional findById(ID id, Class projectionClass);
  
     Optional findOne(Specification spec, Class projectionClass);

     Page findAll(Specification spec, Class projectionClass, Pageable pageable);

    /**
     * Use Spring Data Annotation instead of manually provide EntityGraph.
     * @param spec
     * @param projectionType
     * @param namedEntityGraph
     * @param type
     * @param pageable
     * @param 
     * @return
     */
    @Deprecated
     Page findAll(Specification spec, Class projectionType, String namedEntityGraph, EntityGraph.EntityGraphType type, Pageable pageable);

    /**
     * Use Spring Data Annotation instead of manually provide EntityGraph.
     * @param spec
     * @param projectionClass
     * @param dynamicEntityGraph
     * @param pageable
     * @param 
     * @return
     */
    @Deprecated
     Page findAll(Specification spec, Class projectionClass, JpaEntityGraph dynamicEntityGraph, Pageable pageable);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy