Gilad Chaplik has posted comments on this change. Change subject: engine: allow to fetch all QoS for REST ......................................................................
Patch Set 13: (5 comments) new patch to follow http://gerrit.ovirt.org/#/c/28767/13/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/qos/QosBase.java File backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/qos/QosBase.java: Line 13: Line 14: /** Line 15: * Base class for QoS objects derived class will hold qos limit according to type. Line 16: */ Line 17: public class QosBase extends IVdcQueryable implements BusinessEntity<Guid>, Serializable { > why is this changed as part of this change? since I'd like to instantiate QosBase Line 18: private static final long serialVersionUID = 1122772549710787678L; Line 19: private Guid id = Guid.Empty; Line 20: private QosType qosType; Line 21: Line 62: * @param other Line 63: * @return are equals Line 64: */ Line 65: public boolean equalValues(QosBase other) { Line 66: return false; > why false? since you must override this method, and the class not being abstract Line 67: } Line 68: Line 69: @Override Line 70: public Guid getId() { http://gerrit.ovirt.org/#/c/28767/13/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/qos/AllQosBaseDaoFacadeImpl.java File backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/qos/AllQosBaseDaoFacadeImpl.java: Line 9: import org.ovirt.engine.core.compat.Guid; Line 10: import org.springframework.jdbc.core.RowMapper; Line 11: import org.springframework.jdbc.core.namedparam.MapSqlParameterSource; Line 12: Line 13: public class AllQosBaseDaoFacadeImpl extends QosBaseDaoFacadeImpl<QosBase> implements QosBaseDao { > the convention that we use system-wide at the moment is that dao implementa QosBaseDaoFacadeImpl already exists, do you have a better name? Line 14: Line 15: public AllQosBaseDaoFacadeImpl() { Line 16: super(QosType.ALL); Line 17: } Line 12: Line 13: public class AllQosBaseDaoFacadeImpl extends QosBaseDaoFacadeImpl<QosBase> implements QosBaseDao { Line 14: Line 15: public AllQosBaseDaoFacadeImpl() { Line 16: super(QosType.ALL); > if we'll pass here null, the super implementation of getAllForStoragePoolId maybe, but why do you want to pass null? Line 17: } Line 18: Line 19: @Override Line 20: /** Line 21: * qosType can be null in order to fetch all entities Line 22: */ Line 23: public List<QosBase> getAllForStoragePoolId(Guid storagePoolId) { Line 24: MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource() Line 25: .addValue("storage_pool_id", storagePoolId.getUuid()); > no need for getUuid Done Line 26: return getCallsHandler().executeReadList("GetAllQosForStoragePool", Line 27: createEntityRowMapper(), Line 28: parameterSource); Line 29: } -- To view, visit http://gerrit.ovirt.org/28767 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1e55d3e7643c42f48c971400b15f6eb92e50ccaa Gerrit-PatchSet: 13 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Gilad Chaplik <gchap...@redhat.com> Gerrit-Reviewer: Arik Hadas <aha...@redhat.com> Gerrit-Reviewer: Eli Mesika <emes...@redhat.com> Gerrit-Reviewer: Gilad Chaplik <gchap...@redhat.com> Gerrit-Reviewer: Kobi Ianko <k...@redhat.com> Gerrit-Reviewer: Liron Aravot <lara...@redhat.com> Gerrit-Reviewer: Moti Asayag <masa...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches