Skip to content
Konstantin Triger edited this page Nov 22, 2019 · 2 revisions

Add the following dependency to your project:

Maven Central (click the badge for details)

Static Imports

(FluentMongo maps official Mongo driver static functions, e.g. all, exists, etc. Importing them with static import makes the code look more concise)

IJ users: to lookup for the static functions like all press Ctrl+Alt+Space and then Alt+Enter to add it with static import.

Eclipse users: edit your Java > Editor > Content Assist > Favorites preferences and add the following static imports:

  • co.streamx.fluent.mongo.grammar.FluentFilters
  • co.streamx.fluent.mongo.grammar.FluentIndexes
  • co.streamx.fluent.mongo.grammar.FluentProjections
  • co.streamx.fluent.mongo.grammar.FluentSorts
  • co.streamx.fluent.mongo.grammar.FluentUpdates

Follow the link above and proceed with provided install instructions. Though not strictly required, greatly helps by removing the boilerplate code needed for entity declarations. Throughout this book all the entities will be declared with the help of lombok.

Method Coloring

For better readability it's possible to change coloring for Mongo mapped methods in IDE (all, exists, etc). Try RGB: 0,64,128 without Italic effect.

Eclipse users: Java > Editor > Syntax Coloring. Expand Java and change coloring for Static Method Invocations and Abstract Method Invocations.

IJ users: Editor > Color Scheme > Java. Expand Methods and change Foreground for Static imported method call and Abstract method.

Getting Started

Clone this wiki locally