Interface CredentialRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<CredentialEntity, Long>, org.springframework.data.jpa.repository.JpaRepository<CredentialEntity, Long>, org.springframework.data.repository.ListCrudRepository<CredentialEntity, Long>, org.springframework.data.repository.ListPagingAndSortingRepository<CredentialEntity, Long>, org.springframework.data.repository.PagingAndSortingRepository<CredentialEntity, Long>, org.springframework.data.repository.query.QueryByExampleExecutor<CredentialEntity>, org.springframework.data.repository.Repository<CredentialEntity, Long>
@Repository
public interface CredentialRepository
extends org.springframework.data.jpa.repository.JpaRepository<CredentialEntity, Long>
Repository for Credential entities.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanexistsByName(String name) Check if credential with name exists.findByName(String name) Find credential by name.Find credentials by name containing (search).findByType(ai.nervemind.common.enums.CredentialType type) Find credentials by type.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, flush, getById, getOne, getReferenceById, saveAllAndFlush, saveAndFlushMethods inherited from interface org.springframework.data.repository.ListCrudRepository
findAll, findAllById, saveAllMethods inherited from interface org.springframework.data.repository.ListPagingAndSortingRepository
findAllMethods 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
-
findByName
Find credential by name.- Parameters:
name- The unique name of the credential- Returns:
- an Optional containing the entity if found
-
findByType
Find credentials by type.- Parameters:
type- The type of credentials to search for- Returns:
- a list of matching credentials
-
findByNameContainingIgnoreCase
Find credentials by name containing (search).- Parameters:
name- The name fragment to search for- Returns:
- a list of matching credentials
-
existsByName
Check if credential with name exists.- Parameters:
name- The name to check- Returns:
- true if a credential with this name exists
-