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

Move out mongo syntax from unrelated classes #422

Open
e-pettersson-ericsson opened this issue Jan 15, 2020 · 0 comments
Open

Move out mongo syntax from unrelated classes #422

e-pettersson-ericsson opened this issue Jan 15, 2020 · 0 comments
Labels
code improvements Improvements to make the code base more readable and manageable.

Comments

@e-pettersson-ericsson
Copy link
Member

Description

We have hard coded MongoDQ query strings in:

  • com.ericsson.ei.subscription.SubscriptionRepeatDbHandler.prepareQueryToUpdateAggregation(String, int, String)
  • src/main/java/com/ericsson/ei/handlers/EventToObjectMapHandler.java
  • src/main/java/com/ericsson/ei/queryservice/ProcessAggregatedObject.java

These should be extracted in a similar way which MongoQuery was, to abstract away mongo specific syntax from product code.
Tests might need to be added.

Motivation

Keep all Mongo related syntax in "one" place - the Mongo package.

Exemplification

Benefits

Making it easier to change database implementation, if needed, in the future.

Possible Drawbacks

@e-pettersson-ericsson e-pettersson-ericsson added the code improvements Improvements to make the code base more readable and manageable. label Jan 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code improvements Improvements to make the code base more readable and manageable.
Projects
None yet
Development

No branches or pull requests

1 participant