Package com.atlassian.bamboo.agent
Class PerAgentTokenHibernateDao
java.lang.Object
org.springframework.dao.support.DaoSupport
org.springframework.orm.hibernate5.support.HibernateDaoSupport
com.atlassian.bamboo.persistence3.BambooHibernateObjectDao<PerAgentToken>
com.atlassian.bamboo.agent.PerAgentTokenHibernateDao
- All Implemented Interfaces:
PerAgentTokenDao,BambooObjectDao<PerAgentToken>,org.springframework.beans.factory.InitializingBean
public class PerAgentTokenHibernateDao
extends BambooHibernateObjectDao<PerAgentToken>
implements PerAgentTokenDao
-
Field Summary
Fields inherited from class org.springframework.dao.support.DaoSupport
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidDeletes all tokens for a given result key created before the passed timestamp.booleanChecks if token is valid for a given result key.booleanisValidForAnyResultKey(@NotNull String token) Checks if token is valid for any result key.voidSaves token for a given result key.Methods inherited from class com.atlassian.bamboo.persistence3.BambooHibernateObjectDao
convertSearchTermToLikeExpression, countAll, countWithRestriction, delete, deleteAll, executeCountQuery, findAll, findAll, findById, merge, save, saveAllMethods inherited from class org.springframework.orm.hibernate5.support.HibernateDaoSupport
checkDaoConfig, createHibernateTemplate, currentSession, getHibernateTemplate, getSessionFactory, setHibernateTemplate, setSessionFactoryMethods inherited from class org.springframework.dao.support.DaoSupport
afterPropertiesSet, initDao
-
Constructor Details
-
PerAgentTokenHibernateDao
public PerAgentTokenHibernateDao()
-
-
Method Details
-
save
Description copied from interface:PerAgentTokenDaoSaves token for a given result key.- Specified by:
savein interfacePerAgentTokenDao- Parameters:
resultKey- result keytoken- token
-
isValid
Description copied from interface:PerAgentTokenDaoChecks if token is valid for a given result key.- Specified by:
isValidin interfacePerAgentTokenDao- Parameters:
resultKey- result keytoken- token- Returns:
- true if token is valid, false otherwise
-
isValidForAnyResultKey
Description copied from interface:PerAgentTokenDaoChecks if token is valid for any result key.- Specified by:
isValidForAnyResultKeyin interfacePerAgentTokenDao- Parameters:
token- token- Returns:
- true if token is valid, false otherwise
-
delete
Description copied from interface:PerAgentTokenDaoDeletes all tokens for a given result key created before the passed timestamp.- Specified by:
deletein interfacePerAgentTokenDao- Parameters:
resultKey- result keydueTimestamp- due timestamp
-