Interface CodeRepository

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

public interface CodeRepository extends org.springframework.data.jpa.repository.JpaRepository<Code,Long>
Repository for managing Code entities. Provides database access methods for verification codes.
Since:
1.0.0
Version:
1.0.0, 06/23/2025
Author:
Fernando Cruz Cavina
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    Finds all verification codes associated with the given key.

    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

    • findByKeyCode

      Optional<List<Code>> findByKeyCode(String key)
      Finds all verification codes associated with the given key.
      Parameters:
      key - the key (e.g., email) associated with the verification codes
      Returns:
      an optional list of codes, or empty if none found