Moti Asayag has posted comments on this change.
Change subject: core: Move status check methods from VM to VMStatus
......................................................................
Patch Set 1: (1 inline comment)
....................................................
File
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VMStatus.java
Line 21: ImageIllegal(14),
Line 22: ImageLocked(15),
Line 23: PoweringDown(16);
Line 24:
Line 25: private int value;
you can call it getStatusById or just getStatus(int id) since the signature
implied it is being queried by an id.
I think the correct solution would be to eliminate this ordinal and using only
the enum value as the identifier. Having 2 IDs for the same property
complicates it all.
Then instead of all the forValue you could enhance the functionality provided
by the enum itself such as valueOf().
But i guess this requires a broader code-refactoring work
Line 26: private static HashMap<Integer, VMStatus> valueToStatus = new
HashMap<Integer, VMStatus>();
Line 27:
Line 28: static {
Line 29: for (VMStatus status : values()) {
--
To view, visit http://gerrit.ovirt.org/10795
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I82b4f109751773ff2d46407ccea26ea0be2661f5
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Arik Hadas <[email protected]>
Gerrit-Reviewer: Arik Hadas <[email protected]>
Gerrit-Reviewer: Liron Aravot <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Roy Golan <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches