Liron Ar has posted comments on this change. Change subject: core: Remove usage of dynamic queries from the Backend ......................................................................
Patch Set 12: (3 comments) http://gerrit.ovirt.org/#/c/24310/12/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/StorageDomainDAODbFacadeImpl.java File backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/StorageDomainDAODbFacadeImpl.java: Line 204: return returnValue; Line 205: } Line 206: Line 207: @Override Line 208: public StorageDomain getByName(String name, Guid userID, boolean isFiltered) { > But then the row mapper won't be relevant. I agree with the concept - we'll I meant to use StorageDomainStaticDao which has the needed mapper for it and the getByName method, seems like there's no need to add this one but to add the support for userid and filter there. Line 209: return getCallsHandler().executeRead("Getstorage_domains_By_name", Line 210: StorageDomainRowMapper.instance, Line 211: getCustomMapSqlParameterSource() Line 212: .addValue("name", name) http://gerrit.ovirt.org/#/c/24310/12/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendResource.java File backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendResource.java: Line 52: public static final String POPULATE = "All-Content"; Line 53: public static final String JOB_ID_CONSTRAINT = "JobId"; Line 54: public static final String STEP_ID_CONSTRAINT = "StepId"; Line 55: Line 56: @Deprecated > I want people who use this to get a compilation warning, to decrease the us could have been in a separate patch imo, but nvm. fair enough. Line 57: protected <T> T getEntity(Class<T> clz, SearchType searchType, String constraint) { Line 58: try { Line 59: VdcQueryReturnValue result = runQuery(VdcQueryType.Search, Line 60: new SearchParameters(constraint, searchType)); http://gerrit.ovirt.org/#/c/24310/12/backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendPermissionResourceTest.java File backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendPermissionResourceTest.java: Line 65: public void testGet() throws Exception { Line 66: setUriInfo(setUpBasicUriExpectations()); Line 67: setUpEntityQueryExpectations(VdcQueryType.GetAllDbUsers, Line 68: VdcQueryParametersBase.class, Line 69: new String[] {}, > Why? I don't think this test run before with filtered. It messes up the who take a look here, this query used to run only when filtered = false, otherwise the test would have failed (if filtered = true this query didn't run). http://gerrit.ovirt.org/#/c/24310/12/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendAssignedPermissionsResource.java Line 70: new Object[] {}, Line 71: getUsers()); Line 72: Line 73: setUpGetEntityExpectations(); -- To view, visit http://gerrit.ovirt.org/24310 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3df981a958fae36edd6ecf3cb2bb47b94b2c446a Gerrit-PatchSet: 12 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Liran Zelkha <lzel...@redhat.com> Gerrit-Reviewer: Barak Azulay <bazu...@redhat.com> Gerrit-Reviewer: Eli Mesika <emes...@redhat.com> Gerrit-Reviewer: Juan Hernandez <juan.hernan...@redhat.com> Gerrit-Reviewer: Liran Zelkha <lzel...@redhat.com> Gerrit-Reviewer: Liron Ar <lara...@redhat.com> Gerrit-Reviewer: Mike Kolesnik <mkole...@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