public class DiskImageDAODbFacadeImpl extends BaseDAODbFacade implements DiskImageDAO
DiskImageDAODbFacadeImpl
provides an implementation of DiskImageDAO
that uses previously
developed code from DbFacade
.dbFacade, dialect, jdbcTemplate, RETURN_VALUE_PARAMETER
Constructor and Description |
---|
DiskImageDAODbFacadeImpl() |
Modifier and Type | Method and Description |
---|---|
void |
addImageVmPoolMap(image_vm_pool_map map) |
void |
addStatelessVmImageMap(stateless_vm_image_map map) |
DiskImage |
get(Guid id)
Retrieves the entity with the given id.
|
List<DiskImage> |
getAll()
Retrieves all the entities of type
T . |
List<DiskImage> |
getAllForVm(Guid id)
Retrieves all disk images for the specified virtual machine id.
|
List<DiskImage> |
getAllSnapshotsForImageGroup(Guid id)
Retrieves all snapshots associated with the given image group.
|
List<DiskImage> |
getAllSnapshotsForParent(Guid id)
Retrieves all snapshots with the given parent id.
|
List<DiskImage> |
getAllSnapshotsForStorageDomain(Guid id)
Retrieves all snapshots associated with the given storage domain.
|
List<DiskImage> |
getAllSnapshotsForVmSnapshot(Guid id)
Retrieves all snapshots associated with given snapshot id.
|
List<stateless_vm_image_map> |
getAllStatelessVmImageMapsForVm(Guid vmId) |
DiskImage |
getAncestor(Guid id)
Retrieves the ancestor of the given image (or the image itself, if it has no ancestors).
|
image_vm_pool_map |
getImageVmPoolMapByImageId(Guid imageId) |
List<image_vm_pool_map> |
getImageVmPoolMapByVmId(Guid vmId) |
DiskImage |
getSnapshotById(Guid id)
Retrieves the snapshot with the specified id.
|
stateless_vm_image_map |
getStatelessVmImageMapForImageId(Guid imageId) |
void |
remove(Guid id)
Removes the entity with the given id from the underlying store of data.
|
void |
removeAllForVmId(Guid id)
Removes all disk images for the specified virtual machine id.
|
void |
removeImageVmPoolMap(Guid imageId) |
void |
removeStatelessVmImageMap(Guid imageId) |
void |
save(DiskImage image)
Persist a new instance of the entity.
|
void |
update(DiskImage image)
Update an existing entity with data from the given instance.
|
getCallsHandler, getCustomMapSqlParameterSource, setDbFacade, setDialect, setTemplate
public DiskImage get(Guid id)
ReadDao
public DiskImage getSnapshotById(Guid id)
DiskImageDAO
getSnapshotById
in interface DiskImageDAO
id
- the idpublic List<DiskImage> getAllForVm(Guid id)
DiskImageDAO
getAllForVm
in interface DiskImageDAO
id
- the VM idpublic List<DiskImage> getAllSnapshotsForParent(Guid id)
DiskImageDAO
getAllSnapshotsForParent
in interface DiskImageDAO
id
- the parent idpublic List<DiskImage> getAllSnapshotsForStorageDomain(Guid id)
DiskImageDAO
getAllSnapshotsForStorageDomain
in interface DiskImageDAO
id
- the storage domain idpublic List<DiskImage> getAllSnapshotsForVmSnapshot(Guid id)
DiskImageDAO
getAllSnapshotsForVmSnapshot
in interface DiskImageDAO
id
- the snapshot idpublic List<DiskImage> getAllSnapshotsForImageGroup(Guid id)
DiskImageDAO
getAllSnapshotsForImageGroup
in interface DiskImageDAO
id
- the image group idpublic List<DiskImage> getAll()
ReadDao
T
.public void save(DiskImage image)
ModificationDao
save
in interface ModificationDao<DiskImage,Guid>
image
- The entity to persist (can't be null
).public void update(DiskImage image)
ModificationDao
update
in interface ModificationDao<DiskImage,Guid>
image
- The entity instance, containing data to update (can't be null
).public void remove(Guid id)
ModificationDao
remove
in interface ModificationDao<DiskImage,Guid>
id
- The id of the entity to remove (can't be null
).public void removeAllForVmId(Guid id)
DiskImageDAO
removeAllForVmId
in interface DiskImageDAO
id
- the virtual machine idpublic image_vm_pool_map getImageVmPoolMapByImageId(Guid imageId)
getImageVmPoolMapByImageId
in interface DiskImageDAO
public void addImageVmPoolMap(image_vm_pool_map map)
addImageVmPoolMap
in interface DiskImageDAO
public void removeImageVmPoolMap(Guid imageId)
removeImageVmPoolMap
in interface DiskImageDAO
public List<image_vm_pool_map> getImageVmPoolMapByVmId(Guid vmId)
getImageVmPoolMapByVmId
in interface DiskImageDAO
public stateless_vm_image_map getStatelessVmImageMapForImageId(Guid imageId)
getStatelessVmImageMapForImageId
in interface DiskImageDAO
public void addStatelessVmImageMap(stateless_vm_image_map map)
addStatelessVmImageMap
in interface DiskImageDAO
public void removeStatelessVmImageMap(Guid imageId)
removeStatelessVmImageMap
in interface DiskImageDAO
public List<stateless_vm_image_map> getAllStatelessVmImageMapsForVm(Guid vmId)
getAllStatelessVmImageMapsForVm
in interface DiskImageDAO
public DiskImage getAncestor(Guid id)
DiskImageDAO
getAncestor
in interface DiskImageDAO
id
- The id of the image to get the ancestor for.Copyright © 2012. All Rights Reserved.