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 TypeMethodDescriptionvoiddeleteByApiKey(String apiKey) Deletes anaccountby its api keybooleanexistsByCredStartsWith(String cred) Checks if anaccountwith the givenusernameexists.findByApiKey(String apiKey) Finds anaccountby its api keyMethods 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, findAll, findAll, findAllById, flush, getById, getOne, getReferenceById, saveAll, saveAllAndFlush, saveAndFlushMethods 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
-
findByApiKey
Finds anaccountby its api key- Parameters:
apiKey- the api key to search for- Returns:
- the account with the given api key
-
deleteByApiKey
Deletes anaccountby its api key- Parameters:
apiKey- the api key to delete
-
existsByCredStartsWith
Checks if anaccountwith the givenusernameexists.- Parameters:
cred- the username to search for- Returns:
- true if an account starts with the given username
-