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(java.lang.Object entity)
Version this entity when it is saved.
|
java.lang.String |
getDocumentId(java.lang.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.
|
java.util.Map<java.lang.String,java.lang.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.
|
java.lang.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
|
java.lang.String |
getStoreIdentifier()
Gets the store identifier for this session.
|
boolean |
hasChanged(java.lang.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.
|
boolean |
isAllowNonAuthoritativeInformation()
Gets a value indicating whether non authoritative information is allowed.
|
boolean |
isLoaded(java.lang.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(java.lang.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(java.lang.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.
|
java.util.Map<java.lang.String,java.util.List<DocumentsChanges>> |
whatChanged() |
IDocumentStore getDocumentStore()
boolean isLoaded(java.lang.String id)
id
- java.lang.String getStoreIdentifier()
<T> void evict(T entity)
entity
- The entity;void clear()
boolean isUseOptimisticConcurrency()
ConcurrencyException
.void setUseOptimisticConcurrency(boolean value)
ConcurrencyException
.java.util.Map<java.lang.String,java.lang.Object> getExternalState()
void markReadOnly(java.lang.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.java.lang.Long getNonAuthoritativeInformationTimeout()
void setNonAuthoritativeInformationTimeout(java.lang.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.int getNumberOfRequests()
<T> RavenJObject getMetadataFor(T instance)
instance
- <T> Etag getEtagFor(T instance)
instance
- java.lang.String getDocumentId(java.lang.Object entity)
entity
- boolean hasChanges()
boolean hasChanged(java.lang.Object entity)
entity
- void defer(ICommandData... commands)
commands
- void explicitlyVersion(java.lang.Object entity)
entity
- java.util.Map<java.lang.String,java.util.List<DocumentsChanges>> whatChanged()
Copyright © 2014. All Rights Reserved.