public class ReactiveRepositoryOperationsMapping extends Object
| Constructor and Description |
|---|
ReactiveRepositoryOperationsMapping(ReactiveCouchbaseOperations defaultOperations)
Creates a new mapping, setting the default fallback to use by otherwise non mapped repositories.
|
| Modifier and Type | Method and Description |
|---|---|
ReactiveCouchbaseOperations |
getDefault() |
MappingContext<? extends CouchbasePersistentEntity<?>,CouchbasePersistentProperty> |
getMappingContext()
Get the
MappingContext to use in repositories. |
ReactiveRepositoryOperationsMapping |
map(Class<?> repositoryInterface,
ReactiveCouchbaseOperations operations)
Add a highest priority mapping that will associate a specific repository interface with a given
ReactiveCouchbaseOperations. |
ReactiveRepositoryOperationsMapping |
mapEntity(Class<?> entityClass,
ReactiveCouchbaseOperations operations)
Add a middle priority mapping that will associate any un-mapped repository that deals with the given domain type
Class with a given
ReactiveCouchbaseOperations. |
ReactiveCouchbaseOperations |
resolve(Class<?> repositoryInterface,
Class<?> domainType)
Given a repository interface and its domain type, resolves which
ReactiveCouchbaseOperations it should be
backed with. |
ReactiveRepositoryOperationsMapping |
setDefault(ReactiveCouchbaseOperations aDefault)
Change the default reactive couchbase operations in an existing mapping.
|
public ReactiveRepositoryOperationsMapping(ReactiveCouchbaseOperations defaultOperations)
defaultOperations - the default fallback reactive couchbase operations.public ReactiveRepositoryOperationsMapping map(Class<?> repositoryInterface, ReactiveCouchbaseOperations operations)
ReactiveCouchbaseOperations.repositoryInterface - the repository interface Class.operations - the ReactiveCouchbaseOperations to use.public ReactiveRepositoryOperationsMapping mapEntity(Class<?> entityClass, ReactiveCouchbaseOperations operations)
ReactiveCouchbaseOperations.entityClass - the domain type's Class.operations - the CouchbaseOperations to use.public ReactiveCouchbaseOperations getDefault()
ReactiveCouchbaseOperations.public ReactiveRepositoryOperationsMapping setDefault(ReactiveCouchbaseOperations aDefault)
aDefault - the new default couchbase operations.public MappingContext<? extends CouchbasePersistentEntity<?>,CouchbasePersistentProperty> getMappingContext()
MappingContext to use in repositories. It is extracted from the default
ReactiveCouchbaseOperations.public ReactiveCouchbaseOperations resolve(Class<?> repositoryInterface, Class<?> domainType)
ReactiveCouchbaseOperations it should be
backed with. Starts by looking for a direct mapping to the interface, then a common mapping for the domain type,
then falls back to the default CouchbaseOperations.repositoryInterface - the repository's interface.domainType - the repository's domain type / entity.Copyright © 2011–2022 Pivotal Software, Inc.. All rights reserved.