it.reply.healty.innovapuglia.mstaccuino.database.repository

## Interface UnitaDiMisuraRepository

- All Superinterfaces:
    org.springframework.data.repository.CrudRepository<UnitaDiMisura,String>, org.springframework.data.jpa.repository.JpaRepository<UnitaDiMisura,String>, org.springframework.data.repository.PagingAndSortingRepository<UnitaDiMisura,String>, org.springframework.data.repository.query.QueryByExampleExecutor<UnitaDiMisura>, org.springframework.data.repository.Repository<UnitaDiMisura,String>

      @Repository
      public interface UnitaDiMisuraRepository
      extends org.springframework.data.jpa.repository.JpaRepository<UnitaDiMisura,String>

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `List<UnitaDiMisura>` | `findAllActive()` Recupera le unita di misura attive.
    `UnitaDiMisura` | `findOneActiveById(String id)` Recupera un UnitaDiMisura attivo tramite il suo ID.

    - ### 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, saveAndFlush`

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

      `findAll`

    - ### 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.repository.query.QueryByExampleExecutor

      `count, exists, findAll, findBy, findOne`

- - ### Method Detail

    - #### findAllActive

          @Query(value="FROM UnitaDiMisura t WHERE t.attivo = true")
          List<UnitaDiMisura> findAllActive()

      Recupera le unita di misura attive.
      Returns:
        L'elenco delle UnitaDiMisura attive.

    - #### findOneActiveById

          @Query(value="FROM UnitaDiMisura t WHERE t.id = :id AND t.attivo = true")
          UnitaDiMisura findOneActiveById(@Param(value="id")
                                                                                                                     String id)

      Recupera un UnitaDiMisura attivo tramite il suo ID.
      Parameters:
        `id` - l'identificativo del UnitaDiMisura attivo
      Returns:
        il UnitaDiMisura attivo, o null se non trovato

Copyright © 2024. All rights reserved.