public interface IDocumentSession
extends java.lang.AutoCloseable
Modifier and Type | Method and Description |
---|---|
ISyncAdvancedSessionOperation |
advanced()
Get the accessor for advanced operations
Those operations are rarely needed, and have been moved to a separate
property to avoid cluttering the API
|
<T> void |
delete(java.lang.Class<T> clazz,
java.lang.Number id)
Marks the specified entity for deletion.
|
<T> void |
delete(java.lang.Class<T> clazz,
java.util.UUID id)
Marks the specified entity for deletion.
|
void |
delete(java.lang.String id)
Marks the specified entity for deletion.
|
<T> void |
delete(T entity)
Marks the specified entity for deletion.
|
ILoaderWithInclude |
include(java.lang.Class<?> targetEntityClass,
com.mysema.query.types.Expression<?> path)
Begin a load while include the specified path
|
ILoaderWithInclude |
include(com.mysema.query.types.Expression<?> path)
Begin a load while including the specified path
|
ILoaderWithInclude |
include(java.lang.String path)
Begin a load while including the specified path
|
<T> T[] |
load(java.lang.Class<T> clazz,
java.util.Collection<java.lang.String> ids)
Loads the specified entities with the specified ids.
|
<T> T[] |
load(java.lang.Class<T> clazz,
java.lang.Number... ids)
Loads the specified entities with the specified id after applying
conventions on the provided id to get the real document id.
|
<T> T |
load(java.lang.Class<T> clazz,
java.lang.Number id)
Loads the specified entity with the specified id after applying
conventions on the provided id to get the real document id.
|
<T> T[] |
load(java.lang.Class<T> clazz,
java.lang.String... ids)
Loads the specified entities with the specified ids.
|
<T> T |
load(java.lang.Class<T> clazz,
java.lang.String id)
Loads the specified entity with the specified id.
|
<T> T[] |
load(java.lang.Class<T> clazz,
java.util.UUID... ids)
Loads the specified entities with the specified id after applying
conventions on the provided id to get the real document id.
|
<T> T |
load(java.lang.Class<T> clazz,
java.util.UUID id)
Loads the specified entity with the specified id after applying
conventions on the provided id to get the real document id.
|
<TResult> TResult[] |
load(java.lang.Class<TResult> clazz,
java.lang.String transformer,
java.util.Collection<java.lang.String> ids)
Performs a load that will use the specified results transformer against the specified id
|
<TResult> TResult[] |
load(java.lang.Class<TResult> clazz,
java.lang.String transformer,
java.util.Collection<java.lang.String> ids,
LoadConfigurationFactory configure)
Performs a load that will use the specified results transformer against the specified id
|
<TResult> TResult |
load(java.lang.Class<TResult> clazz,
java.lang.String transformer,
java.lang.String id)
Performs a load that will use the specified results transformer against the specified id
|
<TResult> TResult |
load(java.lang.Class<TResult> clazz,
java.lang.String transformer,
java.lang.String id,
LoadConfigurationFactory configure)
Performs a load that will use the specified results transformer against the specified id
|
<TResult,TTransformer extends AbstractTransformerCreationTask> |
load(java.lang.Class<TTransformer> tranformerClass,
java.lang.Class<TResult> clazz,
java.util.List<java.lang.String> ids,
LoadConfigurationFactory configure)
Performs a load that will use the specified results transformer against the specified id
|
<TResult,TTransformer extends AbstractTransformerCreationTask> |
load(java.lang.Class<TTransformer> tranformerClass,
java.lang.Class<TResult> clazz,
java.lang.String... ids)
Performs a load that will use the specified results transformer against the specified id
|
<TResult,TTransformer extends AbstractTransformerCreationTask> |
load(java.lang.Class<TTransformer> tranformerClass,
java.lang.Class<TResult> clazz,
java.lang.String id)
Performs a load that will use the specified results transformer against the specified id
|
<TResult,TTransformer extends AbstractTransformerCreationTask> |
load(java.lang.Class<TTransformer> tranformerClass,
java.lang.Class<TResult> clazz,
java.lang.String id,
LoadConfigurationFactory configure)
Performs a load that will use the specified results transformer against the specified id
|
<T> IRavenQueryable<T> |
query(java.lang.Class<T> clazz)
Dynamically queries RavenDB.
|
<T> IRavenQueryable<T> |
query(java.lang.Class<T> clazz,
java.lang.Class<? extends AbstractIndexCreationTask> indexCreator)
Queries the index specified by indexCreator.
|
<T> IRavenQueryable<T> |
query(java.lang.Class<T> clazz,
java.lang.String indexName)
Queries the specified index.
|
<T> IRavenQueryable<T> |
query(java.lang.Class<T> clazz,
java.lang.String indexName,
boolean isMapReduce)
Queries the specified index.
|
void |
saveChanges()
Saves all the changes to the Raven server.
|
void |
store(java.lang.Object entity)
Stores the specified dynamic entity.
|
void |
store(java.lang.Object entity,
Etag etag)
Stores the specified entity with the specified etag
|
void |
store(java.lang.Object entity,
Etag etag,
java.lang.String id)
Stores the specified entity with the specified etag, under the specified id
|
void |
store(java.lang.Object entity,
java.lang.String id)
Stores the specified dynamic entity, under the specified id
|
ISyncAdvancedSessionOperation advanced()
<T> void delete(T entity)
entity
- <T> void delete(java.lang.Class<T> clazz, java.lang.Number id)
<T> void delete(java.lang.Class<T> clazz, java.util.UUID id)
void delete(java.lang.String id)
<T> T load(java.lang.Class<T> clazz, java.lang.String id)
clazz
- id
- <T> T[] load(java.lang.Class<T> clazz, java.lang.String... ids)
clazz
- ids
- <T> T[] load(java.lang.Class<T> clazz, java.util.Collection<java.lang.String> ids)
clazz
- ids
- <T> T load(java.lang.Class<T> clazz, java.lang.Number id)
clazz
- id
- <T> T load(java.lang.Class<T> clazz, java.util.UUID id)
clazz
- id
- <T> T[] load(java.lang.Class<T> clazz, java.lang.Number... ids)
clazz
- ids
- <T> T[] load(java.lang.Class<T> clazz, java.util.UUID... ids)
clazz
- ids
- <T> IRavenQueryable<T> query(java.lang.Class<T> clazz, java.lang.String indexName)
clazz
- indexName
- Name of the index.<T> IRavenQueryable<T> query(java.lang.Class<T> clazz, java.lang.String indexName, boolean isMapReduce)
clazz
- indexName
- Name of the index.isMapReduce
- Whatever we are querying a map/reduce index (modify how we treat identifier properties)<T> IRavenQueryable<T> query(java.lang.Class<T> clazz)
clazz
- <T> IRavenQueryable<T> query(java.lang.Class<T> clazz, java.lang.Class<? extends AbstractIndexCreationTask> indexCreator)
clazz
- indexCreator
- ILoaderWithInclude include(java.lang.String path)
path
- ILoaderWithInclude include(com.mysema.query.types.Expression<?> path)
path
- ILoaderWithInclude include(java.lang.Class<?> targetEntityClass, com.mysema.query.types.Expression<?> path)
targetEntityClass
- Target entity class (used for id generation)path
- <TResult,TTransformer extends AbstractTransformerCreationTask> TResult load(java.lang.Class<TTransformer> tranformerClass, java.lang.Class<TResult> clazz, java.lang.String id)
tranformerClass
- The transformer to use in this load operationclazz
- The results shape to return after the load operationid
- <TResult,TTransformer extends AbstractTransformerCreationTask> TResult load(java.lang.Class<TTransformer> tranformerClass, java.lang.Class<TResult> clazz, java.lang.String id, LoadConfigurationFactory configure)
tranformerClass
- The transformer to use in this load operationclazz
- The results shape to return after the load operationid
- configure
- <TResult,TTransformer extends AbstractTransformerCreationTask> TResult[] load(java.lang.Class<TTransformer> tranformerClass, java.lang.Class<TResult> clazz, java.lang.String... ids)
tranformerClass
- The transformer to use in this load operationclazz
- The results shape to return after the load operationids
- <TResult,TTransformer extends AbstractTransformerCreationTask> TResult[] load(java.lang.Class<TTransformer> tranformerClass, java.lang.Class<TResult> clazz, java.util.List<java.lang.String> ids, LoadConfigurationFactory configure)
tranformerClass
- The transformer to use in this load operationclazz
- The results shape to return after the load operationids
- configure
- <TResult> TResult load(java.lang.Class<TResult> clazz, java.lang.String transformer, java.lang.String id)
clazz
- The results shape to return after the load operationtransformer
- id
- <TResult> TResult load(java.lang.Class<TResult> clazz, java.lang.String transformer, java.lang.String id, LoadConfigurationFactory configure)
clazz
- The results shape to return after the load operationtransformer
- id
- configure
- <TResult> TResult[] load(java.lang.Class<TResult> clazz, java.lang.String transformer, java.util.Collection<java.lang.String> ids)
clazz
- The results shape to return after the load operationtransformer
- ids
- <TResult> TResult[] load(java.lang.Class<TResult> clazz, java.lang.String transformer, java.util.Collection<java.lang.String> ids, LoadConfigurationFactory configure)
clazz
- The results shape to return after the load operationtransformer
- ids
- configure
- void saveChanges()
void store(java.lang.Object entity)
entity
- void store(java.lang.Object entity, java.lang.String id)
entity
- id
- The id to store this entity under. If other entity exists with the same id it will be overriddenvoid store(java.lang.Object entity, Etag etag)
entity
- etag
- void store(java.lang.Object entity, Etag etag, java.lang.String id)
entity
- etag
- id
- Copyright © 2014. All Rights Reserved.