Refactor datagrid stuff

| Q                    | A
| -------------------- | ---
| Bug fix?             | N
| New feature?         | N
| BC breaks?           | Y
| CI currently passes? | Y
| Tests pass?          | N
| Scenarios pass?      | ? 
| Checkstyle issues?   | N
| Changelog updated?   | N
| Fixed tickets        | -
| Doc PR               | -
If it is only used for MongoDB, sure and you could update the class description