public class VmTemplateDAODbFacadeImpl extends BaseDAODbFacade implements VmTemplateDAO
VmTemplateDAODbFacadeImpl
provides a concrete implementation of VmTemplateDAO
.dbFacade, dialect, jdbcTemplate, RETURN_VALUE_PARAMETER
Constructor and Description |
---|
VmTemplateDAODbFacadeImpl() |
Modifier and Type | Method and Description |
---|---|
VmTemplate |
get(Guid id)
Retrieves the entity with the given id.
|
List<VmTemplate> |
getAll()
Retrieves all the entities of type
T . |
List<VmTemplate> |
getAllForStorageDomain(Guid id)
Retrieves all templates for the specified storage domain.
|
List<VmTemplate> |
getAllForVdsGroup(Guid id)
Retrieves all templates for the specified VDS group.
|
List<VmTemplate> |
getAllWithQuery(String query)
Retrieves all templates using a SQL query.
|
List<VmTemplate> |
getTemplatesWithPermittedAction(Guid userId,
ActionGroup actionGroup)
Retrieves templates with permissions to perform the given action.
|
void |
remove(Guid id)
Removes the entity with the given id from the underlying store of data.
|
void |
save(VmTemplate template)
Persist a new instance of the entity.
|
void |
update(VmTemplate template)
Update an existing entity with data from the given instance.
|
void |
updateStatus(Guid id,
VmTemplateStatus status)
Update the entity's status field only.
|
getCallsHandler, getCustomMapSqlParameterSource, setDbFacade, setDialect, setTemplate
public VmTemplate get(Guid id)
ReadDao
get
in interface ReadDao<VmTemplate,Guid>
id
- The id to look by (can't be null
).null
if not found.public List<VmTemplate> getAll()
ReadDao
T
.getAll
in interface ReadDao<VmTemplate,Guid>
public List<VmTemplate> getAllForStorageDomain(Guid id)
VmTemplateDAO
getAllForStorageDomain
in interface VmTemplateDAO
id
- the storage domainpublic List<VmTemplate> getAllWithQuery(String query)
VmTemplateDAO
getAllWithQuery
in interface VmTemplateDAO
query
- the querypublic List<VmTemplate> getAllForVdsGroup(Guid id)
VmTemplateDAO
getAllForVdsGroup
in interface VmTemplateDAO
id
- the VDS grouppublic void save(VmTemplate template)
ModificationDao
save
in interface ModificationDao<VmTemplate,Guid>
template
- The entity to persist (can't be null
).public void update(VmTemplate template)
ModificationDao
update
in interface ModificationDao<VmTemplate,Guid>
template
- The entity instance, containing data to update (can't be null
).public void updateStatus(Guid id, VmTemplateStatus status)
StatusAwareDao
updateStatus
in interface StatusAwareDao<Guid,VmTemplateStatus>
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<VmTemplate,Guid>
id
- The id of the entity to remove (can't be null
).public List<VmTemplate> getTemplatesWithPermittedAction(Guid userId, ActionGroup actionGroup)
VmTemplateDAO
getTemplatesWithPermittedAction
in interface VmTemplateDAO
Copyright © 2012. All Rights Reserved.