Interface TermsRepository

All Superinterfaces:
org.springframework.data.repository.CrudRepository<TermsOfService, Long>, org.springframework.data.jpa.repository.JpaRepository<TermsOfService, Long>, org.springframework.data.repository.ListCrudRepository<TermsOfService, Long>, org.springframework.data.repository.ListPagingAndSortingRepository<TermsOfService, Long>, org.springframework.data.repository.PagingAndSortingRepository<TermsOfService, Long>, org.springframework.data.repository.query.QueryByExampleExecutor<TermsOfService>, org.springframework.data.repository.Repository<TermsOfService, Long>

@Repository public interface TermsRepository extends org.springframework.data.jpa.repository.JpaRepository<TermsOfService, Long>
Repositório para Termos de Serviço.

Propósito: Gerenciar a persistência e recuperação de contratos legais da plataforma.

  • Method Summary

    Modifier and Type
    Method
    Description
    Busca o termo de serviço atualmente ativo.
    Busca um termo de serviço por versão específica.

    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, flush, getById, getOne, getReferenceById, saveAllAndFlush, saveAndFlush

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

    findAll, findAllById, saveAll

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

    findAll

    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

    • findByIsActiveTrue

      Optional<TermsOfService> findByIsActiveTrue()
      Busca o termo de serviço atualmente ativo.
      Returns:
      O termo ativo, se existir.
    • findByVersion

      Optional<TermsOfService> findByVersion(String version)
      Busca um termo de serviço por versão específica.
      Parameters:
      version - A versão (ex: "v1.0").
      Returns:
      O termo, se existir.