com.atlassian.bamboo.agent.elastic.server
Class ElasticImageConfigurationHibernateDao
java.lang.Object
org.springframework.dao.support.DaoSupport
org.springframework.orm.hibernate.support.HibernateDaoSupport
com.atlassian.hibernate.HibernateObjectDao
com.atlassian.bamboo.persistence.BambooHibernateObjectDao
com.atlassian.bamboo.agent.elastic.server.ElasticImageConfigurationHibernateDao
- All Implemented Interfaces:
- bucket.core.persistence.ObjectDao, ElasticImageConfigurationDao, BambooObjectDao, org.springframework.beans.factory.InitializingBean
public class ElasticImageConfigurationHibernateDao
- extends BambooHibernateObjectDao
- implements ElasticImageConfigurationDao
Fields inherited from class org.springframework.dao.support.DaoSupport |
logger |
Methods inherited from class com.atlassian.hibernate.HibernateObjectDao |
findAll, findAllSorted, findNamedQuery, findNamedQuery, findNamedQuery, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findSingleObject, getByClassId, index, refresh, reIndex, remove, replicate, save, saveRaw, setIndexer, unIndex, updateModificationData |
Methods inherited from class org.springframework.orm.hibernate.support.HibernateDaoSupport |
checkDaoConfig, convertHibernateAccessException, createHibernateTemplate, getHibernateTemplate, getSession, getSession, getSessionFactory, releaseSession, setHibernateTemplate, setSessionFactory |
Methods inherited from class org.springframework.dao.support.DaoSupport |
afterPropertiesSet, initDao |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface bucket.core.persistence.ObjectDao |
findAll, findAllSorted, refresh, remove, replicate, save, saveRaw |
ElasticImageConfigurationHibernateDao
public ElasticImageConfigurationHibernateDao()
getAll
@NotNull
public java.util.List<ElasticImageConfiguration> getAll()
- Description copied from interface:
ElasticImageConfigurationDao
- Get all Elastic Image Configuration objects
- Specified by:
getAll
in interface ElasticImageConfigurationDao
- Returns:
- Collection of Elastic Image Configuration objects (empty if none found)
getElasticAgentCountForImageConfigurationId
public int getElasticAgentCountForImageConfigurationId(long id)
- Description copied from interface:
ElasticImageConfigurationDao
- Returns all elastic agents associated with a specific image configuration
- Specified by:
getElasticAgentCountForImageConfigurationId
in interface ElasticImageConfigurationDao
- Parameters:
id
- for the image configuration
- Returns:
- count of the elastic agent associated with the given image configuration
getElasticAgentsForImageConfigurationId
public java.util.List<ElasticAgentDefinition> getElasticAgentsForImageConfigurationId(long id)
- Description copied from interface:
ElasticImageConfigurationDao
- Retrieves a list of elastic agenst associated with the given elastic image configuration
- Specified by:
getElasticAgentsForImageConfigurationId
in interface ElasticImageConfigurationDao
- Parameters:
id
- of the elasticImageConfiguration
- Returns:
- List
getElasticImageConfigurationByAmi
public java.util.List<ElasticImageConfiguration> getElasticImageConfigurationByAmi(java.lang.String amiId)
- Retrieves a list of all elastic image configurations that use a specific image.
- Specified by:
getElasticImageConfigurationByAmi
in interface ElasticImageConfigurationDao
- Parameters:
amiId
- to filter with
- Returns:
- list of ElasticAgentDefinition objects that use the given amiID
getBuildCountForImageConfigurationId
public int getBuildCountForImageConfigurationId(long id)
- Description copied from interface:
ElasticImageConfigurationDao
- Get the number of elastic agents associated with a given image configuration
- Specified by:
getBuildCountForImageConfigurationId
in interface ElasticImageConfigurationDao
- Parameters:
id
- for the image configuration
- Returns:
- count of the builds associated with the given image configuration
getPersistentClass
public java.lang.Class<ElasticImageConfigurationImpl> getPersistentClass()
- Specified by:
getPersistentClass
in interface bucket.core.persistence.ObjectDao
save
public void save(@NotNull
ElasticImageConfiguration elasticImageConfiguration)
- Specified by:
save
in interface ElasticImageConfigurationDao
remove
public void remove(@NotNull
ElasticImageConfiguration elasticImageConfiguration)
- Specified by:
remove
in interface ElasticImageConfigurationDao
getShippedWithBamboo
@Nullable
public ElasticImageConfiguration getShippedWithBamboo()
- Specified by:
getShippedWithBamboo
in interface ElasticImageConfigurationDao
- Returns:
getImages
public java.util.List<ElasticImageConfiguration> getImages(@Nullable
com.atlassian.aws.ec2.awssdk.AwsSupportConstants.Region region,
@Nullable
com.atlassian.aws.ec2.awssdk.AwsSupportConstants.RootDeviceType rootDeviceType,
@Nullable
com.atlassian.aws.ec2.awssdk.AwsSupportConstants.Architecture architecture,
@Nullable
com.atlassian.aws.ec2.awssdk.AwsSupportConstants.Platform platform,
@Nullable
java.lang.Boolean isShippedWithBamboo)
- Specified by:
getImages
in interface ElasticImageConfigurationDao
getElasticImageConfigurationByName
public ElasticImageConfiguration getElasticImageConfigurationByName(java.lang.String name)
- Description copied from interface:
ElasticImageConfigurationDao
- Finds an elastic configuration by name.
- Specified by:
getElasticImageConfigurationByName
in interface ElasticImageConfigurationDao
- Parameters:
name
- to look for
- Returns:
- the elasticConfig with the given name.
findById
public ElasticImageConfiguration findById(long id)
- Description copied from interface:
BambooObjectDao
- Gets the object from its id
- Specified by:
findById
in interface ElasticImageConfigurationDao
- Specified by:
findById
in interface BambooObjectDao
- Overrides:
findById
in class BambooHibernateObjectDao
- Parameters:
id
- Elastic Image Configuration's id
- Returns:
- A
BambooObject
. null if not found.
Copyright © 2012 Atlassian. All Rights Reserved.