public interface MongoStore
Modifier and Type | Method and Description |
---|---|
<T extends MongoIdentifiableEntity> |
countEntities(Class<T> type,
com.mongodb.DBObject query,
MongoStoreInvocationContext context) |
void |
insertEntity(MongoIdentifiableEntity entity,
MongoStoreInvocationContext context)
Insert new entity
|
<T extends MongoIdentifiableEntity> |
loadEntities(Class<T> type,
com.mongodb.DBObject query,
com.mongodb.DBObject sort,
int firstResult,
int maxResults,
MongoStoreInvocationContext context) |
<T extends MongoIdentifiableEntity> |
loadEntities(Class<T> type,
com.mongodb.DBObject query,
MongoStoreInvocationContext context) |
<T extends MongoIdentifiableEntity> |
loadEntity(Class<T> type,
String id,
MongoStoreInvocationContext context) |
<T extends MongoIdentifiableEntity> |
loadSingleEntity(Class<T> type,
com.mongodb.DBObject query,
MongoStoreInvocationContext context) |
<S> boolean |
pullItemFromList(MongoIdentifiableEntity entity,
String listPropertyName,
S itemToPull,
MongoStoreInvocationContext context) |
<S> boolean |
pushItemToList(MongoIdentifiableEntity entity,
String listPropertyName,
S itemToPush,
boolean skipIfAlreadyPresent,
MongoStoreInvocationContext context) |
int |
removeEntities(Class<? extends MongoIdentifiableEntity> type,
com.mongodb.DBObject query,
boolean callback,
MongoStoreInvocationContext context) |
boolean |
removeEntity(Class<? extends MongoIdentifiableEntity> type,
String id,
MongoStoreInvocationContext context) |
boolean |
removeEntity(MongoIdentifiableEntity entity,
MongoStoreInvocationContext context) |
<T extends MongoIdentifiableEntity> |
updateEntities(Class<T> type,
com.mongodb.DBObject query,
com.mongodb.DBObject update,
MongoStoreInvocationContext context)
Bulk update of more entities of some type
|
void |
updateEntity(MongoIdentifiableEntity entity,
MongoStoreInvocationContext context)
Update existing entity
|
void insertEntity(MongoIdentifiableEntity entity, MongoStoreInvocationContext context)
entity
- to insertvoid updateEntity(MongoIdentifiableEntity entity, MongoStoreInvocationContext context)
entity
- to update<T extends MongoIdentifiableEntity> int updateEntities(Class<T> type, com.mongodb.DBObject query, com.mongodb.DBObject update, MongoStoreInvocationContext context)
type
- query
- update
- context
- <T extends MongoIdentifiableEntity> T loadEntity(Class<T> type, String id, MongoStoreInvocationContext context)
<T extends MongoIdentifiableEntity> T loadSingleEntity(Class<T> type, com.mongodb.DBObject query, MongoStoreInvocationContext context)
<T extends MongoIdentifiableEntity> List<T> loadEntities(Class<T> type, com.mongodb.DBObject query, MongoStoreInvocationContext context)
type
- query
- context
- <T extends MongoIdentifiableEntity> List<T> loadEntities(Class<T> type, com.mongodb.DBObject query, com.mongodb.DBObject sort, int firstResult, int maxResults, MongoStoreInvocationContext context)
type
- query
- context
- <T extends MongoIdentifiableEntity> int countEntities(Class<T> type, com.mongodb.DBObject query, MongoStoreInvocationContext context)
boolean removeEntity(MongoIdentifiableEntity entity, MongoStoreInvocationContext context)
boolean removeEntity(Class<? extends MongoIdentifiableEntity> type, String id, MongoStoreInvocationContext context)
int removeEntities(Class<? extends MongoIdentifiableEntity> type, com.mongodb.DBObject query, boolean callback, MongoStoreInvocationContext context)
type
- query
- callback
- if true, then store will first load all entities, then call "afterRemove" for every entity. If false, the entities are removed directly without load and calling "afterRemove" callback
false has better performance (especially if we are going to remove big number of entities)context
- <S> boolean pushItemToList(MongoIdentifiableEntity entity, String listPropertyName, S itemToPush, boolean skipIfAlreadyPresent, MongoStoreInvocationContext context)
<S> boolean pullItemFromList(MongoIdentifiableEntity entity, String listPropertyName, S itemToPull, MongoStoreInvocationContext context)
Copyright © 2016 JBoss by Red Hat. All rights reserved.