public class StoragePoolDAODbFacadeImpl extends BaseDAODbFacade implements StoragePoolDAO
StoragePoolDAODbFacadeImpl
provides a concrete implementation of StoragePoolDAO
based on code
from DbFacade
.dbFacade, dialect, jdbcTemplate, RETURN_VALUE_PARAMETER
Constructor and Description |
---|
StoragePoolDAODbFacadeImpl() |
Modifier and Type | Method and Description |
---|---|
storage_pool |
get(Guid id)
Retrieves the entity with the given id.
|
List<storage_pool> |
getAll()
Retrieves all the entities of type
T . |
List<storage_pool> |
getAllForStorageDomain(Guid id)
Retrieves all storage pools for the given storage domain.
|
List<storage_pool> |
getAllOfType(StorageType type)
Retrieves the list of all storage pools of a given type.
|
List<storage_pool> |
getAllWithQuery(String query)
Retrieves all storage pools that satisfy the given SQL query.
|
storage_pool |
getByName(String name)
Retrieves the storage pool with the given name.
|
List<storage_pool> |
getDataCentersWithPermittedActionOnClusters(Guid userId,
ActionGroup actionGroup)
Retrieves data centers containing clusters with permissions to perform the given action.
|
storage_pool |
getForVds(Guid vds)
Retrieves the storage pool for the specified VDS.
|
storage_pool |
getForVdsGroup(Guid id)
Retrieves the storage pool for the specified VDS group.
|
void |
remove(Guid id)
Removes the entity with the given id from the underlying store of data.
|
void |
save(storage_pool pool)
Persist a new instance of the entity.
|
void |
update(storage_pool pool)
Update an existing entity with data from the given instance.
|
void |
updatePartial(storage_pool pool)
The following method should update only part of storage pool.
|
void |
updateStatus(Guid id,
StoragePoolStatus status)
Update the entity's status field only.
|
getCallsHandler, getCustomMapSqlParameterSource, setDbFacade, setDialect, setTemplate
public storage_pool get(Guid id)
ReadDao
get
in interface ReadDao<storage_pool,Guid>
id
- The id to look by (can't be null
).null
if not found.public storage_pool getByName(String name)
StoragePoolDAO
getByName
in interface StoragePoolDAO
name
- the storage pool namepublic storage_pool getForVds(Guid vds)
StoragePoolDAO
getForVds
in interface StoragePoolDAO
vds
- the VDSpublic storage_pool getForVdsGroup(Guid id)
StoragePoolDAO
getForVdsGroup
in interface StoragePoolDAO
id
- the VDS grouppublic List<storage_pool> getAll()
ReadDao
T
.getAll
in interface ReadDao<storage_pool,Guid>
public List<storage_pool> getAllOfType(StorageType type)
StoragePoolDAO
getAllOfType
in interface StoragePoolDAO
type
- the storage pool typepublic List<storage_pool> getAllForStorageDomain(Guid id)
StoragePoolDAO
getAllForStorageDomain
in interface StoragePoolDAO
id
- the storage domainpublic List<storage_pool> getAllWithQuery(String query)
StoragePoolDAO
getAllWithQuery
in interface StoragePoolDAO
query
- the querypublic void save(storage_pool pool)
ModificationDao
save
in interface ModificationDao<storage_pool,Guid>
pool
- The entity to persist (can't be null
).public void update(storage_pool pool)
ModificationDao
update
in interface ModificationDao<storage_pool,Guid>
pool
- The entity instance, containing data to update (can't be null
).public void updatePartial(storage_pool pool)
StoragePoolDAO
updatePartial
in interface StoragePoolDAO
public void updateStatus(Guid id, StoragePoolStatus status)
StatusAwareDao
updateStatus
in interface StatusAwareDao<Guid,StoragePoolStatus>
id
- The id of the entity for which to update the status field.status
- The status to update to.public void remove(Guid id)
ModificationDao
remove
in interface ModificationDao<storage_pool,Guid>
id
- The id of the entity to remove (can't be null
).public List<storage_pool> getDataCentersWithPermittedActionOnClusters(Guid userId, ActionGroup actionGroup)
StoragePoolDAO
getDataCentersWithPermittedActionOnClusters
in interface StoragePoolDAO
Copyright © 2012. All Rights Reserved.