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 Type
    Method
    Description
    findByStatus(Status statusId)
    Getting firm by status.
    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.
    Get firm control is in BBDD.
    <S extends FirmControl>
    S
    saveAndFlush(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, save

    Methods inherited from interface org.springframework.data.jpa.repository.JpaRepository

    deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, findAll, findAllById, flush, getById, getOne, getReferenceById, saveAll, saveAllAndFlush

    Methods inherited from interface org.springframework.data.repository.PagingAndSortingRepository

    findAll

    Methods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor

    count, exists, findAll, findBy, findOne
  • Method Details

    • findOneById

      FirmControl findOneById(@Param("id") String id)
      Get firm control is in BBDD.
      Parameters:
      id - id of firm control
      Returns:
      firmControl object if it is possiblr to find.
    • saveAndFlush

      <S extends FirmControl> S saveAndFlush(S entity)
      Saves an entity and flushes changes instantly.
      Specified by:
      saveAndFlush in interface org.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

      List<FirmControl> findByStatus(Status statusId)
      Getting firm by status.
      Parameters:
      statusId - status id.
      Returns:
      the firm.