use of org.springframework.jdbc.core.namedparam.MapSqlParameterSource in project ovirt-engine by oVirt.
the class RoleDaoImpl method getAll.
@Override
public List<Role> getAll() {
Integer appMode = Config.<Integer>getValue(ConfigValues.ApplicationMode);
MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource().addValue("app_mode", appMode);
return getCallsHandler().executeReadList("GetAllFromRole", rolesRowMapper, parameterSource);
}
use of org.springframework.jdbc.core.namedparam.MapSqlParameterSource in project ovirt-engine by oVirt.
the class RoleDaoImpl method save.
@Override
public void save(Role role) {
MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource().addValue("description", role.getDescription()).addValue("id", role.getId()).addValue("name", role.getName()).addValue("is_readonly", role.isReadonly()).addValue("role_type", role.getType().getId()).addValue("allows_viewing_children", role.allowsViewingChildren()).addValue("app_mode", role.getAppMode().getValue());
getCallsHandler().executeModification("InsertRole", parameterSource);
}
use of org.springframework.jdbc.core.namedparam.MapSqlParameterSource in project ovirt-engine by oVirt.
the class RoleDaoImpl method update.
@Override
public void update(Role role) {
MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource().addValue("description", role.getDescription()).addValue("id", role.getId()).addValue("name", role.getName()).addValue("is_readonly", role.isReadonly()).addValue("role_type", role.getType().getId()).addValue("allows_viewing_children", role.allowsViewingChildren());
getCallsHandler().executeModification("UpdateRole", parameterSource);
}
use of org.springframework.jdbc.core.namedparam.MapSqlParameterSource in project ovirt-engine by oVirt.
the class TagDaoImpl method update.
@Override
public void update(Tags tag) {
MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource().addValue("description", tag.getDescription()).addValue("tag_id", tag.getTagId()).addValue("tag_name", tag.getTagName()).addValue("parent_id", tag.getParentId()).addValue("readonly", tag.getIsReadonly()).addValue("type", tag.getType());
getCallsHandler().executeModification("Updatetags", parameterSource);
}
use of org.springframework.jdbc.core.namedparam.MapSqlParameterSource in project ovirt-engine by oVirt.
the class TagDaoImpl method updateDefaultDisplayForVmTag.
@Override
public void updateDefaultDisplayForVmTag(TagsVmMap tagsVmMap) {
MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource().addValue("tag_id", tagsVmMap.getTagId()).addValue("vm_id", tagsVmMap.getVmId()).addValue("DefaultDisplayType", tagsVmMap.getDefaultDisplayType());
getCallsHandler().executeModification("UpdateVmTagsDefaultDisplayType", parameterSource);
}
Aggregations