use of org.springframework.jdbc.core.namedparam.MapSqlParameterSource in project ovirt-engine by oVirt.
the class VdsSpmIdMapDaoImpl method removeByVdsAndStoragePool.
@Override
public void removeByVdsAndStoragePool(Guid vdsId, Guid storagePoolId) {
MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource().addValue("vds_id", vdsId).addValue("storage_pool_id", storagePoolId);
getCallsHandler().executeModification("DeleteByPoolvds_spm_id_map", parameterSource);
}
use of org.springframework.jdbc.core.namedparam.MapSqlParameterSource in project ovirt-engine by oVirt.
the class VdsSpmIdMapDaoImpl method save.
@Override
public void save(VdsSpmIdMap vdsSpmIdMap) {
MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource().addValue("storage_pool_id", vdsSpmIdMap.getStoragePoolId()).addValue("vds_id", vdsSpmIdMap.getId()).addValue("vds_spm_id", vdsSpmIdMap.getVdsSpmId());
getCallsHandler().executeModification("Insertvds_spm_id_map", parameterSource);
}
use of org.springframework.jdbc.core.namedparam.MapSqlParameterSource in project ovirt-engine by oVirt.
the class VdsStatisticsDaoImpl method remove.
@Override
public void remove(Guid id) {
MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource().addValue("vds_id", id);
getCallsHandler().executeModification("DeleteVdsStatistics", parameterSource);
}
use of org.springframework.jdbc.core.namedparam.MapSqlParameterSource in project ovirt-engine by oVirt.
the class VdsStatisticsDaoImpl method update.
@Override
public void update(VdsStatistics stats) {
MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource().addValue("cpu_idle", stats.getCpuIdle()).addValue("cpu_load", stats.getCpuLoad()).addValue("cpu_sys", stats.getCpuSys()).addValue("cpu_user", stats.getCpuUser()).addValue("usage_cpu_percent", stats.getUsageCpuPercent()).addValue("usage_mem_percent", stats.getUsageMemPercent()).addValue("usage_network_percent", stats.getUsageNetworkPercent()).addValue("vds_id", stats.getId()).addValue("mem_available", stats.getMemAvailable()).addValue("mem_free", stats.getMemFree()).addValue("mem_shared", stats.getMemShared()).addValue("swap_free", stats.getSwapFree()).addValue("swap_total", stats.getSwapTotal()).addValue("ksm_cpu_percent", stats.getKsmCpuPercent()).addValue("ksm_pages", stats.getKsmPages()).addValue("ksm_state", stats.getKsmState()).addValue("anonymous_hugepages", stats.getAnonymousHugePages()).addValue("boot_time", stats.getBootTime()).addValue("ha_score", stats.getHighlyAvailableScore()).addValue("ha_configured", stats.getHighlyAvailableIsConfigured()).addValue("ha_active", stats.getHighlyAvailableIsActive()).addValue("ha_global_maintenance", stats.getHighlyAvailableGlobalMaintenance()).addValue("ha_local_maintenance", stats.getHighlyAvailableLocalMaintenance()).addValue("cpu_over_commit_time_stamp", stats.getCpuOverCommitTimeStamp()).addValue("hugepages", serializeHugePages(stats.getHugePages()));
getCallsHandler().executeModification("UpdateVdsStatistics", parameterSource);
}
use of org.springframework.jdbc.core.namedparam.MapSqlParameterSource in project ovirt-engine by oVirt.
the class VdsStatisticsDaoImpl method save.
@Override
public void save(VdsStatistics stats) {
MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource().addValue("cpu_idle", stats.getCpuIdle()).addValue("cpu_load", stats.getCpuLoad()).addValue("cpu_sys", stats.getCpuSys()).addValue("cpu_user", stats.getCpuUser()).addValue("usage_cpu_percent", stats.getUsageCpuPercent()).addValue("usage_mem_percent", stats.getUsageMemPercent()).addValue("usage_network_percent", stats.getUsageNetworkPercent()).addValue("vds_id", stats.getId()).addValue("mem_available", stats.getMemAvailable()).addValue("mem_free", stats.getMemFree()).addValue("mem_shared", stats.getMemShared()).addValue("swap_free", stats.getSwapFree()).addValue("swap_total", stats.getSwapTotal()).addValue("ksm_cpu_percent", stats.getKsmCpuPercent()).addValue("ksm_pages", stats.getKsmPages()).addValue("ksm_state", stats.getKsmState()).addValue("anonymous_hugepages", stats.getAnonymousHugePages()).addValue("boot_time", stats.getBootTime()).addValue("ha_score", stats.getHighlyAvailableScore()).addValue("ha_configured", stats.getHighlyAvailableIsConfigured()).addValue("ha_active", stats.getHighlyAvailableIsActive()).addValue("ha_global_maintenance", stats.getHighlyAvailableGlobalMaintenance()).addValue("ha_local_maintenance", stats.getHighlyAvailableLocalMaintenance()).addValue("cpu_over_commit_time_stamp", stats.getCpuOverCommitTimeStamp()).addValue("hugepages", serializeHugePages(stats.getHugePages()));
getCallsHandler().executeModification("InsertVdsStatistics", parameterSource);
}
Aggregations