use of org.ovirt.engine.core.dal.dbbroker.DbEngineDialect in project ovirt-engine by oVirt.
the class SystemStatisticsDaoImpl method getSystemStatisticsValue.
@Override
public Integer getSystemStatisticsValue(String entity, String status) {
MapSqlParameterSource parameterSource = new CustomMapSqlParameterSource(dbEngineDialect).addValue("entity", entity).addValue("status", status);
RowMapper<Integer> mapper = (rs, rowNum) -> rs.getInt("val");
Map<String, Object> dbResults = dbEngineDialect.createJdbcCallForQuery(jdbcTemplate).withProcedureName("Getsystem_statistics").returningResultSet("RETURN_VALUE", mapper).execute(parameterSource);
return (Integer) DbFacadeUtils.asSingleResult((List<?>) dbResults.get("RETURN_VALUE"));
}
Aggregations