Package com.atlassian.bamboo.webhook
Class WebhookTemplateHibernateDao
- java.lang.Object
-
- org.springframework.dao.support.DaoSupport
-
- org.springframework.orm.hibernate5.support.HibernateDaoSupport
-
- com.atlassian.bamboo.persistence3.StatelessSessionHibernateDaoSupport
-
- com.atlassian.bamboo.persistence3.BambooHibernateObjectDao<WebhookTemplate>
-
- com.atlassian.bamboo.webhook.WebhookTemplateHibernateDao
-
- All Implemented Interfaces:
BambooObjectDao<WebhookTemplate>
,WebhookTemplateDao
,org.springframework.beans.factory.InitializingBean
public class WebhookTemplateHibernateDao extends BambooHibernateObjectDao<WebhookTemplate> implements WebhookTemplateDao
-
-
Constructor Summary
Constructors Constructor Description WebhookTemplateHibernateDao()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deleteById(long id)
Deletes webhooktemplate with given idboolean
exists(String webhookName)
Check if webhook with given name existsOptional<WebhookTemplate>
findByUuid(UUID uuid)
List<WebhookTemplate>
findGlobalTemplates()
Return all Global webhook templates which are specified in Global administrationOptional<UUID>
findUuidByName(String webhookName)
Returns uuid of webhook with given namelong
scrollTokensForExport(@NotNull Consumer<WebhookTemplate> consumer)
Scroll through all AccessToken records and pass them to consumer-
Methods inherited from class com.atlassian.bamboo.persistence3.BambooHibernateObjectDao
convertSearchTermToLikeExpression, countAll, countWithRestriction, delete, deleteAll, executeCountQuery, findAll, findById, merge, save, saveAll
-
Methods inherited from class com.atlassian.bamboo.persistence3.StatelessSessionHibernateDaoSupport
getCacheAwareHibernateTemplate
-
Methods inherited from class org.springframework.orm.hibernate5.support.HibernateDaoSupport
checkDaoConfig, createHibernateTemplate, currentSession, getHibernateTemplate, getSessionFactory, setHibernateTemplate, setSessionFactory
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.atlassian.bamboo.persistence3.BambooObjectDao
countAll, countWithRestriction, delete, deleteAll, findAll, findById, merge, save, saveAll
-
-
-
-
Method Detail
-
findGlobalTemplates
public List<WebhookTemplate> findGlobalTemplates()
Description copied from interface:WebhookTemplateDao
Return all Global webhook templates which are specified in Global administration- Specified by:
findGlobalTemplates
in interfaceWebhookTemplateDao
- Returns:
-
deleteById
public void deleteById(long id)
Description copied from interface:WebhookTemplateDao
Deletes webhooktemplate with given id- Specified by:
deleteById
in interfaceWebhookTemplateDao
-
exists
public boolean exists(String webhookName)
Description copied from interface:WebhookTemplateDao
Check if webhook with given name exists- Specified by:
exists
in interfaceWebhookTemplateDao
- Returns:
- true if exists, otherwise false
-
findUuidByName
public Optional<UUID> findUuidByName(String webhookName)
Description copied from interface:WebhookTemplateDao
Returns uuid of webhook with given name- Specified by:
findUuidByName
in interfaceWebhookTemplateDao
- Returns:
-
scrollTokensForExport
public long scrollTokensForExport(@NotNull @NotNull Consumer<WebhookTemplate> consumer)
Description copied from interface:WebhookTemplateDao
Scroll through all AccessToken records and pass them to consumer- Specified by:
scrollTokensForExport
in interfaceWebhookTemplateDao
-
findByUuid
public Optional<WebhookTemplate> findByUuid(UUID uuid)
- Specified by:
findByUuid
in interfaceWebhookTemplateDao
-
-