Package com.atlassian.bamboo.credentials
Class CredentialsHibernateDao
java.lang.Object
org.springframework.dao.support.DaoSupport
org.springframework.orm.hibernate5.support.HibernateDaoSupport
com.atlassian.bamboo.persistence3.BambooHibernateObjectDao<MutableCredentialsData>
com.atlassian.bamboo.persistence3.BambooHibernateObjectWithOidDao<MutableCredentialsData>
com.atlassian.bamboo.credentials.CredentialsHibernateDao
- All Implemented Interfaces:
CredentialsDao,BambooObjectDao<MutableCredentialsData>,BambooObjectWithOidDao<MutableCredentialsData>,org.springframework.beans.factory.InitializingBean
public class CredentialsHibernateDao
extends BambooHibernateObjectWithOidDao<MutableCredentialsData>
implements CredentialsDao
-
Field Summary
Fields inherited from class org.springframework.dao.support.DaoSupport
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull Long@NotNull LongintdeleteByProjectId(long projectId) @NotNull Collection<? extends MutableCredentialsData> findAll()Shortcut forBambooObjectDao.findAll(Class).@NotNull Collection<? extends MutableCredentialsData> findAll(int firstResult, int maxResults) @NotNull List<? extends MutableCredentialsData> findAllByPluginKey(@NotNull String pluginKey) @NotNull Collection<? extends MutableCredentialsData> findAllByProject(Long projectId) @NotNull Collection<? extends MutableCredentialsData> findAllByProjectAndPluginKey(Long projectId, String pluginKey) @Nullable MutableCredentialsDatafindById(long id) Shortcut forBambooObjectDao.findById(long, Class).findByNameAndProjectId(String name, long projectId) @Nullable MutableCredentialsDatafindByOid(@NotNull BambooEntityOid oid) Shortcut for.invalid reference
BambooObjectWithOidDao#findByOid(BambooEntityOid, Class)@NotNull Collection<? extends MutableCredentialsData> @Nullable MutableCredentialsDatafindGlobalByName(String name) @NotNull List<? extends MutableCredentialsData> findGlobalByPluginKey(@NotNull String pluginKey) @NotNull BambooEntityOidgetMaxCredentialOid(int serverKey) @NotNull List<MutableCredentialsData> getPaginatedSharedCredentials(@Nullable Long projectId, int start, int limit, String filter) booleanhasAnyGlobalCredentials(@NotNull String pluginKey) @NotNull MutableCredentialsDatamerge(@NotNull MutableCredentialsData unmanagedEntity) Shortcut forBambooObjectDao.merge(BambooObject, Class).Methods inherited from class com.atlassian.bamboo.persistence3.BambooHibernateObjectWithOidDao
findByOidMethods 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, initDaoMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.atlassian.bamboo.persistence3.BambooObjectDao
countAll, countWithRestriction, delete, deleteAll, findAll, findAll, findById, merge, save, saveAllMethods inherited from interface com.atlassian.bamboo.persistence3.BambooObjectWithOidDao
findByOid
-
Constructor Details
-
CredentialsHibernateDao
public CredentialsHibernateDao()
-
-
Method Details
-
findAll
@NotNull public @NotNull Collection<? extends MutableCredentialsData> findAll(int firstResult, int maxResults) - Specified by:
findAllin interfaceCredentialsDao- Parameters:
firstResult-maxResults-- Returns:
- A collection of all known credentials that match given parameters
-
getMaxCredentialOid
- Specified by:
getMaxCredentialOidin interfaceCredentialsDao
-
findGlobalByName
- Specified by:
findGlobalByNamein interfaceCredentialsDao- Returns:
- global credentials that match the given name
-
findByNameAndProjectId
- Specified by:
findByNameAndProjectIdin interfaceCredentialsDao
-
findAllByProject
@NotNull public @NotNull Collection<? extends MutableCredentialsData> findAllByProject(Long projectId) - Specified by:
findAllByProjectin interfaceCredentialsDao
-
findAllByProjectAndPluginKey
@NotNull public @NotNull Collection<? extends MutableCredentialsData> findAllByProjectAndPluginKey(Long projectId, String pluginKey) - Specified by:
findAllByProjectAndPluginKeyin interfaceCredentialsDao
-
hasAnyGlobalCredentials
- Specified by:
hasAnyGlobalCredentialsin interfaceCredentialsDao- Returns:
- True if there are global credentials that match the given plugin key
-
findGlobalAll
- Specified by:
findGlobalAllin interfaceCredentialsDao- Returns:
- A list of all global credentials
-
countAllGlobalCredentials
- Specified by:
countAllGlobalCredentialsin interfaceCredentialsDao- Returns:
- a count of all global credentials
-
countAllProjectsCredentials
- Specified by:
countAllProjectsCredentialsin interfaceCredentialsDao- Returns:
- a count of all project credentials
-
findAll
Description copied from interface:CredentialsDaoShortcut forBambooObjectDao.findAll(Class).- Specified by:
findAllin interfaceCredentialsDao
-
findById
Description copied from interface:CredentialsDaoShortcut forBambooObjectDao.findById(long, Class).- Specified by:
findByIdin interfaceCredentialsDao
-
findByOid
Description copied from interface:CredentialsDaoShortcut for.invalid reference
BambooObjectWithOidDao#findByOid(BambooEntityOid, Class)- Specified by:
findByOidin interfaceCredentialsDao
-
merge
@NotNull public @NotNull MutableCredentialsData merge(@NotNull @NotNull MutableCredentialsData unmanagedEntity) Description copied from interface:CredentialsDaoShortcut forBambooObjectDao.merge(BambooObject, Class).- Specified by:
mergein interfaceCredentialsDao
-
deleteByProjectId
public int deleteByProjectId(long projectId) - Specified by:
deleteByProjectIdin interfaceCredentialsDao
-
findGlobalByPluginKey
@NotNull public @NotNull List<? extends MutableCredentialsData> findGlobalByPluginKey(@NotNull @NotNull String pluginKey) - Specified by:
findGlobalByPluginKeyin interfaceCredentialsDao- Returns:
- A list of global credentials that match the given plugin key
-
findAllByPluginKey
@NotNull public @NotNull List<? extends MutableCredentialsData> findAllByPluginKey(@NotNull @NotNull String pluginKey) - Specified by:
findAllByPluginKeyin interfaceCredentialsDao- Returns:
- A list of global and project credentials that match the given plugin key
-