Interface CouchbaseOperations
- All Superinterfaces:
ExecutableExistsByIdOperation
,ExecutableFindByAnalyticsOperation
,ExecutableFindByIdOperation
,ExecutableFindByQueryOperation
,ExecutableFindFromReplicasByIdOperation
,ExecutableInsertByIdOperation
,ExecutableMutateInByIdOperation
,ExecutableRangeScanOperation
,ExecutableRemoveByIdOperation
,ExecutableRemoveByQueryOperation
,ExecutableReplaceByIdOperation
,ExecutableUpsertByIdOperation
,FluentCouchbaseOperations
- All Known Implementing Classes:
CouchbaseTemplate
Defines common operations on the Couchbase data source, most commonly implemented by
CouchbaseTemplate
.- Author:
- Michael Reiche
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.data.couchbase.core.ExecutableExistsByIdOperation
ExecutableExistsByIdOperation.ExecutableExistsById, ExecutableExistsByIdOperation.ExistsByIdInCollection<T>, ExecutableExistsByIdOperation.ExistsByIdInScope<T>, ExecutableExistsByIdOperation.ExistsByIdWithOptions<T>, ExecutableExistsByIdOperation.TerminatingExistsById
Nested classes/interfaces inherited from interface org.springframework.data.couchbase.core.ExecutableFindByAnalyticsOperation
ExecutableFindByAnalyticsOperation.ExecutableFindByAnalytics<T>, ExecutableFindByAnalyticsOperation.FindByAnalyticsConsistentWith<T>, ExecutableFindByAnalyticsOperation.FindByAnalyticsInCollection<T>, ExecutableFindByAnalyticsOperation.FindByAnalyticsInScope<T>, ExecutableFindByAnalyticsOperation.FindByAnalyticsWithConsistency<T>, ExecutableFindByAnalyticsOperation.FindByAnalyticsWithOptions<T>, ExecutableFindByAnalyticsOperation.FindByAnalyticsWithProjection<T>, ExecutableFindByAnalyticsOperation.FindByAnalyticsWithQuery<T>, ExecutableFindByAnalyticsOperation.TerminatingFindByAnalytics<T>
Nested classes/interfaces inherited from interface org.springframework.data.couchbase.core.ExecutableFindByIdOperation
ExecutableFindByIdOperation.ExecutableFindById<T>, ExecutableFindByIdOperation.FindByIdInCollection<T>, ExecutableFindByIdOperation.FindByIdInScope<T>, ExecutableFindByIdOperation.FindByIdWithExpiry<T>, ExecutableFindByIdOperation.FindByIdWithLock<T>, ExecutableFindByIdOperation.FindByIdWithOptions<T>, ExecutableFindByIdOperation.FindByIdWithProjection<T>, ExecutableFindByIdOperation.TerminatingFindById<T>
Nested classes/interfaces inherited from interface org.springframework.data.couchbase.core.ExecutableFindByQueryOperation
ExecutableFindByQueryOperation.ExecutableFindByQuery<T>, ExecutableFindByQueryOperation.FindByQueryConsistentWith<T>, ExecutableFindByQueryOperation.FindByQueryInCollection<T>, ExecutableFindByQueryOperation.FindByQueryInScope<T>, ExecutableFindByQueryOperation.FindByQueryWithConsistency<T>, ExecutableFindByQueryOperation.FindByQueryWithDistinct<T>, ExecutableFindByQueryOperation.FindByQueryWithOptions<T>, ExecutableFindByQueryOperation.FindByQueryWithProjecting<T>, ExecutableFindByQueryOperation.FindByQueryWithProjection<T>, ExecutableFindByQueryOperation.FindByQueryWithQuery<T>, ExecutableFindByQueryOperation.TerminatingFindByQuery<T>
Nested classes/interfaces inherited from interface org.springframework.data.couchbase.core.ExecutableFindFromReplicasByIdOperation
ExecutableFindFromReplicasByIdOperation.ExecutableFindFromReplicasById<T>, ExecutableFindFromReplicasByIdOperation.FindFromReplicasByIdInCollection<T>, ExecutableFindFromReplicasByIdOperation.FindFromReplicasByIdInScope<T>, ExecutableFindFromReplicasByIdOperation.FindFromReplicasByIdWithOptions<T>, ExecutableFindFromReplicasByIdOperation.TerminatingFindFromReplicasById<T>
Nested classes/interfaces inherited from interface org.springframework.data.couchbase.core.ExecutableInsertByIdOperation
ExecutableInsertByIdOperation.ExecutableInsertById<T>, ExecutableInsertByIdOperation.InsertByIdInCollection<T>, ExecutableInsertByIdOperation.InsertByIdInScope<T>, ExecutableInsertByIdOperation.InsertByIdWithDurability<T>, ExecutableInsertByIdOperation.InsertByIdWithExpiry<T>, ExecutableInsertByIdOperation.InsertByIdWithOptions<T>, ExecutableInsertByIdOperation.TerminatingInsertById<T>
Nested classes/interfaces inherited from interface org.springframework.data.couchbase.core.ExecutableMutateInByIdOperation
ExecutableMutateInByIdOperation.ExecutableMutateInById<T>, ExecutableMutateInByIdOperation.MutateInByIdInCollection<T>, ExecutableMutateInByIdOperation.MutateInByIdInScope<T>, ExecutableMutateInByIdOperation.MutateInByIdWithDurability<T>, ExecutableMutateInByIdOperation.MutateInByIdWithExpiry<T>, ExecutableMutateInByIdOperation.MutateInByIdWithOptions<T>, ExecutableMutateInByIdOperation.MutateInByIdWithPaths<T>, ExecutableMutateInByIdOperation.TerminatingMutateInById<T>
Nested classes/interfaces inherited from interface org.springframework.data.couchbase.core.ExecutableRangeScanOperation
ExecutableRangeScanOperation.ExecutableRangeScan<T>, ExecutableRangeScanOperation.RangeScanConsistentWith<T>, ExecutableRangeScanOperation.RangeScanInCollection<T>, ExecutableRangeScanOperation.RangeScanInScope<T>, ExecutableRangeScanOperation.RangeScanWithBatchByteLimit<T>, ExecutableRangeScanOperation.RangeScanWithBatchItemLimit<T>, ExecutableRangeScanOperation.RangeScanWithOptions<T>, ExecutableRangeScanOperation.RangeScanWithProjection<T>, ExecutableRangeScanOperation.RangeScanWithSort<T>, ExecutableRangeScanOperation.TerminatingRangeScan<T>
Nested classes/interfaces inherited from interface org.springframework.data.couchbase.core.ExecutableRemoveByIdOperation
ExecutableRemoveByIdOperation.ExecutableRemoveById, ExecutableRemoveByIdOperation.RemoveByIdInCollection, ExecutableRemoveByIdOperation.RemoveByIdInScope, ExecutableRemoveByIdOperation.RemoveByIdWithCas, ExecutableRemoveByIdOperation.RemoveByIdWithDurability, ExecutableRemoveByIdOperation.RemoveByIdWithOptions, ExecutableRemoveByIdOperation.TerminatingRemoveById
Nested classes/interfaces inherited from interface org.springframework.data.couchbase.core.ExecutableRemoveByQueryOperation
ExecutableRemoveByQueryOperation.ExecutableRemoveByQuery<T>, ExecutableRemoveByQueryOperation.RemoveByQueryConsistentWith<T>, ExecutableRemoveByQueryOperation.RemoveByQueryInCollection<T>, ExecutableRemoveByQueryOperation.RemoveByQueryInScope<T>, ExecutableRemoveByQueryOperation.RemoveByQueryWithConsistency<T>, ExecutableRemoveByQueryOperation.RemoveByQueryWithOptions<T>, ExecutableRemoveByQueryOperation.RemoveByQueryWithQuery<T>, ExecutableRemoveByQueryOperation.TerminatingRemoveByQuery<T>
Nested classes/interfaces inherited from interface org.springframework.data.couchbase.core.ExecutableReplaceByIdOperation
ExecutableReplaceByIdOperation.ExecutableReplaceById<T>, ExecutableReplaceByIdOperation.ReplaceByIdInCollection<T>, ExecutableReplaceByIdOperation.ReplaceByIdInScope<T>, ExecutableReplaceByIdOperation.ReplaceByIdWithDurability<T>, ExecutableReplaceByIdOperation.ReplaceByIdWithExpiry<T>, ExecutableReplaceByIdOperation.ReplaceByIdWithOptions<T>, ExecutableReplaceByIdOperation.TerminatingReplaceById<T>
Nested classes/interfaces inherited from interface org.springframework.data.couchbase.core.ExecutableUpsertByIdOperation
ExecutableUpsertByIdOperation.ExecutableUpsertById<T>, ExecutableUpsertByIdOperation.TerminatingUpsertById<T>, ExecutableUpsertByIdOperation.UpsertByIdInCollection<T>, ExecutableUpsertByIdOperation.UpsertByIdInScope<T>, ExecutableUpsertByIdOperation.UpsertByIdWithDurability<T>, ExecutableUpsertByIdOperation.UpsertByIdWithExpiry<T>, ExecutableUpsertByIdOperation.UpsertByIdWithOptions<T>
-
Method Summary
Modifier and TypeMethodDescription<T> Long
Returns the count of documents found by the query.The name of the bucket used.com.couchbase.client.java.query.QueryScanConsistency
Returns the default consistency to use for queriesReturns the converter used for this template/operations.Returns the underlying client factory.The name of the scope used, null if the default scope is used.<T> T
Save the entity to couchbase.
If there is no version property on the entity class, and this is in a transaction, use insert.Methods inherited from interface org.springframework.data.couchbase.core.ExecutableExistsByIdOperation
existsById, existsById
Methods inherited from interface org.springframework.data.couchbase.core.ExecutableFindByAnalyticsOperation
findByAnalytics
Methods inherited from interface org.springframework.data.couchbase.core.ExecutableFindByIdOperation
findById
Methods inherited from interface org.springframework.data.couchbase.core.ExecutableFindByQueryOperation
findByQuery
Methods inherited from interface org.springframework.data.couchbase.core.ExecutableFindFromReplicasByIdOperation
findFromReplicasById
Methods inherited from interface org.springframework.data.couchbase.core.ExecutableInsertByIdOperation
insertById
Methods inherited from interface org.springframework.data.couchbase.core.ExecutableMutateInByIdOperation
mutateInById
Methods inherited from interface org.springframework.data.couchbase.core.ExecutableRangeScanOperation
rangeScan
Methods inherited from interface org.springframework.data.couchbase.core.ExecutableRemoveByIdOperation
removeById, removeById
Methods inherited from interface org.springframework.data.couchbase.core.ExecutableRemoveByQueryOperation
removeByQuery
Methods inherited from interface org.springframework.data.couchbase.core.ExecutableReplaceByIdOperation
replaceById
Methods inherited from interface org.springframework.data.couchbase.core.ExecutableUpsertByIdOperation
upsertById
-
Method Details
-
getConverter
CouchbaseConverter getConverter()Returns the converter used for this template/operations. -
getBucketName
String getBucketName()The name of the bucket used. -
getScopeName
String getScopeName()The name of the scope used, null if the default scope is used. -
getCouchbaseClientFactory
CouchbaseClientFactory getCouchbaseClientFactory()Returns the underlying client factory. -
getConsistency
com.couchbase.client.java.query.QueryScanConsistency getConsistency()Returns the default consistency to use for queries -
save
Save the entity to couchbase.
If there is no version property on the entity class, and this is in a transaction, use insert.
If there is no version property on the entity class, and this is not in a transaction, use upsert.
If there is a version property on the entity class, and it is non-zero, then this is an existing document, use replace.
Otherwise, there is a version property for the entity, but it is zero or null, use insert.- Type Parameters:
T
- the entity class- Parameters:
entity
- the entity to save in couchbasescopeAndCollection
- for use by repositories only. these are varargs for the scope and collection.- Returns:
-
count
Returns the count of documents found by the query.- Type Parameters:
T
-- Parameters:
query
-domainType
-- Returns:
-