This is an automated email from the ASF dual-hosted git repository.

jbarrett pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode-native.git


The following commit(s) were added to refs/heads/develop by this push:
     new 5a43165   GEODE-4413: Converts CqOperation to enum class. (#198)
5a43165 is described below

commit 5a43165f963620d6e6f616936a399a0ca0c17eab
Author: Jacob Barrett <jbarr...@pivotal.io>
AuthorDate: Wed Jan 31 09:06:34 2018 -0800

     GEODE-4413: Converts CqOperation to enum class. (#198)
---
 clicache/integration-test/ThinClientCqTestsN.cs    | 14 +++---
 .../ThinClientSecurityAuthzTestsMUN.cs             | 20 ++++----
 clicache/src/CqEvent.cpp                           |  8 +--
 clicache/src/CqEvent.hpp                           |  4 +-
 clicache/src/CqOperation.hpp                       | 57 ++--------------------
 clicache/src/ICqEvent.hpp                          |  4 +-
 cppcache/include/geode/CqEvent.hpp                 |  4 +-
 cppcache/include/geode/CqOperation.hpp             | 33 ++++++-------
 cppcache/src/CqEventImpl.cpp                       |  8 +--
 cppcache/src/CqEventImpl.hpp                       | 12 ++---
 cppcache/src/CqQueryImpl.cpp                       |  4 +-
 cppcache/src/CqQueryImpl.hpp                       |  6 +--
 cppcache/src/CqService.cpp                         |  4 +-
 cppcache/src/CqService.hpp                         | 13 ++---
 quickstart/csharp/CqQuery.cs                       |  6 +--
 quickstart/csharp/PoolCqQuery.cs                   |  6 +--
 tests/cli/NewFwkLib/CacheServer.cs                 |  8 +--
 tests/cli/NewFwkLib/PdxTest/PdxTests.cs            |  8 +--
 tests/cli/NewFwkLib/QueryTest/QueryTests.cs        |  8 +--
 19 files changed, 87 insertions(+), 140 deletions(-)

diff --git a/clicache/integration-test/ThinClientCqTestsN.cs 
b/clicache/integration-test/ThinClientCqTestsN.cs
index a41db7c..62800cd 100644
--- a/clicache/integration-test/ThinClientCqTestsN.cs
+++ b/clicache/integration-test/ThinClientCqTestsN.cs
@@ -76,16 +76,16 @@ namespace Apache.Geode.Client.UnitTests
       /*ICacheableKey*/
       TKey key = ev.getKey();
 
-      CqOperationType opType = ev.getQueryOperation();
+      CqOperation opType = ev.getQueryOperation();
       //CacheableString keyS = key as CacheableString;
       string keyS = key.ToString(); //as string;
       Portfolio pval = val as Portfolio;
       PortfolioPdx pPdxVal = val as PortfolioPdx;
       Assert.IsTrue((pPdxVal != null) || (pval != null));
       //string opStr = "DESTROY";
-      /*if (opType == CqOperationType.OP_TYPE_CREATE)
+      /*if (opType == CqOperation.OP_TYPE_CREATE)
         opStr = "CREATE";
-      else if (opType == CqOperationType.OP_TYPE_UPDATE)
+      else if (opType == CqOperation.OP_TYPE_UPDATE)
         opStr = "UPDATE";*/
 
       //Util.Log("key {0}, value ({1},{2}), op {3}.", keyS,
@@ -125,11 +125,11 @@ namespace Apache.Geode.Client.UnitTests
       Object pkey = (Object)ev.getKey();
       int value = (int)val;
       int key = (int)pkey;
-      CqOperationType opType = ev.getQueryOperation();
+      CqOperation opType = ev.getQueryOperation();
       String opStr = "Default";
-      if (opType == CqOperationType.OP_TYPE_CREATE)
+      if (opType == CqOperation.OP_TYPE_CREATE)
         opStr = "CREATE";
-      else if (opType == CqOperationType.OP_TYPE_UPDATE)
+      else if (opType == CqOperation.OP_TYPE_UPDATE)
         opStr = "UPDATE";
 
       Util.Log("MyCqListener1::OnEvent called with {0} , key = {1}, value = 
{2} ",
@@ -207,7 +207,7 @@ namespace Apache.Geode.Client.UnitTests
       TResult val = (TResult)ev.getNewValue();      
       TKey key = ev.getKey();
 
-      CqOperationType opType = ev.getQueryOperation();      
+      CqOperation opType = ev.getQueryOperation();      
       string keyS = key.ToString(); //as string;      
     }
     public virtual void OnError(CqEvent<TKey, TResult> ev)
diff --git a/clicache/integration-test/ThinClientSecurityAuthzTestsMUN.cs 
b/clicache/integration-test/ThinClientSecurityAuthzTestsMUN.cs
index 12bf7ea..883c661 100644
--- a/clicache/integration-test/ThinClientSecurityAuthzTestsMUN.cs
+++ b/clicache/integration-test/ThinClientSecurityAuthzTestsMUN.cs
@@ -62,9 +62,9 @@ namespace Apache.Geode.Client.UnitTests
     void ICqListener<TKey, TResult>.OnEvent(CqEvent<TKey, TResult> ev)
     {
       Util.Log("CqListener OnEvent ops = " + ev.getBaseOperation());
-      if (ev.getBaseOperation() == CqOperationType.OP_TYPE_CREATE)
+      if (ev.getBaseOperation() == CqOperation.OP_TYPE_CREATE)
         m_create++;
-      else if (ev.getBaseOperation() == CqOperationType.OP_TYPE_UPDATE)
+      else if (ev.getBaseOperation() == CqOperation.OP_TYPE_UPDATE)
         m_update++;
     }
 
@@ -312,7 +312,7 @@ namespace Apache.Geode.Client.UnitTests
       Util.Log("doCQPut Done.");
     }
 
-    public void verifyCQEvents(bool whetherResult, CqOperationType opType )
+    public void verifyCQEvents(bool whetherResult, CqOperation opType )
     {
       Util.Log("verifyCQEvents " + gQueryService);
       Assert.IsNotNull(gQueryService);
@@ -323,14 +323,14 @@ namespace Apache.Geode.Client.UnitTests
 
       Util.Log("got result for cq listener3 " + cq.Name + " : " + 
mcqL.Creates);
 
-      if (opType == CqOperationType.OP_TYPE_CREATE)
+      if (opType == CqOperation.OP_TYPE_CREATE)
       {
         if (whetherResult)
           Assert.AreEqual(1, mcqL.Creates, "CQ listener 3 should get one 
create event ");
         else
           Assert.AreEqual(0, mcqL.Creates, "CQ listener 3 should not get any 
create event ");
       }
-      else if (opType == CqOperationType.OP_TYPE_UPDATE)
+      else if (opType == CqOperation.OP_TYPE_UPDATE)
       {
         if (whetherResult)
           Assert.AreEqual(1, mcqL.Updates, "CQ listener 3 should get one 
update event ");
@@ -344,14 +344,14 @@ namespace Apache.Geode.Client.UnitTests
 
       Util.Log("got result for cq listener4 " + cq.Name + " : " + 
mcqL.Creates);
 
-      if (opType == CqOperationType.OP_TYPE_CREATE)
+      if (opType == CqOperation.OP_TYPE_CREATE)
       {
         if (whetherResult)
           Assert.AreEqual(1, mcqL.Creates, "CQ listener 4 should get one 
create event ");
         else
           Assert.AreEqual(0, mcqL.Creates, "CQ listener 4 should not get any 
create event ");
       }
-      else if (opType == CqOperationType.OP_TYPE_UPDATE)
+      else if (opType == CqOperation.OP_TYPE_UPDATE)
       {
         if (whetherResult)
           Assert.AreEqual(1, mcqL.Updates, "CQ listener 4 should get one 
update event ");
@@ -417,7 +417,7 @@ namespace Apache.Geode.Client.UnitTests
         // Verify that the gets succeed
         m_client2.Call(doCQPut, createCredentials);
 
-        m_client1.Call(verifyCQEvents, true, CqOperationType.OP_TYPE_CREATE);
+        m_client1.Call(verifyCQEvents, true, CqOperation.OP_TYPE_CREATE);
 
         m_client1.Call(CloseUserCache, false);
         m_client1.Call(Close);
@@ -494,7 +494,7 @@ namespace Apache.Geode.Client.UnitTests
       m_client2.Call(doCQPut, createCredentials2);
 
       //close cache client-1
-      m_client1.Call(verifyCQEvents, true, CqOperationType.OP_TYPE_CREATE);
+      m_client1.Call(verifyCQEvents, true, CqOperation.OP_TYPE_CREATE);
 
       Thread.Sleep(10000);
 
@@ -515,7 +515,7 @@ namespace Apache.Geode.Client.UnitTests
 
       m_client1.Call(ReadyForEvents2);
       Thread.Sleep(20000);
-      m_client1.Call(verifyCQEvents, whetherResult, 
CqOperationType.OP_TYPE_UPDATE);
+      m_client1.Call(verifyCQEvents, whetherResult, 
CqOperation.OP_TYPE_UPDATE);
 
 
       m_client1.Call(Close);
diff --git a/clicache/src/CqEvent.cpp b/clicache/src/CqEvent.cpp
index 635dd0f..9deb142 100644
--- a/clicache/src/CqEvent.cpp
+++ b/clicache/src/CqEvent.cpp
@@ -39,15 +39,15 @@ namespace Apache
       }
 
       generic<class TKey, class TResult>
-      CqOperationType CqEvent<TKey, TResult>::getBaseOperation( )
+      CqOperation CqEvent<TKey, TResult>::getBaseOperation( )
       {
-                 return 
CqOperation::ConvertFromNative(m_nativeptr->getBaseOperation());
+                 return CqOperation(m_nativeptr->getBaseOperation());
       }
 
       generic<class TKey, class TResult>
-      CqOperationType CqEvent<TKey, TResult>::getQueryOperation( )
+      CqOperation CqEvent<TKey, TResult>::getQueryOperation( )
       {
-        return 
CqOperation::ConvertFromNative(m_nativeptr->getQueryOperation());
+        return CqOperation(m_nativeptr->getQueryOperation());
       }
 
       generic<class TKey, class TResult>
diff --git a/clicache/src/CqEvent.hpp b/clicache/src/CqEvent.hpp
index ad64be5..cc16e20 100644
--- a/clicache/src/CqEvent.hpp
+++ b/clicache/src/CqEvent.hpp
@@ -59,12 +59,12 @@ namespace Apache
         /// <summary>
         /// Get the operation on the base operation that triggered this event.
         /// </summary>
-       CqOperationType getBaseOperation();
+       CqOperation getBaseOperation();
 
         /// <summary>
         /// Get the operation on the query operation that triggered this event.
         /// </summary>
-       CqOperationType getQueryOperation();
+       CqOperation getQueryOperation();
 
         /// <summary>
         /// Get the key relating to the event.
diff --git a/clicache/src/CqOperation.hpp b/clicache/src/CqOperation.hpp
index a697706..623d49b 100644
--- a/clicache/src/CqOperation.hpp
+++ b/clicache/src/CqOperation.hpp
@@ -15,19 +15,9 @@
  * limitations under the License.
  */
 
-
-
 #pragma once
 
-
 #include "geode_defs.hpp"
-#include "begin_native.hpp"
-#include <geode/CqOperation.hpp>
-#include "end_native.hpp"
-
-
-
-using namespace System;
 
 namespace Apache
 {
@@ -35,14 +25,12 @@ namespace Apache
   {
     namespace Client
     {
-      namespace native = apache::geode::client;
-
       /// <summary>
-      /// Enumerated type for CqOperationType
+      /// Enumerated type for CqOperation
       /// </summary>
-      public enum class CqOperationType
+      public enum class CqOperation
       {
-       OP_TYPE_INVALID = -1,
+        OP_TYPE_INVALID = -1,
         OP_TYPE_CREATE = 0,
         OP_TYPE_UPDATE = 2,
         OP_TYPE_INVALIDATE = 4,
@@ -51,45 +39,6 @@ namespace Apache
         OP_TYPE_MARKER = 32
       };
 
-       public ref class CqOperation sealed
-      {
-      public:
-
-      /// <summary>
-      /// conenience function for convertin from c++ 
-      /// native::CqOperation::CqOperationType to
-      /// CqOperationType here.
-      /// </summary>
-         inline static CqOperationType 
ConvertFromNative(native::CqOperation::CqOperationType tp)
-         {
-                 if(tp==native::CqOperation::OP_TYPE_CREATE)
-                         return CqOperationType::OP_TYPE_CREATE;
-                 if(tp==native::CqOperation::OP_TYPE_UPDATE)
-                         return CqOperationType::OP_TYPE_UPDATE;
-                 if(tp==native::CqOperation::OP_TYPE_INVALIDATE)
-                         return CqOperationType::OP_TYPE_INVALIDATE;
-                 if(tp==native::CqOperation::OP_TYPE_REGION_CLEAR)
-                         return CqOperationType::OP_TYPE_REGION_CLEAR;
-                 if(tp==native::CqOperation::OP_TYPE_DESTROY)
-                         return CqOperationType::OP_TYPE_DESTROY;
-                 if(tp==native::CqOperation::OP_TYPE_MARKER)
-                         return CqOperationType::OP_TYPE_MARKER;
-                 return CqOperationType::OP_TYPE_INVALID;
-         }
-               internal:
-
-        /// <summary>
-        /// Internal constructor to wrap a native object pointer
-        /// </summary>
-        /// <param name="nativeptr">The native object pointer</param>
-        inline CqOperation( native::CqOperation* nativeptr )
-          : m_nativeptr(nativeptr)
-                   {
-        }
-
-      private:
-        const native::CqOperation* m_nativeptr;
-         };
     }  // namespace Client
   }  // namespace Geode
 }  // namespace Apache
diff --git a/clicache/src/ICqEvent.hpp b/clicache/src/ICqEvent.hpp
index c27d824..eea1fc6 100644
--- a/clicache/src/ICqEvent.hpp
+++ b/clicache/src/ICqEvent.hpp
@@ -92,9 +92,9 @@ namespace Apache
         /// but its previous value may have been null.
         /// </remarks>
         /// <seealso cref="Region.Put" />
-        CqOperationType getBaseOperation();
+        CqOperation getBaseOperation();
 
-        CqOperationType getQueryOperation();
+        CqOperation getQueryOperation();
 
         /// <summary>
         /// Called when the region containing this callback is destroyed, when
diff --git a/cppcache/include/geode/CqEvent.hpp 
b/cppcache/include/geode/CqEvent.hpp
index 677a312..03aef68 100644
--- a/cppcache/include/geode/CqEvent.hpp
+++ b/cppcache/include/geode/CqEvent.hpp
@@ -66,14 +66,14 @@ class _GEODE_EXPORT CqEvent {
    * Get the operation on the base region that triggered this event.
    * @return Operation operation on the base region (on which CQ is created).
    */
-  virtual CqOperation::CqOperationType getBaseOperation() const = 0;
+  virtual CqOperation getBaseOperation() const = 0;
 
   /**
    * Get the operation on the query results. Supported operations
    * include update, create, destroy, region clear and region invalidate.
    * @return Operation operation with respect to CQ.
    */
-  virtual CqOperation::CqOperationType getQueryOperation() const = 0;
+  virtual CqOperation getQueryOperation() const = 0;
 
   /**
    * Get the key relating to the event.
diff --git a/cppcache/include/geode/CqOperation.hpp 
b/cppcache/include/geode/CqOperation.hpp
index 678e621..142e606 100644
--- a/cppcache/include/geode/CqOperation.hpp
+++ b/cppcache/include/geode/CqOperation.hpp
@@ -1,8 +1,3 @@
-#pragma once
-
-#ifndef GEODE_CQOPERATION_H_
-#define GEODE_CQOPERATION_H_
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -20,6 +15,11 @@
  * limitations under the License.
  */
 
+#pragma once
+
+#ifndef GEODE_CQOPERATION_H_
+#define GEODE_CQOPERATION_H_
+
 #include "internal/geode_globals.hpp"
 
 /**
@@ -29,23 +29,20 @@
 namespace apache {
 namespace geode {
 namespace client {
+
 /**
  * Enumerated type for Operation actions.
  */
-class _GEODE_EXPORT CqOperation {
- public:
-  // types of operation CORESPONDING TO THE ONES in geode.cache.Operation
-
-  typedef enum {
-    OP_TYPE_INVALID = -1,
-    OP_TYPE_CREATE = 1,
-    OP_TYPE_UPDATE = 2,
-    OP_TYPE_INVALIDATE = 4,
-    OP_TYPE_REGION_CLEAR = 8,
-    OP_TYPE_DESTROY = 16,
-    OP_TYPE_MARKER = 32
-  } CqOperationType;
+enum class CqOperation {
+  OP_TYPE_INVALID = -1,
+  OP_TYPE_CREATE = 1,
+  OP_TYPE_UPDATE = 2,
+  OP_TYPE_INVALIDATE = 4,
+  OP_TYPE_REGION_CLEAR = 8,
+  OP_TYPE_DESTROY = 16,
+  OP_TYPE_MARKER = 32
 };
+
 }  // namespace client
 }  // namespace geode
 }  // namespace apache
diff --git a/cppcache/src/CqEventImpl.cpp b/cppcache/src/CqEventImpl.cpp
index 76c715a..2d0acc0 100644
--- a/cppcache/src/CqEventImpl.cpp
+++ b/cppcache/src/CqEventImpl.cpp
@@ -22,8 +22,8 @@
 
 using namespace apache::geode::client;
 CqEventImpl::CqEventImpl(std::shared_ptr<CqQuery>& cQuery,
-                         CqOperation::CqOperationType baseOp,
-                         CqOperation::CqOperationType cqOp,
+                         CqOperation baseOp,
+                         CqOperation cqOp,
                          std::shared_ptr<CacheableKey>& key,
                          std::shared_ptr<Cacheable>& value,
                          ThinClientBaseDM* tcrdm,
@@ -42,7 +42,7 @@ CqEventImpl::CqEventImpl(std::shared_ptr<CqQuery>& cQuery,
 }
 std::shared_ptr<CqQuery> CqEventImpl::getCq() const { return m_cQuery; }
 
-CqOperation::CqOperationType CqEventImpl::getBaseOperation() const {
+CqOperation CqEventImpl::getBaseOperation() const {
   return m_baseOp;
 }
 
@@ -50,7 +50,7 @@ CqOperation::CqOperationType CqEventImpl::getBaseOperation() 
const {
  * Get the the operation on the query results. Supported operations include
  * update, create, and destroy.
  */
-CqOperation::CqOperationType CqEventImpl::getQueryOperation() const {
+CqOperation CqEventImpl::getQueryOperation() const {
   return m_queryOp;
 }
 
diff --git a/cppcache/src/CqEventImpl.hpp b/cppcache/src/CqEventImpl.hpp
index 3c37052..b21f2b2 100644
--- a/cppcache/src/CqEventImpl.hpp
+++ b/cppcache/src/CqEventImpl.hpp
@@ -46,8 +46,8 @@ class EventId;
 class CqEventImpl : public CqEvent {
  public:
   CqEventImpl(std::shared_ptr<CqQuery>& cQuery,
-              CqOperation::CqOperationType baseOp,
-              CqOperation::CqOperationType cqOp,
+              CqOperation baseOp,
+              CqOperation cqOp,
               std::shared_ptr<CacheableKey>& key,
               std::shared_ptr<Cacheable>& value, ThinClientBaseDM* tcrdm,
               std::shared_ptr<CacheableBytes> deltaBytes,
@@ -58,13 +58,13 @@ class CqEventImpl : public CqEvent {
   /**
    * Get the operation on the base region that triggered this event.
    */
-  CqOperation::CqOperationType getBaseOperation() const;
+  CqOperation getBaseOperation() const;
 
   /**
    * Get the the operation on the query results. Supported operations include
    * update, create, and destroy.
    */
-  CqOperation::CqOperationType getQueryOperation() const;
+  CqOperation getQueryOperation() const;
 
   /**
    * Get the key relating to the event.
@@ -88,8 +88,8 @@ class CqEventImpl : public CqEvent {
  private:
   CqEventImpl();
   std::shared_ptr<CqQuery> m_cQuery;
-  CqOperation::CqOperationType m_baseOp;
-  CqOperation::CqOperationType m_queryOp;
+  CqOperation m_baseOp;
+  CqOperation m_queryOp;
   std::shared_ptr<CacheableKey> m_key;
   std::shared_ptr<Cacheable> m_newValue;
   bool m_error;
diff --git a/cppcache/src/CqQueryImpl.cpp b/cppcache/src/CqQueryImpl.cpp
index c9f6414..059ce5c 100644
--- a/cppcache/src/CqQueryImpl.cpp
+++ b/cppcache/src/CqQueryImpl.cpp
@@ -535,14 +535,14 @@ std::shared_ptr<CqAttributesMutator> 
CqQueryImpl::getCqAttributesMutator()
 /**
  * @return Returns the cqOperation.
  */
-CqOperation::CqOperationType CqQueryImpl::getCqOperation() const {
+CqOperation CqQueryImpl::getCqOperation() const {
   return m_cqOperation;
 }
 
 /**
  * @param cqOperation The cqOperation to set.
  */
-void CqQueryImpl::setCqOperation(CqOperation::CqOperationType cqOperation) {
+void CqQueryImpl::setCqOperation(CqOperation cqOperation) {
   m_cqOperation = cqOperation;
 }
 
diff --git a/cppcache/src/CqQueryImpl.hpp b/cppcache/src/CqQueryImpl.hpp
index 38a41fd..6f57e69 100644
--- a/cppcache/src/CqQueryImpl.hpp
+++ b/cppcache/src/CqQueryImpl.hpp
@@ -71,7 +71,7 @@ class CqQueryImpl : public CqQuery,
   // Stats counters
   std::shared_ptr<CqStatistics> m_stats;
   CqState::StateType m_cqState;
-  CqOperation::CqOperationType m_cqOperation;
+  CqOperation m_cqOperation;
 
   /* CQ Request Type - Start */
   //  unused
@@ -228,12 +228,12 @@ class CqQueryImpl : public CqQuery,
   /**
    * @return Returns the cqOperation.
    */
-  CqOperation::CqOperationType getCqOperation() const;
+  CqOperation getCqOperation() const;
 
   /**
    * @param cqOperation The cqOperation to set.
    */
-  void setCqOperation(CqOperation::CqOperationType cqOperation);
+  void setCqOperation(CqOperation cqOperation);
 
   /**
    * Update CQ stats
diff --git a/cppcache/src/CqService.cpp b/cppcache/src/CqService.cpp
index 6163856..3b78ca5 100644
--- a/cppcache/src/CqService.cpp
+++ b/cppcache/src/CqService.cpp
@@ -528,8 +528,8 @@ void CqService::invokeCqConnectedListeners(const 
std::string& poolName,
  * @param eventType
  * @return Operation
  */
-CqOperation::CqOperationType CqService::getOperation(int eventType) {
-  CqOperation::CqOperationType op = CqOperation::OP_TYPE_INVALID;
+CqOperation CqService::getOperation(int eventType) {
+  CqOperation op = CqOperation::OP_TYPE_INVALID;
   switch (eventType) {
     case TcrMessage::LOCAL_CREATE:
       op = CqOperation::OP_TYPE_CREATE;
diff --git a/cppcache/src/CqService.hpp b/cppcache/src/CqService.hpp
index 54bf886..1189076 100644
--- a/cppcache/src/CqService.hpp
+++ b/cppcache/src/CqService.hpp
@@ -1,8 +1,3 @@
-#pragma once
-
-#ifndef GEODE_CQSERVICE_H_
-#define GEODE_CQSERVICE_H_
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -20,6 +15,11 @@
  * limitations under the License.
  */
 
+#pragma once
+
+#ifndef GEODE_CQSERVICE_H_
+#define GEODE_CQSERVICE_H_
+
 #include <geode/internal/geode_globals.hpp>
 #include "TcrMessage.hpp"
 #include "Queue.hpp"
@@ -219,6 +219,7 @@ class _GEODE_EXPORT CqService : private NonCopyable,
    * @return true if exists else false.
    */
   bool isCqExists(const std::string& cqName);
+
   /**
    * Invokes the CqListeners for the given CQs.
    * @param cqs list of cqs with the cq operation from the Server.
@@ -237,7 +238,7 @@ class _GEODE_EXPORT CqService : private NonCopyable,
    * @param eventType
    * @return Operation
    */
-  CqOperation::CqOperationType getOperation(int eventType);
+  CqOperation getOperation(int eventType);
 
   void closeCqs(query_container_type& cqs);
 
diff --git a/quickstart/csharp/CqQuery.cs b/quickstart/csharp/CqQuery.cs
index f05323e..9cd7e9d 100644
--- a/quickstart/csharp/CqQuery.cs
+++ b/quickstart/csharp/CqQuery.cs
@@ -49,11 +49,11 @@ namespace Apache.Geode.Client.QuickStart
     {
       Portfolio val = ev.getNewValue() as  Portfolio;
       TKey key = ev.getKey();
-      CqOperationType opType = ev.getQueryOperation();
+      CqOperation opType = ev.getQueryOperation();
       string opStr = "DESTROY";
-      if(opType == CqOperationType.OP_TYPE_CREATE)
+      if(opType == CqOperation.OP_TYPE_CREATE)
          opStr = "CREATE";
-      else if(opType == CqOperationType.OP_TYPE_UPDATE)
+      else if(opType == CqOperation.OP_TYPE_UPDATE)
          opStr = "UPDATE";
       Console.WriteLine("MyCqListener::OnEvent called with key {0}, value 
({1},{2}), op {3}.", key, val.ID, val.Pkid,opStr);
     }
diff --git a/quickstart/csharp/PoolCqQuery.cs b/quickstart/csharp/PoolCqQuery.cs
index b792f09..d87c49a 100755
--- a/quickstart/csharp/PoolCqQuery.cs
+++ b/quickstart/csharp/PoolCqQuery.cs
@@ -51,11 +51,11 @@ namespace Apache.Geode.Client.QuickStart
     {
       Portfolio val = ev.getNewValue() as  Portfolio;
       TKey key = ev.getKey();
-      CqOperationType opType = ev.getQueryOperation();
+      CqOperation opType = ev.getQueryOperation();
       string opStr = "DESTROY";
-      if(opType == CqOperationType.OP_TYPE_CREATE)
+      if(opType == CqOperation.OP_TYPE_CREATE)
          opStr = "CREATE";
-      else if(opType == CqOperationType.OP_TYPE_UPDATE)
+      else if(opType == CqOperation.OP_TYPE_UPDATE)
          opStr = "UPDATE";
       Console.WriteLine("MyCqListener::OnEvent called with key {0}, value 
({1},{2}), op {3}.", key, val.ID, val.Pkid,opStr);
     }
diff --git a/tests/cli/NewFwkLib/CacheServer.cs 
b/tests/cli/NewFwkLib/CacheServer.cs
index fb0bc77..41a18ce 100644
--- a/tests/cli/NewFwkLib/CacheServer.cs
+++ b/tests/cli/NewFwkLib/CacheServer.cs
@@ -97,18 +97,18 @@ namespace Apache.Geode.Client.FwkLib
     public virtual void UpdateCount(CqEvent<TKey, TResult> ev)
     {
       m_eventCnt++;
-      CqOperationType opType = ev.getQueryOperation();
-      if (opType == CqOperationType.OP_TYPE_CREATE)
+      CqOperation opType = ev.getQueryOperation();
+      if (opType == CqOperation.OP_TYPE_CREATE)
       {
         m_createCnt++;
        // Util.Log("m_create is {0}",m_createCnt);
       }
-      else if (opType == CqOperationType.OP_TYPE_UPDATE)
+      else if (opType == CqOperation.OP_TYPE_UPDATE)
       {
         m_updateCnt++;
        // Util.Log("m_create is {0}", m_updateCnt);
       }
-      else if (opType == CqOperationType.OP_TYPE_DESTROY)
+      else if (opType == CqOperation.OP_TYPE_DESTROY)
       {
         m_destroyCnt++;
       //  Util.Log("m_create is {0}", m_destroyCnt);
diff --git a/tests/cli/NewFwkLib/PdxTest/PdxTests.cs 
b/tests/cli/NewFwkLib/PdxTest/PdxTests.cs
index 5b76eec..c56e717 100644
--- a/tests/cli/NewFwkLib/PdxTest/PdxTests.cs
+++ b/tests/cli/NewFwkLib/PdxTest/PdxTests.cs
@@ -98,16 +98,16 @@ namespace Apache.Geode.Client.FwkLib
         public virtual void UpdateCount(CqEvent<TKey, TResult> ev)
         {
             m_eventCnt++;
-            CqOperationType opType = ev.getQueryOperation();
-            if (opType == CqOperationType.OP_TYPE_CREATE)
+            CqOperation opType = ev.getQueryOperation();
+            if (opType == CqOperation.OP_TYPE_CREATE)
             {
                 m_createCnt++;
             }
-            else if (opType == CqOperationType.OP_TYPE_UPDATE)
+            else if (opType == CqOperation.OP_TYPE_UPDATE)
             {
                 m_updateCnt++;
             }
-            else if (opType == CqOperationType.OP_TYPE_DESTROY)
+            else if (opType == CqOperation.OP_TYPE_DESTROY)
             {
                 m_destroyCnt++;
             }
diff --git a/tests/cli/NewFwkLib/QueryTest/QueryTests.cs 
b/tests/cli/NewFwkLib/QueryTest/QueryTests.cs
index 1bd7625..da45a8e 100644
--- a/tests/cli/NewFwkLib/QueryTest/QueryTests.cs
+++ b/tests/cli/NewFwkLib/QueryTest/QueryTests.cs
@@ -72,18 +72,18 @@ namespace Apache.Geode.Client.FwkLib
     public virtual void UpdateCount(CqEvent<TKey, TResult> ev)
     {
       m_eventCnt++;
-      CqOperationType opType = ev.getQueryOperation();
-      if (opType == CqOperationType.OP_TYPE_CREATE)
+      CqOperation opType = ev.getQueryOperation();
+      if (opType == CqOperation.OP_TYPE_CREATE)
       {
           Util.Log("ML:INSERT invoked");
         m_createCnt++;
       }
-      else if (opType == CqOperationType.OP_TYPE_UPDATE)
+      else if (opType == CqOperation.OP_TYPE_UPDATE)
       {
           Util.Log("ML:UPDATE invoked");
         m_updateCnt++;
       }
-      else if (opType == CqOperationType.OP_TYPE_DESTROY)
+      else if (opType == CqOperation.OP_TYPE_DESTROY)
       {
           Util.Log("ML:DESTROY invoked");
         m_destroyCnt++;

-- 
To stop receiving notification emails like this one, please contact
jbarr...@apache.org.

Reply via email to