com.sneakxy.mybatis.commons.repository.ExpandRepository Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spring-data-mybatis Show documentation
Show all versions of spring-data-mybatis Show documentation
使用spring-data-commons实现mybatis应用
The newest version!
package com.sneakxy.mybatis.commons.repository;
import java.io.Serializable;
import java.util.List;
import java.util.Optional;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.data.repository.NoRepositoryBean;
import org.springframework.data.repository.Repository;
import com.sneakxy.mybatis.commons.repository.query.domain.Criteria;
/**
* @author 潜行的虚影
*/
@NoRepositoryBean
public interface ExpandRepository extends Repository {
String getTableName();
S save(S entity, String table_name);
void update(S entity, String table_name, Criteria criteria);
void deleteById(ID id, String table_name);
void delete(Criteria criteria, String table_name);
boolean existsById(ID id, String table_name);
boolean exists(Criteria criteria, String table_name);
Optional findById(ID id, String table_name);
T findOne(Criteria criteria, String table_name);
List findAll(Criteria criteria, String table_name);
Page findAll(Criteria criteria, String table_name, Pageable pageable);
List findAll(Criteria criteria, String table_name, Sort sort);
long count(Criteria criteria, String table_name);
long count(String table_name);
Iterable findAll(String table_name);
Iterable findAll(String table_name, Sort sort);
Page findAll(String table_name, Pageable pageable);
void deleteAll(String table_name);
boolean isNew(T entity);
}