Improved: Replace all delegator findByAnd and findOne method calling by EntityQuery methods (OFBIZ-10029)

Applied slightly modified patch, rearrange import properly, 
Thanks Suraj Khurana for your contribution

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818003 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Deepak Dixit
2017-12-13 12:03:17 +00:00
parent 63258e90f8
commit 7e19de9966
46 changed files with 125 additions and 129 deletions
@@ -131,7 +131,7 @@ public class EntityQueryTestSuite extends EntityTestCase {
testingTypes.add(delegator.makeValue("TestingType", "testingTypeId", "queryOne-3", "description", "query three"));
delegator.storeAll(testingTypes);
GenericValue findOneByEntityEngine = delegator.findOne("TestingType", false, UtilMisc.toMap("testingTypeId", "queryOne-2"));
GenericValue findOneByEntityEngine = EntityQuery.use(delegator).from("TestingType").where("testingTypeId", "queryOne-2").queryOne();
GenericValue queryOneByEntityQuery = EntityQuery.use(delegator).from("TestingType").where("testingTypeId", "queryOne-2").queryOne();
assertEquals("queryOne(): Record matched = testingTypeId", findOneByEntityEngine.getString("testingTypeId"), queryOneByEntityQuery.getString("testingTypeId"));