Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Storable API Refactoring #3073

Merged
merged 6 commits into from
Oct 12, 2020

Conversation

Coduz
Copy link
Contributor

@Coduz Coduz commented Sep 18, 2020

This PR refactors the Storable API and its base implementation.

Currently all Storable API (used for Elasticsearch enabled services) are contained into kapua-datastore-api and kapua-datastore-internal which make reuse of them not clean since you have to depend on datastore modules instead of common modules.

Related Issue
None

Description of the solution adopted
Moved Storable API clases to kapua-service-api module.
Moved Storable base implementation classes to a new module kapua-service-storable

Improved the implementation with some goodies added to the KapuaEntity-enabled classes but were not ported to the Storable API.
Examples:

  • ListResult.getFirstItem()
  • Query as predicateFactory

Screenshots
None

Any side note on the changes made
Improved also the Exception modeling of the Datastore services

@Coduz Coduz added the Enhancement This PR/Issue improves an part of Kapua label Sep 18, 2020
@codecov
Copy link

codecov bot commented Sep 18, 2020

Codecov Report

Merging #3073 into develop will increase coverage by 0.01%.
The diff coverage is 71.32%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #3073      +/-   ##
=============================================
+ Coverage      62.87%   62.89%   +0.01%     
+ Complexity      2636     2576      -60     
=============================================
  Files           1116     1107       -9     
  Lines          23343    23072     -271     
  Branches        2008     1986      -22     
=============================================
- Hits           14677    14511     -166     
+ Misses          7742     7653      -89     
+ Partials         924      908      -16     
Impacted Files Coverage Δ Complexity Δ
.../main/java/org/eclipse/kapua/model/id/KapuaId.java 50.00% <ø> (ø) 0.00 <0.00> (ø)
.../java/org/eclipse/kapua/model/query/SortOrder.java 100.00% <ø> (ø) 0.00 <0.00> (ø)
...search/client/exception/QueryMappingException.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...client/transport/TransportElasticsearchClient.java 1.61% <0.00%> (ø) 0.00 <0.00> (ø)
.../datastore/internal/mediator/ChannelInfoField.java 80.95% <ø> (ø) 6.00 <0.00> (ø)
...e/datastore/internal/mediator/ClientInfoField.java 100.00% <ø> (ø) 6.00 <0.00> (ø)
...e/internal/mediator/MessageStoreConfiguration.java 46.80% <ø> (ø) 8.00 <0.00> (ø)
...tastore/internal/model/ChannelInfoCreatorImpl.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...atastore/internal/model/ClientInfoCreatorImpl.java 0.00% <ø> (ø) 0.00 <0.00> (ø)
...datastore/internal/model/DatastoreMessageImpl.java 100.00% <ø> (ø) 5.00 <0.00> (ø)
... and 72 more

@Coduz Coduz force-pushed the feature-storableApiRefactor branch 9 times, most recently from 79082d7 to a9ddfcb Compare September 24, 2020 08:04
@Coduz Coduz force-pushed the feature-storableApiRefactor branch 4 times, most recently from 554727c to 88a036f Compare October 5, 2020 12:21
@Coduz Coduz force-pushed the feature-storableApiRefactor branch 4 times, most recently from 6c9392c to 14e15bb Compare October 9, 2020 09:26
Coduz added 6 commits October 12, 2020 11:12
Signed-off-by: coduz <alberto.codutti@eurotech.com>
…nal module

Signed-off-by: coduz <alberto.codutti@eurotech.com>
Signed-off-by: coduz <alberto.codutti@eurotech.com>
Signed-off-by: coduz <alberto.codutti@eurotech.com>
…bunch of Javadoc to classes

Signed-off-by: coduz <alberto.codutti@eurotech.com>
Signed-off-by: coduz <alberto.codutti@eurotech.com>
@Coduz Coduz force-pushed the feature-storableApiRefactor branch from 14e15bb to 5155fca Compare October 12, 2020 09:12
@Coduz Coduz merged commit 977db8d into eclipse-kapua:develop Oct 12, 2020
@Coduz Coduz deleted the feature-storableApiRefactor branch October 12, 2020 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement This PR/Issue improves an part of Kapua
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant