public abstract class MongoManager extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Mongo |
client |
protected com.mongodb.client.MongoCollection<org.bson.Document> |
collection |
protected static String |
ID |
| Constructor and Description |
|---|
MongoManager() |
| Modifier and Type | Method and Description |
|---|---|
protected static org.bson.Document |
asDoc(String json) |
protected static org.bson.types.ObjectId |
asId(String id) |
protected static String |
asString(org.bson.Document d) |
protected static String |
asString(org.bson.types.ObjectId id) |
void |
deleteDoc(org.bson.types.ObjectId id) |
org.bson.Document |
getDocById(org.bson.types.ObjectId id) |
org.bson.Document |
getDocById(org.bson.types.ObjectId id,
org.bson.Document additionalFilter) |
protected void |
init(String collectionName) |
protected org.bson.types.ObjectId |
insertDoc(org.bson.Document proj) |
com.mongodb.client.FindIterable<org.bson.Document> |
iterateDoc(org.bson.Document filter,
org.bson.Document projection) |
protected abstract String |
mongoIDFieldName() |
com.mongodb.client.FindIterable<org.bson.Document> |
queryDoc(org.gcube.application.geoportal.common.model.rest.QueryRequest request) |
org.bson.Document |
replaceDoc(org.bson.Document toUpdate,
org.bson.types.ObjectId id) |
org.bson.Document |
updateDoc(org.bson.types.ObjectId id,
org.bson.Document updateSet) |
protected Mongo client
protected com.mongodb.client.MongoCollection<org.bson.Document> collection
protected static final String ID
public MongoManager()
throws org.gcube.application.geoportal.common.model.rest.ConfigurationException
org.gcube.application.geoportal.common.model.rest.ConfigurationExceptionprotected static final org.bson.types.ObjectId asId(String id)
protected static final String asString(org.bson.types.ObjectId id)
protected static final String asString(org.bson.Document d)
protected static final org.bson.Document asDoc(String json)
protected void init(String collectionName)
protected abstract String mongoIDFieldName()
protected org.bson.types.ObjectId insertDoc(org.bson.Document proj)
public void deleteDoc(org.bson.types.ObjectId id)
public org.bson.Document getDocById(org.bson.types.ObjectId id,
org.bson.Document additionalFilter)
public org.bson.Document getDocById(org.bson.types.ObjectId id)
public com.mongodb.client.FindIterable<org.bson.Document> iterateDoc(org.bson.Document filter,
org.bson.Document projection)
public com.mongodb.client.FindIterable<org.bson.Document> queryDoc(org.gcube.application.geoportal.common.model.rest.QueryRequest request)
public org.bson.Document replaceDoc(org.bson.Document toUpdate,
org.bson.types.ObjectId id)
public org.bson.Document updateDoc(org.bson.types.ObjectId id,
org.bson.Document updateSet)
Copyright © 2022. All Rights Reserved.