Interface FirmControlRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<FirmControl,,String> org.springframework.data.jpa.repository.JpaRepository<FirmControl,,String> org.springframework.data.repository.PagingAndSortingRepository<FirmControl,,String> org.springframework.data.repository.query.QueryByExampleExecutor<FirmControl>,org.springframework.data.repository.Repository<FirmControl,String>
@Repository
public interface FirmControlRepository
extends org.springframework.data.jpa.repository.JpaRepository<FirmControl,String>
Repository interface to do queries for FirmControl data.
-
Method Summary
Modifier and TypeMethodDescriptionfindByStatus(Status statusId) Getting firm by status.findByUser(String userId) Getting firm by User.org.springframework.data.domain.Page<FirmControl>findByUserAndStatus(String userId, Integer statusId, org.springframework.data.domain.Pageable pageable) Getting firm by User.org.springframework.data.domain.Page<FirmControl>findByUserPage(String userId, org.springframework.data.domain.Pageable pageable) Getting firm by User.findOneById(String id) Get firm control is in BBDD.<S extends FirmControl>
SsaveAndFlush(S entity) Saves an entity and flushes changes instantly.Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, saveMethods inherited from interface org.springframework.data.jpa.repository.JpaRepository
deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, findAll, findAllById, flush, getById, getOne, getReferenceById, saveAll, saveAllAndFlushMethods inherited from interface org.springframework.data.repository.PagingAndSortingRepository
findAllMethods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor
count, exists, findAll, findBy, findOne
-
Method Details
-
findOneById
Get firm control is in BBDD.- Parameters:
id- id of firm control- Returns:
- firmControl object if it is possiblr to find.
-
saveAndFlush
Saves an entity and flushes changes instantly.- Specified by:
saveAndFlushin interfaceorg.springframework.data.jpa.repository.JpaRepository<FirmControl,String> - Parameters:
entity- firmControl entity to save.- Returns:
- the saved entity
-
findByUserPage
@Query("select s from FirmControl s inner join s.operationTypeBackoffice opb inner join opb.operationTypeId ot where ot.resume=true and s.user.id=?1") org.springframework.data.domain.Page<FirmControl> findByUserPage(String userId, org.springframework.data.domain.Pageable pageable) Getting firm by User.- Parameters:
userId- core user Id.pageable- pageable.- Returns:
- the firm.
-
findByUser
@Query("select s from FirmControl s inner join s.operationTypeBackoffice opb inner join opb.operationTypeId ot where ot.resume=true and s.user.id=?1") List<FirmControl> findByUser(String userId) Getting firm by User.- Parameters:
userId- core user Id.- Returns:
- the firm.
-
findByUserAndStatus
@Query("select s from FirmControl s inner join s.operationTypeBackoffice opb inner join opb.operationTypeId ot where ot.resume=true and s.user.id=?1 and s.status.id=?2") org.springframework.data.domain.Page<FirmControl> findByUserAndStatus(String userId, Integer statusId, org.springframework.data.domain.Pageable pageable) Getting firm by User.- Parameters:
userId- core user Id.statusId- status id.pageable- pageable.- Returns:
- the firm.
-
findByStatus
Getting firm by status.- Parameters:
statusId- status id.- Returns:
- the firm.
-