eclipse / kapua

Eclipse Public License 2.0
222 stars 160 forks source link

FIX - Refactored datastoreUtils with the inclusion of a abstract class on top of it #4003

Closed Agnul97 closed 5 months ago

Agnul97 commented 5 months ago

In this PR I extracted some methods from the DatastoreUtils class into an abstract class called AbstractStoreUtils.

The method "convertToDataIndexes" is one of these, and has been renamed into "filterIndexesTemporalWindow". Now it calls 2 abstract methods that needs to be overridden by the specific *storeUtils class. For example, the dataStoreUtils class now extend this abstract class and correctly overrides these 2 methods

With this refactoring I wanted to ease the implementation of future *storeUtils class

codecov[bot] commented 5 months ago

Codecov Report

Attention: Patch coverage is 75.21368% with 29 lines in your changes are missing coverage. Please review.

Project coverage is 21.09%. Comparing base (aa54cb7) to head (b5d837f). Report is 10 commits behind head on develop.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/eclipse/kapua/pull/4003/graphs/tree.svg?width=650&height=150&src=pr&token=1P4N4CApH8&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse)](https://app.codecov.io/gh/eclipse/kapua/pull/4003?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse) ```diff @@ Coverage Diff @@ ## develop #4003 +/- ## ========================================== Coverage 21.08% 21.09% Complexity 10 10 ========================================== Files 1947 1954 +7 Lines 41397 41426 +29 Branches 3805 3800 -5 ========================================== + Hits 8730 8737 +7 - Misses 32263 32285 +22 Partials 404 404 ``` | [Files](https://app.codecov.io/gh/eclipse/kapua/pull/4003?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse) | Coverage Δ | | |---|---|---| | [...ce/datastore/internal/mediator/DatastoreUtils.java](https://app.codecov.io/gh/eclipse/kapua/pull/4003?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse#diff-c2VydmljZS9kYXRhc3RvcmUvaW50ZXJuYWwvc3JjL21haW4vamF2YS9vcmcvZWNsaXBzZS9rYXB1YS9zZXJ2aWNlL2RhdGFzdG9yZS9pbnRlcm5hbC9tZWRpYXRvci9EYXRhc3RvcmVVdGlscy5qYXZh) | `24.55% <60.00%> (-20.14%)` | :arrow_down: | | [...rvice/elasticsearch/client/AbstractStoreUtils.java](https://app.codecov.io/gh/eclipse/kapua/pull/4003?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse#diff-c2VydmljZS9jb21tb25zL2VsYXN0aWNzZWFyY2gvY2xpZW50LWFwaS9zcmMvbWFpbi9qYXZhL29yZy9lY2xpcHNlL2thcHVhL3NlcnZpY2UvZWxhc3RpY3NlYXJjaC9jbGllbnQvQWJzdHJhY3RTdG9yZVV0aWxzLmphdmE=) | `75.89% <75.89%> (ø)` | | ... and [15 files with indirect coverage changes](https://app.codecov.io/gh/eclipse/kapua/pull/4003/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse)