geode-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GEODE-3977) .NET QueryService templating should match usage
Date Thu, 16 Nov 2017 22:49:00 GMT

    [ https://issues.apache.org/jira/browse/GEODE-3977?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16256094#comment-16256094 ] 

ASF GitHub Bot commented on GEODE-3977:
---------------------------------------

mhansonp closed pull request #154: GEODE-3977: Modifying the QueryService template
URL: https://github.com/apache/geode-native/pull/154
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/clicache/integration-test/PutGetTestsN.cs b/clicache/integration-test/PutGetTestsN.cs
index 21478218..a4896a4a 100644
--- a/clicache/integration-test/PutGetTestsN.cs
+++ b/clicache/integration-test/PutGetTestsN.cs
@@ -318,8 +318,8 @@ public void DoRunQuery()
       }
       else
       {
-        QueryService<object, object> qs = null;
-        qs = CacheHelper.DCache.GetPoolManager().Find(m_region.Attributes.PoolName).GetQueryService<object, object>();
+        QueryService<object> qs = null;
+        qs = CacheHelper.DCache.GetPoolManager().Find(m_region.Attributes.PoolName).GetQueryService<object>();
         Query<object> qry = qs.NewQuery("SELECT * FROM " + m_region.FullPath);
         ISelectResults<object> results = qry.Execute();
         // not really interested in results but loop through them neverthless
diff --git a/clicache/integration-test/ThinClientAppDomainQueryTests.cs b/clicache/integration-test/ThinClientAppDomainQueryTests.cs
index 90aabf71..728b1b4e 100644
--- a/clicache/integration-test/ThinClientAppDomainQueryTests.cs
+++ b/clicache/integration-test/ThinClientAppDomainQueryTests.cs
@@ -124,7 +124,7 @@ public void VerifyQueries()
 
       QueryHelper<object, object> qh = QueryHelper<object, object>.GetHelper(CacheHelper.DCache);
 
-      QueryService<object, object> qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+      QueryService<object> qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object>();
 
       int qryIdx = 0;
 
@@ -204,7 +204,7 @@ public void VerifyUnsupporteQueries()
 
       QueryHelper<object, object> qh = QueryHelper<object, object>.GetHelper(CacheHelper.DCache);
 
-      QueryService<object, object> qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+      QueryService<object> qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object>();
 
       int qryIdx = 0;
 
diff --git a/clicache/integration-test/ThinClientCqIRTestsN.cs b/clicache/integration-test/ThinClientCqIRTestsN.cs
index ea90850b..12a2071c 100644
--- a/clicache/integration-test/ThinClientCqIRTestsN.cs
+++ b/clicache/integration-test/ThinClientCqIRTestsN.cs
@@ -148,8 +148,8 @@ public void StepOneQE(string locators)
       region["3"] = p3;
       region["4"] = p4;
 
-      QueryService<object, object> qs = null;
-      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+      QueryService<object> qs = null;
+      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object>();
       CqAttributesFactory<object, object> cqFac = new CqAttributesFactory<object, object>();
       ICqListener<object, object> cqLstner = new MyCqListener<object, object>();
       cqFac.AddCqListener(cqLstner);
@@ -207,7 +207,7 @@ public void StepOneQE(string locators)
           }
         }
       }
-      qry = qs.GetCq(CqName);
+      qry = qs.GetCq<object>(CqName);
       qry.Stop();
       qry.Close();
       // Bring down the region
diff --git a/clicache/integration-test/ThinClientCqTestsN.cs b/clicache/integration-test/ThinClientCqTestsN.cs
index 2dd81187..86e3e383 100644
--- a/clicache/integration-test/ThinClientCqTestsN.cs
+++ b/clicache/integration-test/ThinClientCqTestsN.cs
@@ -393,9 +393,9 @@ public void StepOneQE(string locators)
       region["3"] = p3;
       region["4"] = p4;
 
-      QueryService<object, object> qs = null;
+      QueryService<object> qs = null;
 
-      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object>();
       CqAttributesFactory<object, object> cqFac = new CqAttributesFactory<object, object>();
       ICqListener<object, object> cqLstner = new MyCqListener<object, object>();
       cqFac.AddCqListener(cqLstner);
@@ -409,7 +409,7 @@ public void StepOneQE(string locators)
       region["1"] = p4;
       Thread.Sleep(18000); // sleep 0.3min to allow server c query to complete
 
-      qry = qs.GetCq(CqName);
+      qry = qs.GetCq<object>(CqName);
 
       CqServiceStatistics cqSvcStats = qs.GetCqStatistics();
       Assert.AreEqual(1, cqSvcStats.numCqsActive());
@@ -454,9 +454,9 @@ public void StepOnePdxQE(string locators)
       region["3"] = p3;
       region["4"] = p4;
 
-      QueryService<object, object> qs = null;
+      QueryService<object> qs = null;
 
-      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object>();
       CqAttributesFactory<object, object> cqFac = new CqAttributesFactory<object, object>();
       ICqListener<object, object> cqLstner = new MyCqListener<object, object>();
       cqFac.AddCqListener(cqLstner);
@@ -470,7 +470,7 @@ public void StepOnePdxQE(string locators)
       region["1"] = p4;
       Thread.Sleep(18000); // sleep 0.3min to allow server c query to complete
 
-      qry = qs.GetCq(CqName);
+      qry = qs.GetCq<object>(CqName);
 
       CqServiceStatistics cqSvcStats = qs.GetCqStatistics();
       Assert.AreEqual(1, cqSvcStats.numCqsActive());
@@ -616,9 +616,9 @@ public void ProcessCQ(string locators)
       region["3"] = p3;
       region["4"] = p4;
 
-      QueryService<object, object> qs = null;
+      QueryService<object> qs = null;
 
-      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object>();
       
       CqAttributesFactory<object, object> cqFac = new CqAttributesFactory<object, object>();
       ICqListener<object, object> cqLstner = new MyCqListener<object, object>();
@@ -641,7 +641,7 @@ public void ProcessCQ(string locators)
       region["1"] = p4;
       Thread.Sleep(18000); // sleep 0.3min to allow server c query to complete
 
-      qry1 = qs.GetCq("CQ1");
+      qry1 = qs.GetCq<object>("CQ1");
       cqAttr = qry1.GetCqAttributes();
       ICqListener<object, object>[] vl = cqAttr.getCqListeners();
       Assert.IsNotNull(vl);
@@ -687,7 +687,7 @@ public void ProcessCQ(string locators)
       region["1"] = p4;
       Thread.Sleep(18000); // sleep 0.3min to allow server c query to complete
 
-      qry1 = qs.GetCq("CQ1");
+      qry1 = qs.GetCq<object>("CQ1");
       cqAttr = qry1.GetCqAttributes();
       ICqListener<object, object>[] v3 = cqAttr.getCqListeners();
       Assert.IsNotNull(v3);
@@ -722,7 +722,7 @@ public void ProcessCQ(string locators)
       region["1"] = p4;
       Thread.Sleep(18000); // sleep 0.3min to allow server c query to complete
 
-      qry1 = qs.GetCq("CQ1");
+      qry1 = qs.GetCq<object>("CQ1");
       cqAttr = qry1.GetCqAttributes();
       ICqListener<object, object>[] v4 = cqAttr.getCqListeners();      
       Assert.IsNotNull(v4);      
@@ -732,8 +732,8 @@ public void ProcessCQ(string locators)
 
     public void CreateAndExecuteCQ_StatusListener(string poolName, string cqName, string cqQuery, int id)
     {
-      QueryService<object, object> qs = null;
-      qs = CacheHelper.DCache.GetPoolManager().Find(poolName).GetQueryService<object, object>();
+      QueryService<object> qs = null;
+      qs = CacheHelper.DCache.GetPoolManager().Find(poolName).GetQueryService<object>();
       CqAttributesFactory<object, object> cqFac = new CqAttributesFactory<object, object>();
       cqFac.AddCqListener(new MyCqStatusListener<object, object>(id));
       CqAttributes<object, object> cqAttr = cqFac.Create();
@@ -744,8 +744,8 @@ public void CreateAndExecuteCQ_StatusListener(string poolName, string cqName, st
 
     public void CreateAndExecuteCQ_Listener(string poolName, string cqName, string cqQuery, int id)
     {
-      QueryService<object, object> qs = null;
-      qs = CacheHelper.DCache.GetPoolManager().Find(poolName).GetQueryService<object, object>();
+      QueryService<object> qs = null;
+      qs = CacheHelper.DCache.GetPoolManager().Find(poolName).GetQueryService<object>();
       CqAttributesFactory<object, object> cqFac = new CqAttributesFactory<object, object>();
       cqFac.AddCqListener(new MyCqListener<object, object>(/*id*/));
       CqAttributes<object, object> cqAttr = cqFac.Create();
@@ -756,9 +756,9 @@ public void CreateAndExecuteCQ_Listener(string poolName, string cqName, string c
 
     public void CheckCQStatusOnConnect(string poolName, string cqName, int onCqStatusConnect)
     {      
-      QueryService<object, object> qs = null;
-      qs = CacheHelper.DCache.GetPoolManager().Find(poolName).GetQueryService<object, object>();
-      CqQuery<object, object> query = qs.GetCq(cqName);
+      QueryService<object> qs = null;
+      qs = CacheHelper.DCache.GetPoolManager().Find(poolName).GetQueryService<object>();
+      CqQuery<object, object> query = qs.GetCq<object>(cqName);
       CqAttributes<object, object> cqAttr = query.GetCqAttributes();
       ICqListener<object, object>[] vl = cqAttr.getCqListeners();
       MyCqStatusListener<object, object> myCqStatusLstr = (MyCqStatusListener<object, object>) vl[0];
@@ -768,9 +768,9 @@ public void CheckCQStatusOnConnect(string poolName, string cqName, int onCqStatu
 
     public void CheckCQStatusOnDisConnect(string poolName, string cqName, int onCqStatusDisConnect)
     {
-      QueryService<object, object> qs = null;
-      qs = CacheHelper.DCache.GetPoolManager().Find(poolName).GetQueryService<object, object>();
-      CqQuery<object, object> query = qs.GetCq(cqName);
+      QueryService<object> qs = null;
+      qs = CacheHelper.DCache.GetPoolManager().Find(poolName).GetQueryService<object>();
+      CqQuery<object, object> query = qs.GetCq<object>(cqName);
       CqAttributes<object, object> cqAttr = query.GetCqAttributes();
       ICqListener<object, object>[] vl = cqAttr.getCqListeners();
       MyCqStatusListener<object, object> myCqStatusLstr = (MyCqStatusListener<object, object>)vl[0];
@@ -789,9 +789,9 @@ public void PutEntries(string regionName)
 
     public void CheckCQStatusOnPutEvent(string poolName, string cqName, int onCreateCount)
     {
-      QueryService<object, object> qs = null;
-      qs = CacheHelper.DCache.GetPoolManager().Find(poolName).GetQueryService<object, object>();
-      CqQuery<object, object> query = qs.GetCq(cqName);
+      QueryService<object> qs = null;
+      qs = CacheHelper.DCache.GetPoolManager().Find(poolName).GetQueryService<object>();
+      CqQuery<object, object> query = qs.GetCq<object>(cqName);
       CqAttributes<object, object> cqAttr = query.GetCqAttributes();
       ICqListener<object, object>[] vl = cqAttr.getCqListeners();
       MyCqStatusListener<object, object> myCqStatusLstr = (MyCqStatusListener<object, object>)vl[0];
diff --git a/clicache/integration-test/ThinClientDeltaTestN.cs b/clicache/integration-test/ThinClientDeltaTestN.cs
index 81232ef5..cd097322 100644
--- a/clicache/integration-test/ThinClientDeltaTestN.cs
+++ b/clicache/integration-test/ThinClientDeltaTestN.cs
@@ -636,8 +636,8 @@ void registerClassDeltaTestImpl()
     void registerCq()
     {
       Pool thePool = CacheHelper.DCache.GetPoolManager().Find("__TEST_POOL1__");
-      QueryService<object, DeltaTestImpl> cqService = null;
-      cqService = thePool.GetQueryService<object, DeltaTestImpl>();
+      QueryService<DeltaTestImpl> cqService = null;
+      cqService = thePool.GetQueryService<DeltaTestImpl>();
       CqAttributesFactory<object, DeltaTestImpl> attrFac = new CqAttributesFactory<object, DeltaTestImpl>();
       myCqListener = new CqDeltaListener<object, DeltaTestImpl>();
       attrFac.AddCqListener(myCqListener);
diff --git a/clicache/integration-test/ThinClientDurableCqTestsN.cs b/clicache/integration-test/ThinClientDurableCqTestsN.cs
index 604261a2..7bea8bc9 100644
--- a/clicache/integration-test/ThinClientDurableCqTestsN.cs
+++ b/clicache/integration-test/ThinClientDurableCqTestsN.cs
@@ -61,7 +61,7 @@ public void RegisterCqsClient1(bool isRecycle)
       Util.Log("Registering Cqs for client1.");
       CqAttributesFactory<object, object> cqAf = new CqAttributesFactory<object, object>();
       CqAttributes<object, object> attributes = cqAf.Create();
-      QueryService<object, object> qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+      QueryService<object> qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object>();
 
       if (!isRecycle)
       {
@@ -85,7 +85,7 @@ public void RegisterCqsClient1MultipleChunks()
       Util.Log("Registering Cqs for client1 for multiple chunks.");
       CqAttributesFactory<object, object> cqAf = new CqAttributesFactory<object, object>();
       CqAttributes<object, object> attributes = cqAf.Create();
-      QueryService<object, object> qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+      QueryService<object> qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object>();
 
       for (int i = 0; i < m_NumberOfCqs; i++)
         qs.NewCq("MyCq_" + i.ToString(), "Select * From /" + QueryRegionNames[0] + " where id = 1", attributes, true).ExecuteWithInitialResults();
@@ -97,7 +97,7 @@ public void RegisterCqsClient2(bool isRecycle)
       Util.Log("Registering Cqs for client2.");
       CqAttributesFactory<object, object> cqAf = new CqAttributesFactory<object, object>();
       CqAttributes<object, object> attributes = cqAf.Create();
-      QueryService<object, object> qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+      QueryService<object> qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object>();
 
       if (!isRecycle)
       {
@@ -118,7 +118,7 @@ public void RegisterCqsClient2(bool isRecycle)
     public void VerifyDurableCqListClient1MultipleChunks()
     {
       Util.Log("Verifying durable Cqs for client1.");
-      QueryService<object, object> qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+      QueryService<object> qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object>();
       System.Collections.Generic.List<string> durableCqList = qs.GetAllDurableCqsFromServer();
       Assert.AreNotEqual(null, durableCqList);
 
@@ -130,7 +130,7 @@ public void VerifyDurableCqListClient1MultipleChunks()
     public void VerifyDurableCqListClient1(bool isRecycle)
     {
       Util.Log("Verifying durable Cqs for client1.");
-      QueryService<object, object> qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+      QueryService<object> qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object>();
       System.Collections.Generic.List<string> durableCqList = qs.GetAllDurableCqsFromServer();
       Assert.AreNotEqual(null, durableCqList);
 
@@ -154,7 +154,7 @@ public void VerifyDurableCqListClient1(bool isRecycle)
     public void VerifyDurableCqListClient2(bool isRecycle)
     {
       Util.Log("Verifying durable Cqs for client2.");
-      QueryService<object, object> qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+      QueryService<object> qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object>();
       System.Collections.Generic.List<string> durableCqList = qs.GetAllDurableCqsFromServer();
       Assert.AreNotEqual(null, durableCqList);
 
@@ -183,7 +183,7 @@ public void VerifyDurableCqListClient2(bool isRecycle)
     public void VerifyEmptyDurableCqListClient1()
     {
       Util.Log("Verifying empty durable Cqs for client1.");
-      QueryService<object, object> qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+      QueryService<object> qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object>();
       System.Collections.Generic.List<string> durableCqList = qs.GetAllDurableCqsFromServer();
       Assert.AreNotEqual(null, durableCqList);
       Assert.AreEqual(0, durableCqList.Count, "Durable CQ list sholuld be empty");
diff --git a/clicache/integration-test/ThinClientDurableTestsN.cs b/clicache/integration-test/ThinClientDurableTestsN.cs
index 3bf8a198..e47e82fa 100644
--- a/clicache/integration-test/ThinClientDurableTestsN.cs
+++ b/clicache/integration-test/ThinClientDurableTestsN.cs
@@ -806,7 +806,7 @@ void RunDurableClient(int expectedPendingQSize)
       IRegion<object, object> region = regionFactory.Create<object, object>("DistRegionAck");
       Util.Log("Created the DistRegionAck Region Programmatically");
 
-      QueryService<object, object> qService = cache.GetQueryService<object, object>();
+      QueryService<object> qService = cache.GetQueryService<object>();
       CqAttributesFactory<object, object> cqFac = new CqAttributesFactory<object, object>();
 
       ICqListener<object, object> cqLstner = new MyCqListener1<object, object>();
diff --git a/clicache/integration-test/ThinClientHARegionTestsN.cs b/clicache/integration-test/ThinClientHARegionTestsN.cs
index 2a9d9688..0fb385ba 100644
--- a/clicache/integration-test/ThinClientHARegionTestsN.cs
+++ b/clicache/integration-test/ThinClientHARegionTestsN.cs
@@ -673,8 +673,8 @@ public void StepTwoFailover()
       IAsyncResult killRes = null;
       KillServerDelegate ksd = new KillServerDelegate(KillServer);
 
-      QueryService<object, object> qs = null;
-      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+      QueryService<object> qs = null;
+      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object>();
 
       for (int i = 0; i < 10000; i++)
       {
diff --git a/clicache/integration-test/ThinClientPdxTests.cs b/clicache/integration-test/ThinClientPdxTests.cs
index 9276d509..11f2a540 100755
--- a/clicache/integration-test/ThinClientPdxTests.cs
+++ b/clicache/integration-test/ThinClientPdxTests.cs
@@ -2673,7 +2673,7 @@ void doQueryTest()
        //private Address _address;
      //private Hashtable _hashTable;
 
-       //QueryService<object, object> qs = PoolManager/*<object, object>*/.Find("__TESTPOOL1_").GetQueryService<object, object>();
+       //QueryService<object> qs = PoolManager/*<object, object>*/.Find("__TESTPOOL1_").GetQueryService<object>();
 
        //Query<object> qry = qs.NewQuery("select _addressArray from /" + m_regionNames[0] + " where arrayCount = 10");
        //ISelectResults<object> results = qry.Execute();
diff --git a/clicache/integration-test/ThinClientQueryTestsN.cs b/clicache/integration-test/ThinClientQueryTestsN.cs
index 0f7ea101..7527aa90 100644
--- a/clicache/integration-test/ThinClientQueryTestsN.cs
+++ b/clicache/integration-test/ThinClientQueryTestsN.cs
@@ -94,7 +94,7 @@ public void StepOneQE(string locators, bool isPdx)
       try
       {
 				var poolFail = CacheHelper.DCache.GetPoolManager().CreateFactory().Create("_TESTFAILPOOL_", CacheHelper.DCache);
-				var qsFail = poolFail.GetQueryService<object, object>();
+				var qsFail = poolFail.GetQueryService<object>();
         var qryFail = qsFail.NewQuery("select distinct * from /" + QERegionName);
         var resultsFail = qryFail.Execute();
         Assert.Fail("Since no endpoints defined, so exception expected");
@@ -136,8 +136,8 @@ public void StepOneQE(string locators, bool isPdx)
         region["4"] = p4;
       }
 
-      QueryService<object, object> qs = null;
-      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+      QueryService<object> qs = null;
+      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object>();
 
       Query<object> qry = qs.NewQuery("select distinct * from /" + QERegionName);
       ISelectResults<object> results = qry.Execute();
@@ -150,8 +150,8 @@ public void StepOneQE(string locators, bool isPdx)
 
     public void StepTwoQE()
     {
-      QueryService<object, object> qs = null;
-      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+      QueryService<object> qs = null;
+      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object>();
       Util.Log("Going to execute the query");
       Query<object> qry = qs.NewQuery("select distinct * from /" + QERegionName);
       ISelectResults<object> results = qry.Execute();
@@ -242,9 +242,9 @@ public void StepThreeRS()
 
       QueryHelper<object, object> qh = QueryHelper<object, object>.GetHelper(CacheHelper.DCache);
 
-      QueryService<object, object> qs = null;
+      QueryService<object> qs = null;
 
-      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object>();
 
       int qryIdx = 0;
 
@@ -358,9 +358,9 @@ public void StepThreePQRS()
 
       QueryHelper<object, object> qh = QueryHelper<object, object>.GetHelper(CacheHelper.DCache);
 
-      QueryService<object, object> qs = null;
+      QueryService<object> qs = null;
 
-      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object>();
 
       int qryIdx = 0;
 
@@ -486,9 +486,9 @@ public void StepFourRS()
 
       QueryHelper<object, object> qh = QueryHelper<object, object>.GetHelper(CacheHelper.DCache);
 
-      QueryService<object, object> qs = null;
+      QueryService<object> qs = null;
 
-      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object>();
 
       int qryIdx = 0;
 
@@ -534,9 +534,9 @@ public void StepFourPQRS()
 
       QueryHelper<object, object> qh = QueryHelper<object, object>.GetHelper(CacheHelper.DCache);
 
-      QueryService<object, object> qs = null;
+      QueryService<object> qs = null;
 
-      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object>();
 
       int qryIdx = 0;
 
@@ -603,9 +603,9 @@ public void StepThreeSS()
 
       QueryHelper<object, object> qh = QueryHelper<object, object>.GetHelper(CacheHelper.DCache);
 
-      QueryService<object, object> qs = null;
+      QueryService<object> qs = null;
 
-      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object>();
 
       int qryIdx = 0;
 
@@ -675,9 +675,9 @@ public void StepThreePQSS()
 
       QueryHelper<object, object> qh = QueryHelper<object, object>.GetHelper(CacheHelper.DCache);
 
-      QueryService<object, object> qs = null;
+      QueryService<object> qs = null;
 
-      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object>();
 
       int qryIdx = 0;
 
@@ -769,9 +769,9 @@ public void StepFourSS()
 
       QueryHelper<object, object> qh = QueryHelper<object, object>.GetHelper(CacheHelper.DCache);
 
-      QueryService<object, object> qs = null;
+      QueryService<object> qs = null;
 
-      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object>();
 
       int qryIdx = 0;
 
@@ -817,9 +817,9 @@ public void StepFourPQSS()
 
       QueryHelper<object, object> qh = QueryHelper<object, object>.GetHelper(CacheHelper.DCache);
 
-      QueryService<object, object> qs = null;
+      QueryService<object> qs = null;
 
-      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object>();
 
       int qryIdx = 0;
 
@@ -940,9 +940,9 @@ public void StepTwoFailover()
       IAsyncResult killRes = null;
       KillServerDelegate ksd = new KillServerDelegate(KillServer);
 
-      QueryService<object, object> qs = null;
+      QueryService<object> qs = null;
 
-      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object>();
 
       for (int i = 0; i < 10000; i++)
       {
@@ -977,9 +977,9 @@ public void StepTwoPQFailover()
       IAsyncResult killRes = null;
       KillServerDelegate ksd = new KillServerDelegate(KillServer);
 
-      QueryService<object, object> qs = null;
+      QueryService<object> qs = null;
 
-      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object>();
 
       for (int i = 0; i < 10000; i++)
       {
@@ -1013,8 +1013,8 @@ public void StepTwoPQFailover()
     public void StepThreeQT()
     {
       QueryHelper<object, object> qh = QueryHelper<object, object>.GetHelper(CacheHelper.DCache);
-      QueryService<object, object> qs = null;
-      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+      QueryService<object> qs = null;
+      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object>();
       Util.Log("query " + QueryStatics.ResultSetQueries[34].Query);
       Query<object> query = qs.NewQuery(QueryStatics.ResultSetQueries[34].Query);
 
@@ -1035,8 +1035,8 @@ public void StepThreeQT()
     public void StepFourQT()
     {
       QueryHelper<object, object> qh = QueryHelper<object, object>.GetHelper(CacheHelper.DCache);
-      QueryService<object, object> qs = null;
-      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+      QueryService<object> qs = null;
+      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object>();
 
       Query<object> query = qs.NewQuery(QueryStatics.ResultSetQueries[35].Query);
 
@@ -1056,8 +1056,8 @@ public void StepFourQT()
     public void StepFiveQT()
     {
       QueryHelper<object, object> qh = QueryHelper<object, object>.GetHelper(CacheHelper.DCache);
-      QueryService<object, object> qs = null;
-      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+      QueryService<object> qs = null;
+      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object>();
 
       Query<object> query = qs.NewQuery(QueryStatics.StructSetQueries[17].Query);
 
@@ -1078,8 +1078,8 @@ public void StepFiveQT()
     public void StepSixQT()
     {
       QueryHelper<object, object> qh = QueryHelper<object, object>.GetHelper(CacheHelper.DCache);
-      QueryService<object, object> qs = null;
-      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+      QueryService<object> qs = null;
+      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object>();
       Query<object> query = qs.NewQuery(QueryStatics.StructSetQueries[17].Query);
 
       try
@@ -1098,8 +1098,8 @@ public void StepSixQT()
     public void StepThreePQT()
     {
       QueryHelper<object, object> qh = QueryHelper<object, object>.GetHelper(CacheHelper.DCache);
-      QueryService<object, object> qs = null;
-      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+      QueryService<object> qs = null;
+      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object>();
 
       Query<object> query = qs.NewQuery(QueryStatics.StructSetParamQueries[5].Query);
 
@@ -1141,8 +1141,8 @@ public void StepThreePQT()
     public void StepFourPQT()
     {
       QueryHelper<object, object> qh = QueryHelper<object, object>.GetHelper(CacheHelper.DCache);
-      QueryService<object, object> qs = null;
-      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+      QueryService<object> qs = null;
+      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object>();
 
       Query<object> query = qs.NewQuery(QueryStatics.StructSetParamQueries[5].Query);
 
diff --git a/clicache/integration-test/ThinClientRemoteParamQueryResultSetTests.cs b/clicache/integration-test/ThinClientRemoteParamQueryResultSetTests.cs
index 065edfac..c0ccb6a0 100644
--- a/clicache/integration-test/ThinClientRemoteParamQueryResultSetTests.cs
+++ b/clicache/integration-test/ThinClientRemoteParamQueryResultSetTests.cs
@@ -149,9 +149,9 @@ public void StepThreePQRS()
 
       QueryHelper<object, object> qh = QueryHelper<object, object>.GetHelper(CacheHelper.DCache);
 
-      QueryService<object, object> qs = null;
+      QueryService<object> qs = null;
 
-      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object>();
 
       int qryIdx = 0;
 
@@ -277,9 +277,9 @@ public void StepFourPQRS()
 
       QueryHelper<object, object> qh = QueryHelper<object, object>.GetHelper(CacheHelper.DCache);
 
-      QueryService<object, object> qs = null;
+      QueryService<object> qs = null;
 
-      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object>();
 
       int qryIdx = 0;
 
diff --git a/clicache/integration-test/ThinClientRemoteParamQueryStructSetTests.cs b/clicache/integration-test/ThinClientRemoteParamQueryStructSetTests.cs
index c4fcd73b..f7d9b02b 100644
--- a/clicache/integration-test/ThinClientRemoteParamQueryStructSetTests.cs
+++ b/clicache/integration-test/ThinClientRemoteParamQueryStructSetTests.cs
@@ -149,9 +149,9 @@ public void StepThreePQSS()
 
       QueryHelper<object, object> qh = QueryHelper<object, object>.GetHelper(CacheHelper.DCache);
 
-      QueryService<object, object> qs = null;
+      QueryService<object> qs = null;
 
-      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object>();
 
       int qryIdx = 0;
 
@@ -243,9 +243,9 @@ public void StepFourPQSS()
 
       QueryHelper<object, object> qh = QueryHelper<object, object>.GetHelper(CacheHelper.DCache);
 
-      QueryService<object, object> qs = null;
+      QueryService<object> qs = null;
 
-      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object>();
 
       int qryIdx = 0;
 
diff --git a/clicache/integration-test/ThinClientRemoteQueryExclusivenessTests.cs b/clicache/integration-test/ThinClientRemoteQueryExclusivenessTests.cs
index 34db74f9..45503877 100644
--- a/clicache/integration-test/ThinClientRemoteQueryExclusivenessTests.cs
+++ b/clicache/integration-test/ThinClientRemoteQueryExclusivenessTests.cs
@@ -90,7 +90,7 @@ public void StepOneQE(string locators, bool isPdx)
       try
       {
 				var poolFail = CacheHelper.DCache.GetPoolManager().CreateFactory().Create("_TESTFAILPOOL_", CacheHelper.DCache);
-				var qsFail = poolFail.GetQueryService<object, object>();
+				var qsFail = poolFail.GetQueryService<object>();
         var qryFail = qsFail.NewQuery("select distinct * from /" + QERegionName);
         var resultsFail = qryFail.Execute();
         Assert.Fail("Since no endpoints defined, so exception expected");
@@ -132,8 +132,8 @@ public void StepOneQE(string locators, bool isPdx)
         region["4"] = p4;
       }
 
-      QueryService<object, object> qs = null;
-      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+      QueryService<object> qs = null;
+      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object>();
 
       Query<object> qry = qs.NewQuery("select distinct * from /" + QERegionName);
       ISelectResults<object> results = qry.Execute();
@@ -146,8 +146,8 @@ public void StepOneQE(string locators, bool isPdx)
 
     public void StepTwoQE()
     {
-      QueryService<object, object> qs = null;
-      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+      QueryService<object> qs = null;
+      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object>();
       Util.Log("Going to execute the query");
       Query<object> qry = qs.NewQuery("select distinct * from /" + QERegionName);
       ISelectResults<object> results = qry.Execute();
diff --git a/clicache/integration-test/ThinClientRemoteQueryFailoverTests.cs b/clicache/integration-test/ThinClientRemoteQueryFailoverTests.cs
index 4781b6bb..5ac06b08 100644
--- a/clicache/integration-test/ThinClientRemoteQueryFailoverTests.cs
+++ b/clicache/integration-test/ThinClientRemoteQueryFailoverTests.cs
@@ -145,9 +145,9 @@ public void StepTwoFailover()
       IAsyncResult killRes = null;
       KillServerDelegate ksd = new KillServerDelegate(KillServer);
 
-      QueryService<object, object> qs = null;
+      QueryService<object> qs = null;
 
-      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object>();
 
       for (int i = 0; i < 10000; i++)
       {
diff --git a/clicache/integration-test/ThinClientRemoteQueryResultSetTests.cs b/clicache/integration-test/ThinClientRemoteQueryResultSetTests.cs
index 98340640..83e8aeeb 100644
--- a/clicache/integration-test/ThinClientRemoteQueryResultSetTests.cs
+++ b/clicache/integration-test/ThinClientRemoteQueryResultSetTests.cs
@@ -150,9 +150,9 @@ public void StepThreeRS()
 
       QueryHelper<object, object> qh = QueryHelper<object, object>.GetHelper(CacheHelper.DCache);
 
-      QueryService<object, object> qs = null;
+      QueryService<object> qs = null;
 
-      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object>();
 
       int qryIdx = 0;
 
@@ -266,9 +266,9 @@ public void StepFourRS()
 
       QueryHelper<object, object> qh = QueryHelper<object, object>.GetHelper(CacheHelper.DCache);
 
-      QueryService<object, object> qs = null;
+      QueryService<object> qs = null;
 
-      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object>();
 
       int qryIdx = 0;
 
diff --git a/clicache/integration-test/ThinClientRemoteQueryStructSetTests.cs b/clicache/integration-test/ThinClientRemoteQueryStructSetTests.cs
index 780e3057..dad4d247 100644
--- a/clicache/integration-test/ThinClientRemoteQueryStructSetTests.cs
+++ b/clicache/integration-test/ThinClientRemoteQueryStructSetTests.cs
@@ -151,9 +151,9 @@ public void StepThreeSS()
 
       QueryHelper<object, object> qh = QueryHelper<object, object>.GetHelper(CacheHelper.DCache);
 
-      QueryService<object, object> qs = null;
+      QueryService<object> qs = null;
 
-      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object>();
 
       int qryIdx = 0;
 
@@ -223,9 +223,9 @@ public void StepFourSS()
 
       QueryHelper<object, object> qh = QueryHelper<object, object>.GetHelper(CacheHelper.DCache);
 
-      QueryService<object, object> qs = null;
+      QueryService<object> qs = null;
 
-      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object>();
 
       int qryIdx = 0;
 
diff --git a/clicache/integration-test/ThinClientSecurityAuthzTestBaseN.cs b/clicache/integration-test/ThinClientSecurityAuthzTestBaseN.cs
index a66c41d3..8b29e454 100644
--- a/clicache/integration-test/ThinClientSecurityAuthzTestBaseN.cs
+++ b/clicache/integration-test/ThinClientSecurityAuthzTestBaseN.cs
@@ -311,7 +311,7 @@ private bool CheckFlags(OpFlags flags, OpFlags checkFlag)
               }
               else
               {
-                queryResults = CacheHelper.getMultiuserCache(creds).GetQueryService<object, object>().NewQuery("SELECT DISTINCT * FROM " + region.FullPath).Execute();
+                queryResults = CacheHelper.getMultiuserCache(creds).GetQueryService<object>().NewQuery("SELECT DISTINCT * FROM " + region.FullPath).Execute();
               }
               Assert.IsNotNull(queryResults);
               if (!CheckFlags(flags, OpFlags.CheckFail))
@@ -407,14 +407,14 @@ private bool CheckFlags(OpFlags flags, OpFlags checkFlag)
               break;
             case OperationCode.ExecuteCQ:
               Pool/*<object, object>*/ pool = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_");
-              QueryService<object, object> qs;
+              QueryService<object> qs;
               if (pool != null)
               {
-                qs = pool.GetQueryService<object, object>();
+                qs = pool.GetQueryService<object>();
               }
               else
               {
-                //qs = CacheHelper.DCache.GetQueryService<object, object>();
+                //qs = CacheHelper.DCache.GetQueryService<object>();
                 qs = null;
 
               }
diff --git a/clicache/integration-test/ThinClientSecurityAuthzTestsMUN.cs b/clicache/integration-test/ThinClientSecurityAuthzTestsMUN.cs
index 3d697bb3..04a8d96d 100644
--- a/clicache/integration-test/ThinClientSecurityAuthzTestsMUN.cs
+++ b/clicache/integration-test/ThinClientSecurityAuthzTestsMUN.cs
@@ -219,7 +219,7 @@ public override void EndTest()
     }
 
     protected const string RegionName_CQ = "Portfolios";
-    static QueryService<object, object> gQueryService = null;
+    static QueryService<object> gQueryService = null;
 
     static string [] QueryStrings = {
                         "select * from /Portfolios p where p.ID < 1",
@@ -249,7 +249,7 @@ public void registerCQ(Properties<string, string> credentials, bool durableCQ)
       }
 
       // VJR: TODO fix cache.GetQueryService to also be generic
-      gQueryService = CacheHelper.getMultiuserCache(credentials).GetQueryService<object, object>();
+      gQueryService = CacheHelper.getMultiuserCache(credentials).GetQueryService<object>();
 
       for (int i = 0; i < QueryStrings.Length; i++)
       {
@@ -317,7 +317,7 @@ public void verifyCQEvents(bool whetherResult, CqOperationType opType )
       Util.Log("verifyCQEvents " + gQueryService);
       Assert.IsNotNull(gQueryService);
 
-      CqQuery<object, object> cq = gQueryService.GetCq("cq_" + 3);
+      CqQuery<object, object> cq = gQueryService.GetCq<object>("cq_" + 3);
       ICqListener<object, object>[] cqL = cq.GetCqAttributes().getCqListeners();
       MyCqListener2<object, object> mcqL = (MyCqListener2<object, object>)cqL[0];
 
@@ -338,7 +338,7 @@ public void verifyCQEvents(bool whetherResult, CqOperationType opType )
           Assert.AreEqual(0, mcqL.Updates, "CQ listener 3 should not get any update event ");
       }
 
-      cq = gQueryService.GetCq("cq_" + 4);
+      cq = gQueryService.GetCq<object>("cq_" + 4);
       cqL = cq.GetCqAttributes().getCqListeners();
       mcqL = (MyCqListener2<object, object>)cqL[0];
 
@@ -359,7 +359,7 @@ public void verifyCQEvents(bool whetherResult, CqOperationType opType )
           Assert.AreEqual(0, mcqL.Updates, "CQ listener 4 should not get any update event ");
       }
 
-      cq = gQueryService.GetCq("cq_" + 0);
+      cq = gQueryService.GetCq<object>("cq_" + 0);
       cqL = cq.GetCqAttributes().getCqListeners();
       mcqL = (MyCqListener2<object, object>)cqL[0];
 
diff --git a/clicache/integration-test/ThinClientStringArrayTestsN.cs b/clicache/integration-test/ThinClientStringArrayTestsN.cs
index 6294bb08..c771784f 100644
--- a/clicache/integration-test/ThinClientStringArrayTestsN.cs
+++ b/clicache/integration-test/ThinClientStringArrayTestsN.cs
@@ -151,8 +151,8 @@ public void StepOneQE(string locators)
       region["3"] = p3;
       region["4"] = p4;
 
-      QueryService<object, object> qs = null;
-      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+      QueryService<object> qs = null;
+      qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object>();
       Query<object> qry = qs.NewQuery("select * from /" + QERegionName + "  p where p.ID!=3");
       ISelectResults<object> results = qry.Execute();
       Util.Log("Results size {0}.", results.Size);
diff --git a/clicache/src/Cache.cpp b/clicache/src/Cache.cpp
index d7a11110..2995b15c 100644
--- a/clicache/src/Cache.cpp
+++ b/clicache/src/Cache.cpp
@@ -201,14 +201,14 @@ namespace Apache
         return rootRegions;
       }
 
-      generic<class TKey, class TResult>
-      Client::QueryService<TKey, TResult>^ Cache::GetQueryService( )
+      generic<class TResult>
+      Client::QueryService<TResult>^ Cache::GetQueryService( )
       {
         _GF_MG_EXCEPTION_TRY2
 
           try
           {
-            return Client::QueryService<TKey, TResult>::Create(m_nativeptr->get()->getQueryService());
+            return Client::QueryService<TResult>::Create(m_nativeptr->get()->getQueryService());
           }
           finally
           {
@@ -218,15 +218,15 @@ namespace Apache
         _GF_MG_EXCEPTION_CATCH_ALL2
       }
 
-      generic<class TKey, class TResult>
-      Client::QueryService<TKey, TResult>^ Cache::GetQueryService(String^ poolName )
+      generic<class TResult>
+      Client::QueryService< TResult>^ Cache::GetQueryService(String^ poolName )
       {
         _GF_MG_EXCEPTION_TRY2
 
           ManagedString mg_poolName( poolName );
           try
           {
-            return QueryService<TKey, TResult>::Create(m_nativeptr->get()->getQueryService(mg_poolName.CharPtr));
+            return QueryService< TResult>::Create(m_nativeptr->get()->getQueryService(mg_poolName.CharPtr));
           }
           finally
           {
diff --git a/clicache/src/Cache.hpp b/clicache/src/Cache.hpp
index 78b53ed8..8c5c2b4f 100644
--- a/clicache/src/Cache.hpp
+++ b/clicache/src/Cache.hpp
@@ -35,7 +35,7 @@ namespace Apache
 
       namespace native = apache::geode::client;
 
-      generic<class TKey, class TResult>
+      generic<class TResult>
       ref class QueryService;
 
       ref class RegionFactory;
@@ -205,8 +205,8 @@ namespace Apache
         /// at least some endpoints must have been defined in some regions
         /// before actually firing a query.
         /// </remarks>
-        generic<class TKey, class TResult>
-        virtual Client::QueryService<TKey, TResult>^ GetQueryService();
+        generic<class TResult>
+        virtual Client::QueryService<TResult>^ GetQueryService();
 
         /// <summary>
         /// Get a query service object to be able to query the cache.
@@ -217,8 +217,8 @@ namespace Apache
         /// at least some endpoints must have been defined in some regions
         /// before actually firing a query.
         /// </remarks>
-        generic<class TKey, class TResult>
-        virtual Client::QueryService<TKey, TResult>^ GetQueryService(String^ poolName);
+        generic<class TResult>
+        virtual Client::QueryService<TResult>^ GetQueryService(String^ poolName);
 
         /// <summary>
         /// Returns the instance of <see cref="RegionFactory" /> to create the region
diff --git a/clicache/src/IRegionService.hpp b/clicache/src/IRegionService.hpp
index 2a4bb96c..21d44841 100644
--- a/clicache/src/IRegionService.hpp
+++ b/clicache/src/IRegionService.hpp
@@ -32,7 +32,7 @@ namespace Apache
       generic<class TKey, class TValue>
 			interface class IRegion;
 
-      generic<class TKey, class TResult>
+      generic<class TResult>
       ref class QueryService;
 
       interface class IPdxInstanceFactory;
@@ -103,8 +103,8 @@ namespace Apache
         /// at least some endpoints must have been defined in some regions
         /// before actually firing a query.
         /// </remarks>
-        generic<class TKey, class TResult>
-        Client::QueryService<TKey, TResult>^ GetQueryService();
+        generic<class TResult>
+        Client::QueryService<TResult>^ GetQueryService();
         /// <summary>
         /// Returns an array of root regions in the cache. This set is a
         /// snapshot and is not backed by the cache.
diff --git a/clicache/src/Pool.cpp b/clicache/src/Pool.cpp
index 78756196..2722514a 100644
--- a/clicache/src/Pool.cpp
+++ b/clicache/src/Pool.cpp
@@ -422,14 +422,14 @@ namespace Apache
 
       }
 
-      generic<class TKey, class TResult>
-      QueryService<TKey, TResult>^ Pool::GetQueryService()
+      generic<class TResult>
+      QueryService<TResult>^ Pool::GetQueryService()
       {
         _GF_MG_EXCEPTION_TRY2/* due to auto replace */
 
           try
           {
-            return QueryService<TKey, TResult>::Create(m_nativeptr->get()->getQueryService());
+            return QueryService< TResult>::Create(m_nativeptr->get()->getQueryService());
           }
           finally
           {
diff --git a/clicache/src/Pool.hpp b/clicache/src/Pool.hpp
index f6b08d29..1de04aef 100644
--- a/clicache/src/Pool.hpp
+++ b/clicache/src/Pool.hpp
@@ -34,7 +34,7 @@ namespace Apache
 
       namespace native = apache::geode::client;
 
-      generic<class TKey, class TResult>
+      generic<class TResult>
       ref class QueryService;
 
       ref class Cache;
@@ -270,8 +270,8 @@ namespace Apache
         /// To perform Query operation on the local cache obtain the QueryService
         /// instance from the Cache.
         /// </remarks>
-        generic<class TKey, class TResult>
-        QueryService<TKey, TResult>^ GetQueryService();
+        generic<class TResult>
+        QueryService<TResult>^ GetQueryService();
 
         void ReleaseThreadLocalConnection();
 
diff --git a/clicache/src/QueryService.cpp b/clicache/src/QueryService.cpp
index a3ddfbe0..782a9561 100644
--- a/clicache/src/QueryService.cpp
+++ b/clicache/src/QueryService.cpp
@@ -35,9 +35,8 @@ namespace Apache
     namespace Client
     {
 
-      generic<class TKey, class TResult>
-      //generic<class TResult>
-      Query<TResult>^ QueryService<TKey, TResult>::NewQuery(String^ query)
+      generic<class TResult>
+      Query<TResult>^ QueryService<TResult>::NewQuery(String^ query)
       {
         ManagedString mg_queryStr(query);
         try
@@ -55,27 +54,30 @@ namespace Apache
         }
       }
 
-      generic<class TKey, class TResult>
-      CqQuery<TKey, TResult>^ QueryService<TKey, TResult>::NewCq(String^ query, CqAttributes<TKey, TResult>^ cqAttr, bool isDurable)
-      {
-        ManagedString mg_queryStr(query);
-        try
-        {
-          return CqQuery<TKey, TResult>::Create(m_nativeptr->get()->newCq(
-            mg_queryStr.CharPtr, cqAttr->GetNative(), isDurable));
-        }
-        catch (const apache::geode::client::Exception& ex)
+      generic<class TResult>
+      generic<class TKey>
+        CqQuery<TKey, TResult>^ QueryService<TResult>::NewCq(String^ query, CqAttributes<TKey, TResult>^ cqAttr, bool isDurable)
         {
-          throw GeodeException::Get(ex);
-        }
-        finally
-        {
-          GC::KeepAlive(m_nativeptr);
+          ManagedString mg_queryStr(query);
+          try
+          {
+            return CqQuery<TKey, TResult>::Create(m_nativeptr->get()->newCq(
+              mg_queryStr.CharPtr, cqAttr->GetNative(), isDurable));
+          }
+          catch (const apache::geode::client::Exception& ex)
+          {
+            throw GeodeException::Get(ex);
+          }
+          finally
+          {
+            GC::KeepAlive(m_nativeptr);
+          }
         }
-      }
 
-      generic<class TKey, class TResult>
-      CqQuery<TKey, TResult>^ QueryService<TKey, TResult>::NewCq(String^ name, String^ query, CqAttributes<TKey, TResult>^ cqAttr, bool isDurable)
+    
+      generic<class TResult>
+      generic< class TKey>
+      CqQuery<TKey, TResult>^ QueryService<TResult>::NewCq(String^ name, String^ query, CqAttributes<TKey, TResult>^ cqAttr, bool isDurable)
       {
         ManagedString mg_queryStr(query);
         ManagedString mg_nameStr(name);
@@ -94,8 +96,8 @@ namespace Apache
         }
       }
 
-      generic<class TKey, class TResult>
-      void QueryService<TKey, TResult>::CloseCqs()
+      generic<class TResult>
+      void QueryService<TResult>::CloseCqs()
       {
         try
         {
@@ -111,8 +113,9 @@ namespace Apache
         }
       }
 
-      generic<class TKey, class TResult>
-      array<CqQuery<TKey, TResult>^>^ QueryService<TKey, TResult>::GetCqs()
+      generic<class TResult>
+      generic<class TKey>
+      array<CqQuery<TKey, TResult>^>^ QueryService<TResult>::GetCqs()
       {
         try
         {
@@ -136,8 +139,9 @@ namespace Apache
         }
       }
 
-      generic<class TKey, class TResult>
-      CqQuery<TKey, TResult>^ QueryService<TKey, TResult>::GetCq(String^ name)
+      generic<class TResult>
+      generic<class TKey>
+      CqQuery<TKey, TResult>^ QueryService<TResult>::GetCq(String^ name)
       {
         ManagedString mg_queryStr(name);
         try
@@ -155,8 +159,8 @@ namespace Apache
         }
       }
 
-      generic<class TKey, class TResult>
-      void QueryService<TKey, TResult>::ExecuteCqs()
+      generic<class TResult>
+      void QueryService<TResult>::ExecuteCqs()
       {
         try
         {
@@ -172,8 +176,8 @@ namespace Apache
         }
       }
 
-      generic<class TKey, class TResult>
-      void QueryService<TKey, TResult>::StopCqs()
+      generic<class TResult>
+      void QueryService<TResult>::StopCqs()
       {
         try
         {
@@ -189,8 +193,8 @@ namespace Apache
         }
       }
 
-      generic<class TKey, class TResult>
-      CqServiceStatistics^ QueryService<TKey, TResult>::GetCqStatistics()
+      generic<class TResult>
+      CqServiceStatistics^ QueryService<TResult>::GetCqStatistics()
       {
         try
         {
@@ -206,8 +210,8 @@ namespace Apache
         }
       }
 
-      generic<class TKey, class TResult>
-      System::Collections::Generic::List<String^>^ QueryService<TKey, TResult>::GetAllDurableCqsFromServer()
+      generic<class TResult>
+      System::Collections::Generic::List<String^>^ QueryService<TResult>::GetAllDurableCqsFromServer()
       {
         try
         {
diff --git a/clicache/src/QueryService.hpp b/clicache/src/QueryService.hpp
index 3bb89f7f..a04de526 100644
--- a/clicache/src/QueryService.hpp
+++ b/clicache/src/QueryService.hpp
@@ -22,6 +22,15 @@
 #include "begin_native.hpp"
 #include <geode/QueryService.hpp>
 #include "end_native.hpp"
+#include "Query.hpp"
+#include "Log.hpp"
+#include "CqAttributes.hpp"
+#include "CqQuery.hpp"
+#include "CqServiceStatistics.hpp"
+#include "impl/ManagedString.hpp"
+#include "ExceptionTypes.hpp"
+#include "impl/SafeConvert.hpp"
+
 
 
 
@@ -51,7 +60,7 @@ namespace Apache
       /// <summary>
       /// Provides a query service.
       /// </summary>
-      generic<class TKey, class TResult>
+      generic<class TResult>
       public ref class QueryService sealed
       {
       public:
@@ -66,65 +75,66 @@ namespace Apache
         /// Get a <c>CqQuery</c> object to enable continuous querying.
         /// </summary>
         /// @endnativeclient
-        //generic<class TKey, class TResult>
-        CqQuery<TKey, TResult>^ NewCq( String^ query, CqAttributes<TKey, TResult>^ cqAttr, bool isDurable );
+        generic<class TKey>
+          CqQuery<TKey, TResult>^ NewCq(String^ query, CqAttributes<TKey, TResult>^ cqAttr, bool isDurable);
+  
         /// @nativeclient
         /// <summary>
         /// Get a <c>CqQuery</c> object to enable continuous querying.
         /// </summary>
         /// @endnativeclient
-        //generic<class TKey, class TResult>
+        generic<class TKey>
         CqQuery<TKey, TResult>^ NewCq( String^ name, String^ query, CqAttributes<TKey, TResult>^ cqAttr, bool isDurable );
         /// @nativeclient
         /// <summary>
         /// Close all  <c>CqQuery</c> on this client.
         /// </summary>
         /// @endnativeclient
-	void CloseCqs();
+	      void CloseCqs();
 
         /// @nativeclient
         /// <summary>
         /// Get all  <c>CqQuery</c> on this client.
         /// </summary>
         /// @endnativeclient
-  //generic<class TKey, class TResult>
-	array<CqQuery<TKey, TResult>^>^ GetCqs();
+        generic<class TKey>
+	      array<CqQuery<TKey, TResult>^>^ GetCqs();
 
         /// @nativeclient
         /// <summary>
         /// Get the  <c>CqQuery</c> with the given name on this client.
         /// </summary>
         /// @endnativeclient
-  //generic<class TKey, class TResult>
-	CqQuery<TKey, TResult>^ GetCq(String^ name);
+        generic<class TKey>
+	      CqQuery<TKey, TResult>^ GetCq(String^ name);
 
         /// @nativeclient
         /// <summary>
         /// Get the  <c>CqQuery</c> with the given name on this client.
         /// </summary>
         /// @endnativeclient
-	void ExecuteCqs();
+	      void ExecuteCqs();
 
         /// @nativeclient
         /// <summary>
         /// Stop all  <c>CqQuery</c>  on this client.
         /// </summary>
         /// @endnativeclient
-	void StopCqs();
+	      void StopCqs();
 
         /// @nativeclient
         /// <summary>
         /// Get <c>CqServiceStatistics</c>  on this client.
         /// </summary>
         /// @endnativeclient
-	CqServiceStatistics^ GetCqStatistics();
+	      CqServiceStatistics^ GetCqStatistics();
 
         /// @nativeclient
         /// <summary>
         /// Get all durableCq nanes from server for this client.
         /// </summary>
         /// @endnativeclient
-  System::Collections::Generic::List<String^>^ GetAllDurableCqsFromServer();
+        System::Collections::Generic::List<String^>^ GetAllDurableCqsFromServer();
 
       internal:
 
@@ -136,10 +146,10 @@ namespace Apache
         /// <returns>
         /// The managed wrapper object; null if the native pointer is null.
         /// </returns>
-        inline static QueryService<TKey, TResult>^ Create(std::shared_ptr<native::QueryService> nativeptr )
+        inline static QueryService<TResult>^ Create(std::shared_ptr<native::QueryService> nativeptr )
         {
           return __nullptr == nativeptr ? nullptr :
-            gcnew QueryService<TKey, TResult>( nativeptr );
+            gcnew QueryService<TResult>( nativeptr );
         }
 
 
diff --git a/clicache/src/impl/AuthenticatedCache.cpp b/clicache/src/impl/AuthenticatedCache.cpp
index 14fa38cd..a22991fd 100644
--- a/clicache/src/impl/AuthenticatedCache.cpp
+++ b/clicache/src/impl/AuthenticatedCache.cpp
@@ -88,14 +88,14 @@ namespace Apache
         _GF_MG_EXCEPTION_CATCH_ALL2
       }
       
-      generic<class TKey, class TResult>
-      Client::QueryService<TKey, TResult>^ AuthenticatedCache::GetQueryService( )
+      generic<class TResult>
+      Client::QueryService<TResult>^ AuthenticatedCache::GetQueryService( )
       {
         _GF_MG_EXCEPTION_TRY2
 
           try
           {
-            return Client::QueryService<TKey, TResult>::Create(m_nativeptr->get()->getQueryService( ));
+            return Client::QueryService<TResult>::Create(m_nativeptr->get()->getQueryService( ));
           }
           finally
           {
diff --git a/clicache/src/impl/AuthenticatedCache.hpp b/clicache/src/impl/AuthenticatedCache.hpp
index 375c17fa..f41d15e9 100644
--- a/clicache/src/impl/AuthenticatedCache.hpp
+++ b/clicache/src/impl/AuthenticatedCache.hpp
@@ -110,8 +110,8 @@ namespace Apache
         /// at least some endpoints must have been defined in some regions
         /// before actually firing a query.
         /// </remarks>
-        generic<class TKey, class TResult>
-        virtual QueryService<TKey, TResult>^ GetQueryService();
+        generic<class TResult>
+        virtual QueryService<TResult>^ GetQueryService();
 
         /// <summary>
         /// Returns an array of root regions in the cache. This set is a
diff --git a/tests/cli/NewFwkLib/CacheServer.cs b/tests/cli/NewFwkLib/CacheServer.cs
index ccb11825..12512579 100644
--- a/tests/cli/NewFwkLib/CacheServer.cs
+++ b/tests/cli/NewFwkLib/CacheServer.cs
@@ -1050,7 +1050,7 @@ private TVal GetUserObject(string objType)
       DateTime startTime;
       DateTime endTime;
       TimeSpan elapsedTime;
-      QueryService<TKey, object> qs = CheckQueryService();
+      QueryService<object> qs = CheckQueryService();
       if (AllowQuery(currentQuery.Category, currentQuery.IsLargeResultset,
             isLargeSetQuery, isUnsupportedPRQuery))
         {
@@ -2818,7 +2818,7 @@ public void DoEntryOperationsForSecurity()
             }
             else if (opCode == "query")
             {
-              QueryService<TKey, object> qs = CheckQueryService();
+              QueryService<object> qs = CheckQueryService();
               Query<object> qry = qs.NewQuery("select distinct * from /Portfolios where FALSE");
               ISelectResults<object> result = qry.Execute(TimeSpan.FromSeconds(600));
               query++;
@@ -2826,7 +2826,7 @@ public void DoEntryOperationsForSecurity()
             else if (opCode == "cq")
             {
               string cqName = String.Format("cq-{0}-{1}", Util.ClientId ,cnt++);
-              QueryService<TKey, object> qs = CheckQueryService();
+              QueryService<object> qs = CheckQueryService();
               CqAttributesFactory<TKey, object> cqFac = new CqAttributesFactory<TKey, object>();
               ICqListener<TKey, object> cqLstner = new MyCqListener<TKey, object>();
               cqFac.AddCqListener(cqLstner);
@@ -3513,12 +3513,12 @@ public void DoVerifyQueryResult()
   FwkInfo("localInvalidate size is {0}", localInvalidate);
   while (query != null && query.Length > 0)
   {
-      QueryService<TKey, object> qs = CheckQueryService();
+      QueryService<object> qs = CheckQueryService();
       DateTime startTime;
       TimeSpan elapsedTime;
       ISelectResults<object> results;
       string CqName = String.Format("_default{0}", query);
-      CqQuery<TKey, object> cq = qs.GetCq(CqName);
+      CqQuery<TKey, object> cq = qs.GetCq<TKey>(CqName);
       try
       {
         if (cq.IsRunning())
@@ -4494,7 +4494,7 @@ public void DoCqForMU()
       {
         string userName = (String)userList[i];
         string cqName = String.Format("cq-{0}", userName);
-        QueryService<TKey, object> qs = authCache.GetQueryService<TKey, object>();
+        QueryService<object> qs = authCache.GetQueryService<object>();
         CqAttributesFactory<TKey, object> cqFac = new CqAttributesFactory<TKey, object>();
         ICqListener<TKey, object> cqLstner = new MyCqListener<TKey, object>();
         cqFac.AddCqListener(cqLstner);
@@ -4572,13 +4572,13 @@ public void DoCqForMU()
         string uName = (String)userList[0];
         IRegion<TKey, TVal> region = proxyRegionMap[uName];
         IRegionService authCache = authCacheMap[uName];
-        QueryService<TKey, object> qs = authCache.GetQueryService<TKey, object>();
+        QueryService<object> qs = authCache.GetQueryService<object>();
         ICqListener<TKey, object> cqLstner = new MyCqListener<TKey, object>();
         for (Int32 i = 0; i < userList.Count; i++)
         {
           string userName = (String)userList[i];
           string cqName = String.Format("cq-{0}", userName);
-          CqQuery<TKey, object> cq = qs.GetCq(cqName);
+          CqQuery<TKey, object> cq = qs.GetCq<TKey>(cqName);
           CqStatistics cqStats = cq.GetStatistics();
           CqAttributes<TKey, object> cqAttr = cq.GetCqAttributes();
           ICqListener<TKey, object>[] vl = cqAttr.getCqListeners();
@@ -4689,14 +4689,14 @@ public void DoEntryOperationsForMU()
              
             else if (opCode == "query")
             {
-              QueryService<TKey, object> qs = authCache.GetQueryService<TKey, object>();
+              QueryService<object> qs = authCache.GetQueryService<object>();
               Query<object> qry = qs.NewQuery("select distinct * from /Portfolios where FALSE");
               ISelectResults<object> result = qry.Execute(TimeSpan.FromSeconds(600));
             }
             else if (opCode == "cq")
             {
               string cqName = String.Format("cq-{0}",userName);
-              QueryService<TKey, object> qs = authCache.GetQueryService<TKey, object>();
+              QueryService<object> qs = authCache.GetQueryService<object>();
               CqAttributesFactory<TKey, object> cqFac = new CqAttributesFactory<TKey, object>();
               ICqListener<TKey, object> cqLstner = new MyCqListener<TKey, object>();
               cqFac.AddCqListener(cqLstner);
diff --git a/tests/cli/NewFwkLib/FwkTest.cs b/tests/cli/NewFwkLib/FwkTest.cs
index a85fd98b..ad0aa378 100644
--- a/tests/cli/NewFwkLib/FwkTest.cs
+++ b/tests/cli/NewFwkLib/FwkTest.cs
@@ -1503,11 +1503,11 @@ public virtual void EndTask()
       PopTaskName();
     }
 
-    public QueryService<TKey, object> CheckQueryService()
+    public QueryService<object> CheckQueryService()
     {
       string mode = Util.GetEnvironmentVariable("POOLOPT");
       Pool/*<TKey, TVal>*/ pool = CacheHelper<TKey, TVal>.DCache.GetPoolManager().Find("_Test_Pool");
-      return pool.GetQueryService<TKey, object>();
+      return pool.GetQueryService<object>();
     }
 
     #endregion
diff --git a/tests/cli/NewFwkLib/PdxTest/PdxTests.cs b/tests/cli/NewFwkLib/PdxTest/PdxTests.cs
index 72199d74..b64ef9f0 100644
--- a/tests/cli/NewFwkLib/PdxTest/PdxTests.cs
+++ b/tests/cli/NewFwkLib/PdxTest/PdxTests.cs
@@ -1099,7 +1099,7 @@ private TVal GetUserObject(string objType)
             DateTime startTime;
             DateTime endTime;
             TimeSpan elapsedTime;
-            QueryService<TKey, object> qs = CheckQueryService();
+            QueryService<object> qs = CheckQueryService();
             if (AllowQuery(currentQuery.Category, currentQuery.IsLargeResultset,
                   isLargeSetQuery, isUnsupportedPRQuery))
             {
@@ -3539,14 +3539,14 @@ public void DoEntryOperationsForSecurity()
                         }
                         else if (opCode == "query")
                         {
-                            QueryService<TKey, object> qs = CheckQueryService();
+                            QueryService<object> qs = CheckQueryService();
                             Query<object> qry = qs.NewQuery("select distinct * from /Portfolios where FALSE");
                             ISelectResults<object> result = qry.Execute(TimeSpan.FromSeconds(600));
                         }
                         else if (opCode == "cq")
                         {
                             string cqName = String.Format("cq-{0}-{1}", Util.ClientId, cnt++);
-                            QueryService<TKey, object> qs = CheckQueryService();
+                            QueryService<object> qs = CheckQueryService();
                             CqAttributesFactory<TKey, object> cqFac = new CqAttributesFactory<TKey, object>();
                             ICqListener<TKey, object> cqLstner = new MyCqListener<TKey, object>();
                             cqFac.AddCqListener(cqLstner);
diff --git a/tests/cli/NewFwkLib/QueryTest/QueryTests.cs b/tests/cli/NewFwkLib/QueryTest/QueryTests.cs
index 787db672..d0e56382 100644
--- a/tests/cli/NewFwkLib/QueryTest/QueryTests.cs
+++ b/tests/cli/NewFwkLib/QueryTest/QueryTests.cs
@@ -233,7 +233,7 @@ private bool VerifyResultSet(int distinctKeys)
       }
       int numSet = numOfKeys / setSize;
 
-      QueryService<TKey, object> qs = CheckQueryService(); 
+      QueryService<object> qs = CheckQueryService(); 
 
       ResetKey(CategoryType);
       int category;
@@ -414,7 +414,7 @@ private bool VerifyStructSet(int distinctKeys)
       }
       int numSet = numOfKeys / setSize;
 
-      QueryService<TKey, object> qs = CheckQueryService();
+      QueryService<object> qs = CheckQueryService();
 
       DateTime startTime;
       DateTime endTime;
@@ -568,14 +568,14 @@ private bool ReadQueryString(ref String query)
           FwkSevere("ReadQueryString: ResultSize is not defined in xml.");
           return false;
         }
-        QueryService<TKey, object> qs = CheckQueryService();
+        QueryService<object> qs = CheckQueryService();
         DateTime startTime;
         TimeSpan elapsedTime;
         ISelectResults<object> results;
         if (isCq)
         {
           string CqName = String.Format("_default{0}",query);
-          CqQuery<TKey, object> cq = qs.GetCq(CqName);
+          CqQuery<TKey, object> cq = qs.GetCq<TKey>(CqName);
           startTime = DateTime.Now;
           results = cq.ExecuteWithInitialResults(QueryResponseTimeout);
           elapsedTime = DateTime.Now - startTime;
@@ -737,7 +737,7 @@ public void DoRegisterCq()
         string key = "CQLISTENER_" + clientId;
         while (qryStr != null)
         {
-          QueryService<TKey, object> qs = CheckQueryService();
+          QueryService<object> qs = CheckQueryService();
           CqAttributesFactory<TKey, object> cqFac = new CqAttributesFactory<TKey, object>();
           ICqListener<TKey, object> cqLstner = new MyCq1Listener<TKey, object>();
           cqFac.AddCqListener(cqLstner);
@@ -767,7 +767,7 @@ public void DoRegisterCqForConc()
         bool isdurable = GetBoolValue("isDurableC");
         while (qryStr != null)
         {
-          QueryService<TKey, object> qs = CheckQueryService();
+          QueryService<object> qs = CheckQueryService();
           CqAttributesFactory<TKey, object> cqFac = new CqAttributesFactory<TKey, object>();
           ICqListener<TKey, object> cqLstner = new MyCq1Listener<TKey, object>();
           cqFac.AddCqListener(cqLstner);
@@ -799,7 +799,7 @@ public void DoValidateCq()
         FwkInfo("In QueryTest.DoValidateCq()");
         try
         {
-          QueryService<TKey, object> qs = CheckQueryService();
+          QueryService<object> qs = CheckQueryService();
           ResetKey("isDurableC");
           bool isdurable = GetBoolValue("isDurableC");
           ResetKey("NoCqs");
@@ -843,9 +843,9 @@ public void DoVerifyCQListenerInvoked()
       FwkInfo("In QueryTest.DoVerifyCQListenerInvoked()");
       try
       {
-        QueryService<TKey, object> qs = CheckQueryService();
+        QueryService<object> qs = CheckQueryService();
         ICqListener<TKey, object> cqLstner = new MyCq1Listener<TKey, object>();
-        CqQuery<TKey, object>[] vcq = qs.GetCqs();
+        CqQuery<TKey, object>[] vcq = qs.GetCqs<TKey>();
         System.Collections.Generic.List<string> durableCqList = qs.GetAllDurableCqsFromServer();
         FwkInfo("Durable Cq count is {0} and all cq count is {1}", durableCqList.Count, vcq.Length);
         //Validate Cq by name
@@ -968,8 +968,8 @@ public void DoVerifyCqDestroyed()
       FwkInfo("In QueryTest.DoVerifyCQDestroy()");
       try
       {
-        QueryService<TKey, object> qs = CheckQueryService();
-        CqQuery<TKey, object>[] vcq = qs.GetCqs();
+        QueryService<object> qs = CheckQueryService();
+        CqQuery<TKey, object>[] vcq = qs.GetCqs<TKey>();
         if (vcq.Length != 0)
         {
           FwkException("cqs should have been removed after close");
@@ -988,8 +988,8 @@ public void DoCQState()
       try
       {
         opcode = GetStringValue(CqState);
-        QueryService<TKey, object> qs = CheckQueryService();
-        CqQuery<TKey, object>[] vcq = qs.GetCqs();
+        QueryService<object> qs = CheckQueryService();
+        CqQuery<TKey, object>[] vcq = qs.GetCqs<TKey>();
         FwkInfo("QueryTest.DoCQState - number of cqs is {0} ", vcq.Length); 
         for (int i = 0; i < vcq.Length; i++)
         {
@@ -1029,13 +1029,13 @@ public void DoCQOperation()
       Int32 getCQAttributes = 0, getCQName = 0, getQuery = 0, getQueryString = 0, getStatistics = 0, stopCq = 0, closeCq = 0, executeCq = 0, executeCqWithIR = 0;
       FwkInfo("Operation will work for : {0}" ,secondsToRun);
       PaceMeter pm = new PaceMeter(opsSec);
-      QueryService<TKey, object> qs = CheckQueryService();
+      QueryService<object> qs = CheckQueryService();
       while (now < end)
       {
         try 
         {
           opCode=GetStringValue("cqOps");
-          CqQuery<TKey, object>[] vcq = qs.GetCqs();
+          CqQuery<TKey, object>[] vcq = qs.GetCqs<TKey>();
           CqQuery<TKey, object> cqs = (CqQuery<TKey, object>)vcq.GetValue(Util.Rand(vcq.Length));
           FwkInfo("Performing {0} on cq named {1}",opCode,cqs.Name);
           if (opCode == null || opCode.Length == 0)
@@ -1251,7 +1251,7 @@ public void ReRegisterCQ(CqQuery<TKey, object> cq)
         ICqListener<TKey, object> cqLstner = new MyCq1Listener<TKey, object>();
         cqFac.AddCqListener(cqLstner);
         CqAttributes<TKey, object> cqAttr = cqFac.Create();
-        QueryService<TKey, object> qs = CheckQueryService();
+        QueryService<object> qs = CheckQueryService();
         qs.NewCq(query, cqAttr,false);
       }
       catch (Exception ex)
@@ -1352,7 +1352,7 @@ public void DoRegisterAllKeys()
       }
     }
 
-    public ISelectResults<object> RemoteQuery(QueryService<TKey, object> qs, string queryStr)
+    public ISelectResults<object> RemoteQuery(QueryService<object> qs, string queryStr)
     {
       DateTime startTime;
       DateTime endTime;
@@ -1367,7 +1367,7 @@ public ISelectResults<object> RemoteQuery(QueryService<TKey, object> qs, string
       return results;
     }
 
-    public ISelectResults<object> ContinuousQuery(QueryService<TKey, object> qs, string queryStr, int cqNum)
+    public ISelectResults<object> ContinuousQuery(QueryService<object> qs, string queryStr, int cqNum)
     {
       DateTime startTime ,endTime;
       TimeSpan elapsedTime;


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> .NET QueryService templating should match usage
> -----------------------------------------------
>
>                 Key: GEODE-3977
>                 URL: https://issues.apache.org/jira/browse/GEODE-3977
>             Project: Geode
>          Issue Type: Bug
>          Components: native client
>            Reporter: Ernest Burghardt
>
> QueryService uses generics
>  generic<class TKey, class TResult>
>       //generic<class TResult>
>       Query<TResult>^ QueryService<TKey, TResult>::NewQuery(String^ query)
> but only TResult is used and this can be confusing to the user/developer...



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message