Omer Frenkel has submitted this change and it was merged.
Change subject: core: Roles commands - use the cached getRole()
......................................................................
core: Roles commands - use the cached getRole()
The roles commands have a caching mechnism, getRole(), which saves
calling getRoleDAO.get(params.getRoleId()) several times.
This patch makes sure it's used where possible. Whre the flows aren't
straight forward, a unit test was added to ensure the behavior was not
changed.
Change-Id: I69210adfae7962147e0923745e6b37dcf98d0f0d
Signed-off-by: Allon Mureinik <amureini(a)redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddRoleCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddRoleWithActionGroupsCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AttachActionGroupsToRoleCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/DetachActionGroupsFromRoleCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveRoleCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RolesCommandBase.java
A
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/AbstractRolesCommandTestBase.java
A
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/AttachActionGroupsToRoleCommandTest.java
A
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/RolesCommandBaseTest.java
9 files changed, 222 insertions(+), 19 deletions(-)
Approvals:
Allon Mureinik: Verified; Looks good to me, but someone else must approve
Omer Frenkel: Verified; Looks good to me, approved
--
To view, visit
http://gerrit.ovirt.org/4583
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I69210adfae7962147e0923745e6b37dcf98d0f0d
Gerrit-PatchSet: 7
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Eli Mesika <emesika(a)redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipchuk(a)redhat.com>
Gerrit-Reviewer: Michael Kublin <mkublin(a)redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofrenkel(a)redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzaslavs(a)redhat.com>