**Problems I want to solve:**
1. Code duplication - [this part of code](https://github.com/CommE2E/comm/blob/7a6f37fbccf9a419ccdb45fc09d0152cf0306574/native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp#L753-L819) is duplicated at least 5 times (and will grow).
2. Lack of separation - a lot of not related code like parsing is here, this can be grouped logically.
**How it works:**
1. This template class provides two generic functions which will be reused (processStoreOperations, processStoreOperationsSync) - this solves problem 1.
2. Has two pure virtual methods which need to be overridden (parseDBDataStore, createOperations), those methods are specialized for each data type (Messages, Threads, etc.) - this solves problem 2.
**Why `.h` file?**
When a template is used in C++, the compiler needs access to the entire template definition (not just a declaration) because it needs to generate the code for the specific instantiation at the compile time. ([source](https://isocpp.org/wiki/faq/templates#templates-defn-vs-decl)).
Why not static methods when the class does not have a state?
I wanted to ensure that each child class (which will inherit from `BaseDataStore`) will override methods for parsing and creating ops. This can not be achieved easily with static methods - but I am open to modifying if someone has valid suggestions.
For more details check the next diff in the stack.
Depends on D8601