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

com.kasinf.framework.rest.repository.BaseRepository Maven / Gradle / Ivy

There is a newer version: 1.4.0
Show newest version
package com.kasinf.framework.rest.repository;

import com.kasinf.framework.rest.eneity.AbstractEntity;
import com.kasinf.framework.rest.support.Searchable;
import org.springframework.data.domain.Page;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.NoRepositoryBean;

import java.io.Serializable;
import java.util.List;

/**
 * @param   查询实体
 * @param  实体主键
 * @author lkhsh
 * 基础存储库,扩展了jpa自带的方法
 */
@NoRepositoryBean
public interface BaseRepository extends JpaRepository, JpaSpecificationExecutor{

    /**
     * 查找一个
     * @param id ID
     * @return 实体
     */
    T findOne(ID id);

    void deleteInBatch(ID[] ids);

    Page findAll(Searchable searchable);

    List findList(Searchable searchable);

    long count(Searchable searchable);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy