Package org.craftercms.commons.mongo
package org.craftercms.commons.mongo
-
ClassDescriptionSimple interface to interact with Jongo/MongoDB.
Changes MongoException in to MongoRepositoryException (which is a checked exception).As well if Command result is not ok (CommandResult#isOk) return false a exception will be thrown the message for that exception will be CommandResult#getErrorMessage.
Some of the find and insert methods use a template queryName. this means that the string can contain placeholders ('#') this will allow the user to have predefine json strings that will be substitute with the given params.Params are not Name therefor if the same value is needed multiple times for now it has to be send multiple times.Order of the params should match the same in the json string.Mongo exception thrown when a document can't be inserted because there's already a document with the same key.Grid Fs File InformationCreates a Jongo singleton for application wide use.Holds a Map of all the register MongoQueries.Creates a Mongo Client based on a connection StringFactoryBean
that besides creating aMongoClient
from a Mongo URI, closes the client when it's destroyed.Spring helper for Create a MongoClientChecked Exception to wrap around MongoException.Utility class for running Mongo scripts in JS.Created by alfonsovasquez on 13/6/16.