public class HibernateAccessTokenDao extends BambooHibernateObjectDao<MutableAccessToken> implements AccessTokenDao
| Constructor and Description |
|---|
HibernateAccessTokenDao() |
| Modifier and Type | Method and Description |
|---|---|
long |
countByUserName(String userName) |
long |
countTokensWithPermission(@NotNull AccessTokenPermission accessTokenPermission)
Count number of access tokens with given permission
|
void |
deleteByUserName(String userName)
Delete all user's tokens
|
@NotNull Optional<MutableAccessToken> |
findByTokenId(String tokenId) |
@NotNull List<MutableAccessToken> |
findByUserName(String userName)
Get all user's tokens
|
long |
scrollTokensForExport(@NotNull Consumer<MutableAccessToken> consumer)
Scroll through all AccessToken records and pass them to consumer
|
boolean |
tokenWithNameAndUserNameExists(@NotNull String userName,
@NotNull 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 @NotNull Optional<MutableAccessToken> findByTokenId(String tokenId)
findByTokenId in interface AccessTokenDaoOptional.empty()@NotNull public @NotNull 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
@NotNull String userName,
@NotNull
@NotNull String tokenName)
AccessTokenDaotokenWithNameAndUserNameExists in interface AccessTokenDaopublic long scrollTokensForExport(@NotNull
@NotNull Consumer<MutableAccessToken> consumer)
AccessTokenDaoscrollTokensForExport in interface AccessTokenDaopublic long countTokensWithPermission(@NotNull
@NotNull AccessTokenPermission accessTokenPermission)
AccessTokenDaocountTokensWithPermission in interface AccessTokenDaoCopyright © 2022 Atlassian Software Systems Pty Ltd. All rights reserved.