public interface IAdvancedDocumentSessionOperations
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears this instance.
|
void |
defer(ICommandData... commands)
Defer commands to be executed on saveChanges()
|
<T> void |
evict(T entity)
Evicts the specified entity from the session.
|
void |
explicitlyVersion(Object entity)
Version this entity when it is saved.
|
String |
getDocumentId(Object entity)
Gets the document id for the specified entity.
|
IDocumentStore |
getDocumentStore()
The document store associated with this session
|
<T> Etag |
getEtagFor(T instance)
Gets the ETag for the specified entity.
|
Map<String,Object> |
getExternalState()
Allow extensions to provide additional state per session
|
int |
getMaxNumberOfRequestsPerSession()
Gets the max number of requests per session.
|
<T> RavenJObject |
getMetadataFor(T instance)
Gets the metadata for the specified entity.
|
Long |
getNonAuthoritativeInformationTimeout()
Gets the timeout to wait for authoritative information if encountered non authoritative document.
|
int |
getNumberOfRequests()
Gets the number of requests for this session
If the
NumberOfRequests rise above MaxNumberOfRequestsPerSession , an exception will be thrown. |
String |
getStoreIdentifier()
Gets a value indicating whether the session should use optimistic concurrency.
|
boolean |
hasChanged(Object entity)
Determines whether the specified entity has changed.
|
boolean |
hasChanges()
Gets a value indicating whether any of the entities tracked by the session has changes.
|
void |
ignoreChangesFor(Object entity)
Mark the entity as one that should be ignore for change tracking purposes,
it still takes part in the session, but is ignored for saveChanges.
|
boolean |
isAllowNonAuthoritativeInformation()
Gets a value indicating whether non authoritative information is allowed.
|
boolean |
isLoaded(String id)
Returns whatever a document with the specified id is loaded in the
current session
|
boolean |
isUseOptimisticConcurrency()
Gets a value indicating whether the session should use optimistic concurrency.
|
void |
markReadOnly(Object entity)
Mark the entity as read only, change tracking won't apply
to such an entity.
|
void |
setAllowNonAuthoritativeInformation(boolean value)
Sets a value indicating whether non authoritative information is allowed.
|
void |
setMaxNumberOfRequestsPerSession(int value)
Sets the max number of requests per session.
|
void |
setNonAuthoritativeInformationTimeout(Long timeOutInMilis)
Sets the timeout to wait for authoritative information if encountered non authoritative document.
|
void |
setUseOptimisticConcurrency(boolean value)
Sets a value indicating whether the session should use optimistic concurrency.
|
void |
unregisterMissing(String id)
Removes the specify documentId from the list of known missing ids.
|
Map<String,List<DocumentsChanges>> |
whatChanged()
Returns all changes for each entity stored within session.
|
IDocumentStore getDocumentStore()
boolean isLoaded(String id)
id
- String getStoreIdentifier()
ConcurrencyException
.<T> void evict(T entity)
entity
- Entity to evict.void unregisterMissing(String id)
id
- documentId to unregistervoid clear()
boolean isUseOptimisticConcurrency()
ConcurrencyException
.void setUseOptimisticConcurrency(boolean value)
ConcurrencyException
.Map<String,Object> getExternalState()
void markReadOnly(Object entity)
entity
- boolean isAllowNonAuthoritativeInformation()
getNonAuthoritativeInformationTimeout()
for the transaction to commit to get an
authoritative information. If the wait is longer than getNonAuthoritativeInformationTimeout()
, NonAuthoritativeInformationException
is thrown.void setAllowNonAuthoritativeInformation(boolean value)
getNonAuthoritativeInformationTimeout()
for the transaction to commit to get an
authoritative information. If the wait is longer than getNonAuthoritativeInformationTimeout()
, NonAuthoritativeInformationException
is thrown.Long getNonAuthoritativeInformationTimeout()
void setNonAuthoritativeInformationTimeout(Long timeOutInMilis)
timeOutInMilis
- int getMaxNumberOfRequestsPerSession()
getNumberOfRequests()
rise above getMaxNumberOfRequestsPerSession()
, an exception will be thrown.void setMaxNumberOfRequestsPerSession(int value)
getNumberOfRequests()
rise above getMaxNumberOfRequestsPerSession()
, an exception will be thrown.value
- int getNumberOfRequests()
NumberOfRequests
rise above MaxNumberOfRequestsPerSession
, an exception will be thrown.<T> RavenJObject getMetadataFor(T instance)
instance
- The instance.<T> Etag getEtagFor(T instance)
instance
- The instance.String getDocumentId(Object entity)
entity
- The entity.boolean hasChanges()
boolean hasChanged(Object entity)
entity
- void defer(ICommandData... commands)
commands
- Array of commands to be executed.void explicitlyVersion(Object entity)
entity
- Entity to version.void ignoreChangesFor(Object entity)
entity
- Map<String,List<DocumentsChanges>> whatChanged()
Copyright © 2016. All Rights Reserved.