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 <[email protected]>
---
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 <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Eli Mesika <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Michael Kublin <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to