Описание тега mongojack

Mongojack is a library that facilitates mapping between Java objects and MongoDB documents.

Since MongoDB uses BSON, a binary form of JSON, to store its documents, a JSON mapper is a perfect mechanism for mapping Java objects to MongoDB documents. And the best Java JSON mapper is Jackson. Jackson’s parsing/generating interface fits serialising to MongoDBs documents like a glove. Its plugins, custom creators, serialisers, views, pluggable annotators and so on give this mapping library a massive head start, making it powerful, performant, and robust.

Features

  • Deserialises queried objects directly from the MongoDB stream, making it one of the (if not the) fastest object mappers for MongoDB out there.

  • Uses Jackson for object mapping, so compatible with most Jackson features, including custom serialisers and deserialisers, creators, views, annotation introspectors, etc.

  • Wraps the MongoDB driver DBCollection, providing most of the original methods, plus strongly typed versions.

  • Gives low level access to advanced MongoDB driver features.

  • Supports querying using objects as templates, and selecting fields to return using objects as templates.

  • Supports mapping ObjectIds to strings and byte arrays, using an @ObjectID annotation.

  • Supports @javax.persistance.Id annotation for marking which property is the id (or just call it _id).

  • Provides interface to building update commands with update modifiers, which supports POJOs which will be serialised by Jackson.

  • Provides terse chained query builders

  • Supports database reference conventions, with convenience methods for fetching references and collections of references in one query.

Reference:

http://mongojack.org/