Roy Golan has posted comments on this change.
Change subject: core: add get*Type to template DAO
......................................................................
Patch Set 13: Looks good to me, approved
(2 inline comments)
see comment
....................................................
File
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmTemplateDAODbFacadeImpl.java
Line 32: public VmTemplate get(Guid id) {
Line 33: return get(id, null, false);
Line 34: }
Line 35:
Line 36: @Override
wouldn't a boolean method will be clearer and null safe?
boolean isThisAnInstanceType(Guid id) {
return true if it is INSATNCE_TYPE else false
}
Line 37: public InstanceType getInstanceType(Guid id) {
Line 38: VmTemplate result = get(id);
Line 39: if (result != null && result.getTemplateType() !=
TemplateType.INSTANCE_TYPE) {
Line 40: result = null;
Line 42: return result;
Line 43: }
Line 44:
Line 45: @Override
Line 46: public ImageType getImageType(Guid id) {
same
Line 47: VmTemplate result = get(id);
Line 48: if (result != null && result.getTemplateType() !=
TemplateType.IMAGE_TYPE) {
Line 49: result = null;
Line 50: }
--
To view, visit http://gerrit.ovirt.org/12280
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic9f0eef1e61b51cc941b8dd9403f5733a69f9dfc
Gerrit-PatchSet: 13
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Arik Hadas <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Roy Golan <[email protected]>
Gerrit-Reviewer: Tomas Jelinek <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches