Interface AccountRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<Account,
,Long> org.springframework.data.jpa.repository.JpaRepository<Account,
,Long> org.springframework.data.repository.PagingAndSortingRepository<Account,
,Long> org.springframework.data.repository.query.QueryByExampleExecutor<Account>
,org.springframework.data.repository.Repository<Account,
Long>
@Repository
public interface AccountRepository
extends org.springframework.data.jpa.repository.JpaRepository<Account,Long>
Repository for the
account
data.- See Also:
-
JpaRepository
- Implementation Note:
- Keywords
-
Method Summary
Modifier and TypeMethodDescriptionvoid
deleteByApiKey
(String apiKey) Deletes anaccount
by its api keyboolean
existsByCredStartsWith
(String cred) Checks if anaccount
with the givenusername
exists.findByApiKey
(String apiKey) Finds anaccount
by its api keyMethods 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, saveAndFlush
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
-
findByApiKey
Finds anaccount
by its api key- Parameters:
apiKey
- the api key to search for- Returns:
- the account with the given api key
-
deleteByApiKey
Deletes anaccount
by its api key- Parameters:
apiKey
- the api key to delete
-
existsByCredStartsWith
Checks if anaccount
with the givenusername
exists.- Parameters:
cred
- the username to search for- Returns:
- true if an account starts with the given username
-