public class HibernateAccessTokenDao extends BambooHibernateObjectDao<MutableAccessToken> implements AccessTokenDao
| Constructor and Description |
|---|
HibernateAccessTokenDao() |
| Modifier and Type | Method and Description |
|---|---|
long |
countByUserName(String userName) |
long |
countTokensWithPermission(AccessTokenPermission accessTokenPermission)
Count number of access tokens with given permission
|
void |
deleteByUserName(String userName)
Delete all user's tokens
|
Optional<MutableAccessToken> |
findByTokenId(String tokenId) |
List<MutableAccessToken> |
findByUserName(String userName)
Get all user's tokens
|
long |
scrollTokensForExport(Consumer<MutableAccessToken> consumer)
Scroll through all AccessToken records and pass them to consumer
|
boolean |
tokenWithNameAndUserNameExists(String userName,
String tokenName)
Check if user has token with name
|
countAll, countWithRestriction, delete, deleteAll, executeCountQuery, findAll, findById, merge, save, saveAllgetCacheAwareHibernateTemplatecheckDaoConfig, createHibernateTemplate, currentSession, getHibernateTemplate, getSessionFactory, setHibernateTemplate, setSessionFactoryclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcountAll, countWithRestriction, delete, deleteAll, findAll, findById, merge, save, saveAll@NotNull public Optional<MutableAccessToken> findByTokenId(String tokenId)
findByTokenId in interface AccessTokenDaoOptional.empty()@NotNull public List<MutableAccessToken> findByUserName(String userName)
AccessTokenDaofindByUserName in interface AccessTokenDaopublic void deleteByUserName(String userName)
AccessTokenDaodeleteByUserName in interface AccessTokenDaopublic long countByUserName(String userName)
countByUserName in interface AccessTokenDaopublic boolean tokenWithNameAndUserNameExists(@NotNull
String userName,
@NotNull
String tokenName)
AccessTokenDaotokenWithNameAndUserNameExists in interface AccessTokenDaopublic long scrollTokensForExport(@NotNull
Consumer<MutableAccessToken> consumer)
AccessTokenDaoscrollTokensForExport in interface AccessTokenDaopublic long countTokensWithPermission(@NotNull
AccessTokenPermission accessTokenPermission)
AccessTokenDaocountTokensWithPermission in interface AccessTokenDaoCopyright © 2021 Atlassian Software Systems Pty Ltd. All rights reserved.