public class MyjpaRepositoryImpl<T,ID> extends Object implements org.springframework.data.jpa.repository.JpaSpecificationExecutor<T>, MyjpaRepository<T,ID>
| 构造器和说明 |
|---|
MyjpaRepositoryImpl(Class<T> domainClass,
javax.persistence.EntityManager em,
Class repositoryInterface) |
| 限定符和类型 | 方法和说明 |
|---|---|
long |
count() |
<S extends T> |
count(org.springframework.data.domain.Example<S> example) |
long |
count(org.springframework.data.jpa.domain.Specification<T> spec) |
void |
delete(T entity) |
void |
deleteAll() |
void |
deleteAll(Iterable<? extends T> entities) |
void |
deleteAllInBatch() |
void |
deleteById(ID id) |
void |
deleteInBatch(Iterable<T> entities) |
<S extends T> |
exists(org.springframework.data.domain.Example<S> example) |
boolean |
existsById(ID id) |
List<T> |
findAll() |
<S extends T> |
findAll(org.springframework.data.domain.Example<S> example) |
<S extends T> |
findAll(org.springframework.data.domain.Example<S> example,
org.springframework.data.domain.Pageable pageable) |
<S extends T> |
findAll(org.springframework.data.domain.Example<S> example,
org.springframework.data.domain.Sort sort) |
org.springframework.data.domain.Page<T> |
findAll(org.springframework.data.domain.Pageable pageable) |
List<T> |
findAll(org.springframework.data.domain.Sort sort) |
List<T> |
findAll(org.springframework.data.jpa.domain.Specification<T> spec) |
org.springframework.data.domain.Page<T> |
findAll(org.springframework.data.jpa.domain.Specification<T> spec,
org.springframework.data.domain.Pageable pageable) |
List<T> |
findAll(org.springframework.data.jpa.domain.Specification<T> spec,
org.springframework.data.domain.Sort sort) |
List<T> |
findAllById(Iterable<ID> ids) |
Optional<T> |
findById(ID id) |
<S extends T> |
findOne(org.springframework.data.domain.Example<S> example) |
Optional<T> |
findOne(org.springframework.data.jpa.domain.Specification<T> spec) |
void |
flush() |
T |
getOne(ID id) |
<S extends T> |
save(S entity) |
<S extends T> |
saveAll(Iterable<S> entities) |
<S extends T> |
saveAndFlush(S entity) |
void |
setRepositoryMethodMetadata(org.springframework.data.jpa.repository.support.CrudMethodMetadata crudMethodMetadata)
Configures the
CrudMethodMetadata to be used with the repository. |
public org.springframework.data.domain.Page<T> findAll(org.springframework.data.domain.Pageable pageable)
public void deleteById(ID id)
public void delete(T entity)
public void deleteAll()
@Transactional public <S extends T> S save(S entity)
public boolean existsById(ID id)
public void flush()
public <S extends T> S saveAndFlush(S entity)
public void deleteAllInBatch()
public <S extends T> Optional<S> findOne(org.springframework.data.domain.Example<S> example)
findOne 在接口中 org.springframework.data.repository.query.QueryByExampleExecutor<T>public <S extends T> List<S> findAll(org.springframework.data.domain.Example<S> example, org.springframework.data.domain.Sort sort)
public <S extends T> org.springframework.data.domain.Page<S> findAll(org.springframework.data.domain.Example<S> example, org.springframework.data.domain.Pageable pageable)
findAll 在接口中 org.springframework.data.repository.query.QueryByExampleExecutor<T>public <S extends T> long count(org.springframework.data.domain.Example<S> example)
count 在接口中 org.springframework.data.repository.query.QueryByExampleExecutor<T>public <S extends T> boolean exists(org.springframework.data.domain.Example<S> example)
exists 在接口中 org.springframework.data.repository.query.QueryByExampleExecutor<T>public Optional<T> findOne(org.springframework.data.jpa.domain.Specification<T> spec)
findOne 在接口中 org.springframework.data.jpa.repository.JpaSpecificationExecutor<T>public List<T> findAll(org.springframework.data.jpa.domain.Specification<T> spec)
findAll 在接口中 org.springframework.data.jpa.repository.JpaSpecificationExecutor<T>public org.springframework.data.domain.Page<T> findAll(org.springframework.data.jpa.domain.Specification<T> spec, org.springframework.data.domain.Pageable pageable)
findAll 在接口中 org.springframework.data.jpa.repository.JpaSpecificationExecutor<T>public List<T> findAll(org.springframework.data.jpa.domain.Specification<T> spec, org.springframework.data.domain.Sort sort)
findAll 在接口中 org.springframework.data.jpa.repository.JpaSpecificationExecutor<T>public long count(org.springframework.data.jpa.domain.Specification<T> spec)
count 在接口中 org.springframework.data.jpa.repository.JpaSpecificationExecutor<T>public void setRepositoryMethodMetadata(org.springframework.data.jpa.repository.support.CrudMethodMetadata crudMethodMetadata)
CrudMethodMetadata to be used with the repository.Copyright © 2020. All rights reserved.