public class MongoStoreImpl extends Object implements MongoStore
| Constructor and Description |
|---|
MongoStoreImpl(com.mongodb.DB database,
Class<?>[] managedEntityTypes) |
public MongoStoreImpl(com.mongodb.DB database,
Class<?>[] managedEntityTypes)
protected void dropDatabase()
public void insertEntity(MongoIdentifiableEntity entity, MongoStoreInvocationContext context)
MongoStoreinsertEntity in interface MongoStoreentity - to insertpublic static ModelException convertException(com.mongodb.MongoException e)
public void updateEntity(MongoIdentifiableEntity entity, MongoStoreInvocationContext context)
MongoStoreupdateEntity in interface MongoStoreentity - to updatepublic <T extends MongoIdentifiableEntity> T loadEntity(Class<T> type, String id, MongoStoreInvocationContext context)
loadEntity in interface MongoStorepublic <T extends MongoIdentifiableEntity> T loadSingleEntity(Class<T> type, com.mongodb.DBObject query, MongoStoreInvocationContext context)
loadSingleEntity in interface MongoStorepublic <T extends MongoIdentifiableEntity> List<T> loadEntities(Class<T> type, com.mongodb.DBObject query, MongoStoreInvocationContext context)
loadEntities in interface MongoStorepublic <T extends MongoIdentifiableEntity> List<T> loadEntities(Class<T> type, com.mongodb.DBObject query, com.mongodb.DBObject sort, int firstResult, int maxResults, MongoStoreInvocationContext context)
loadEntities in interface MongoStorepublic <T extends MongoIdentifiableEntity> int countEntities(Class<T> type, com.mongodb.DBObject query, MongoStoreInvocationContext context)
countEntities in interface MongoStorepublic boolean removeEntity(MongoIdentifiableEntity entity, MongoStoreInvocationContext context)
removeEntity in interface MongoStorepublic boolean removeEntity(Class<? extends MongoIdentifiableEntity> type, String id, MongoStoreInvocationContext context)
removeEntity in interface MongoStorepublic boolean removeEntities(Class<? extends MongoIdentifiableEntity> type, com.mongodb.DBObject query, MongoStoreInvocationContext context)
removeEntities in interface MongoStorepublic <S> boolean pushItemToList(MongoIdentifiableEntity entity, String listPropertyName, S itemToPush, boolean skipIfAlreadyPresent, MongoStoreInvocationContext context)
pushItemToList in interface MongoStorepublic <S> boolean pullItemFromList(MongoIdentifiableEntity entity, String listPropertyName, S itemToPull, MongoStoreInvocationContext context)
pullItemFromList in interface MongoStorepublic void addAppObjectConverter(Mapper<?,?> mapper)
public void addDBObjectConverter(Mapper<?,?> mapper)
public EntityInfo getEntityInfo(Class<?> entityClass)
protected <T extends MongoIdentifiableEntity> List<T> convertCursor(Class<T> type, com.mongodb.DBCursor cursor, MongoStoreInvocationContext context)
protected <T extends MongoIdentifiableEntity> T convertDBObjectToEntity(Class<T> type, com.mongodb.DBObject dbObject, MongoStoreInvocationContext context)
protected com.mongodb.DBCollection getDBCollectionForType(Class<?> type)
Copyright © 2014. All Rights Reserved.