public class AbstractMJORMDao extends MongoDBDaoSupport
| Constructor and Description |
|---|
AbstractMJORMDao() |
| Modifier and Type | Method and Description |
|---|---|
protected <T> T |
createObject(java.lang.String collection,
T object)
Creates an object.
|
protected <T> T |
createObject(java.lang.String collection,
T object,
com.mongodb.WriteConcern concern)
Creates an object.
|
protected DaoQuery |
createQuery()
Creates a
DaoQuery. |
protected DaoQuery |
createQuery(java.lang.String collectionName)
Creates a
DaoQuery. |
protected Statement |
createStatement(java.lang.String mql)
Creates a
Statement from the given mql
optionally caching it for later use. |
protected void |
deleteObject(java.lang.String collection,
java.lang.Object id)
Deletes an existing object.
|
protected void |
deleteObject(java.lang.String collection,
java.lang.Object id,
com.mongodb.WriteConcern concern)
Deletes an existing object.
|
protected org.bson.types.ObjectId |
oid(java.lang.String objectId)
Converts the given object id string into
a mongo
ObjectId. |
protected java.util.List<org.bson.types.ObjectId> |
oids(java.util.Collection<java.lang.String> ids)
Converts the given object id string into
a mongo
ObjectId. |
protected org.bson.types.ObjectId[] |
oids(java.lang.String... ids)
Converts the given object id string into
a mongo
ObjectId. |
protected <T> T |
readObject(java.lang.String collection,
java.lang.Object id,
java.lang.Class<T> clazz)
Reads an object from the given collection.
|
protected void |
updateObject(java.lang.String collection,
java.lang.Object id,
java.lang.Object o)
Updates an existing object.
|
protected void |
updateObject(java.lang.String collection,
java.lang.Object id,
java.lang.Object o,
com.mongodb.WriteConcern concern)
Updates an existing object.
|
checkDaoConfig, ensureIndexes, getCollection, getDb, getMapReduceConfiguration, getMongo, getMongoDao, getObjectMapper, initDao, setBeanFactory, setDb, setDbName, setMongo, setMongoDao, setObjectMapper, setPassword, setUsernameprotected org.bson.types.ObjectId[] oids(java.lang.String... ids)
ObjectId.ids - the idsprotected java.util.List<org.bson.types.ObjectId> oids(java.util.Collection<java.lang.String> ids)
ObjectId.ids - the idsprotected org.bson.types.ObjectId oid(java.lang.String objectId)
ObjectId.objectId - the idprotected <T> T createObject(java.lang.String collection,
T object)
T - the typecollection - the collectionobject - the objectprotected <T> T createObject(java.lang.String collection,
T object,
com.mongodb.WriteConcern concern)
T - the typecollection - the collectionobject - the objectconcern - the WriteConcernprotected <T> T readObject(java.lang.String collection,
java.lang.Object id,
java.lang.Class<T> clazz)
T - the typecollection - the collectionid - the idclazz - the typeprotected void updateObject(java.lang.String collection,
java.lang.Object id,
java.lang.Object o)
collection - the collectionid - the ido - the objectprotected void updateObject(java.lang.String collection,
java.lang.Object id,
java.lang.Object o,
com.mongodb.WriteConcern concern)
collection - the collectionid - the idconcern - the WriteConcerno - the objectprotected void deleteObject(java.lang.String collection,
java.lang.Object id)
collection - the collectionid - the idprotected void deleteObject(java.lang.String collection,
java.lang.Object id,
com.mongodb.WriteConcern concern)
collection - the collectionid - the idconcern - the WriteConcernprotected DaoQuery createQuery(java.lang.String collectionName)
DaoQuery.collectionName - the collection nameCopyright © 2013. All Rights Reserved.