use of org.springframework.jdbc.core.namedparam.MapSqlParameterSource in project ovirt-engine by oVirt.
the class GlusterServerServiceDaoImpl method getByClusterIdAndServiceType.
@Override
public List<GlusterServerService> getByClusterIdAndServiceType(Guid clusterId, ServiceType serviceType) {
MapSqlParameterSource paramSource = getCustomMapSqlParameterSource();
paramSource.addValue("cluster_id", clusterId);
paramSource.addValue("service_type", EnumUtils.nameOrNull(serviceType));
return getCallsHandler().executeReadList("GetGlusterServerServicesByClusterIdAndServiceType", serviceRowMapper, paramSource);
}
use of org.springframework.jdbc.core.namedparam.MapSqlParameterSource in project ovirt-engine by oVirt.
the class VmDeviceDaoImpl method removeVmDevicesByVmIdAndType.
@Override
public void removeVmDevicesByVmIdAndType(Guid vmId, VmDeviceGeneralType type) {
MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource().addValue("vm_id", vmId).addValue("type", type.getValue());
getCallsHandler().executeModification("DeleteVmDevicesByVmIdAndType", parameterSource);
}
use of org.springframework.jdbc.core.namedparam.MapSqlParameterSource in project ovirt-engine by oVirt.
the class VmDynamicDaoImpl method clearMigratingToVds.
@Override
public void clearMigratingToVds(Guid id) {
MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource().addValue("vm_guid", id);
getCallsHandler().executeModification("ClearMigratingToVds", parameterSource);
}
use of org.springframework.jdbc.core.namedparam.MapSqlParameterSource in project ovirt-engine by oVirt.
the class VmDynamicDaoImpl method updateVmsToUnknown.
@Override
public void updateVmsToUnknown(List<Guid> vmIds) {
MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource().addValue("vm_ids", createArrayOfUUIDs(vmIds)).addValue("status", VMStatus.Unknown);
getCallsHandler().executeModification("SetToUnknown", parameterSource);
}
use of org.springframework.jdbc.core.namedparam.MapSqlParameterSource in project ovirt-engine by oVirt.
the class VmDynamicDaoImpl method getAllRunningForVds.
@Override
public List<VmDynamic> getAllRunningForVds(Guid id) {
MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource().addValue("vds_id", id);
RowMapper<VmDynamic> mapper = createEntityRowMapper();
return getCallsHandler().executeReadList("GetVmsDynamicRunningOnVds", mapper, parameterSource);
}
Aggregations