|
|
|
|
@ -122,8 +122,9 @@ public abstract class RepositoryFactoryBeanSupport<T extends Repository<S, ID>,
@@ -122,8 +122,9 @@ public abstract class RepositoryFactoryBeanSupport<T extends Repository<S, ID>,
|
|
|
|
|
* retrieval via the {@code RepositoryMethodContext} class. This is useful if an advised object needs to obtain |
|
|
|
|
* repository information. |
|
|
|
|
* <p> |
|
|
|
|
* Default is "false", in order to avoid unnecessary extra interception. This means that no guarantees are provided |
|
|
|
|
* that {@code RepositoryMethodContext} access will work consistently within any method of the advised object. |
|
|
|
|
* Default is {@code false}, in order to avoid unnecessary extra interception. This means that no guarantees are |
|
|
|
|
* provided that {@code RepositoryMethodContext} access will work consistently within any method of the advised |
|
|
|
|
* object. |
|
|
|
|
* |
|
|
|
|
* @since 3.4 |
|
|
|
|
*/ |
|
|
|
|
@ -134,16 +135,20 @@ public abstract class RepositoryFactoryBeanSupport<T extends Repository<S, ID>,
@@ -134,16 +135,20 @@ public abstract class RepositoryFactoryBeanSupport<T extends Repository<S, ID>,
|
|
|
|
|
/** |
|
|
|
|
* Set the {@link QueryLookupStrategy.Key} to be used. |
|
|
|
|
* |
|
|
|
|
* @param queryLookupStrategyKey |
|
|
|
|
* @param queryLookupStrategyKey the lookup strategy key to be used. |
|
|
|
|
*/ |
|
|
|
|
public void setQueryLookupStrategyKey(Key queryLookupStrategyKey) { |
|
|
|
|
this.queryLookupStrategyKey = queryLookupStrategyKey; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Setter to inject a custom repository implementation. |
|
|
|
|
* Setter to provide a single a custom repository implementation. Single custom implementations are considered first |
|
|
|
|
* when determining target method invocations routing. Single custom implementations were superseded by |
|
|
|
|
* {@link RepositoryFragments} that provide a more flexible way to compose repository implementations from multiple |
|
|
|
|
* fragments consisting of a fragment interface and its implementation. |
|
|
|
|
* |
|
|
|
|
* @param customImplementation |
|
|
|
|
* @param customImplementation the single custom implementation. |
|
|
|
|
* @see #setRepositoryFragments(RepositoryFragments) |
|
|
|
|
*/ |
|
|
|
|
public void setCustomImplementation(Object customImplementation) { |
|
|
|
|
this.customImplementation = customImplementation; |
|
|
|
|
@ -153,7 +158,7 @@ public abstract class RepositoryFactoryBeanSupport<T extends Repository<S, ID>,
@@ -153,7 +158,7 @@ public abstract class RepositoryFactoryBeanSupport<T extends Repository<S, ID>,
|
|
|
|
|
* Setter to inject repository fragments. This method is additive and will add another {@link RepositoryFragments} to |
|
|
|
|
* the already existing list of {@link RepositoryFragmentsFunction}. |
|
|
|
|
* |
|
|
|
|
* @param repositoryFragments |
|
|
|
|
* @param repositoryFragments the repository fragments to be used. |
|
|
|
|
*/ |
|
|
|
|
public void setRepositoryFragments(RepositoryFragments repositoryFragments) { |
|
|
|
|
setRepositoryFragmentsFunction(RepositoryFragmentsFunction.just(repositoryFragments)); |
|
|
|
|
@ -163,7 +168,7 @@ public abstract class RepositoryFactoryBeanSupport<T extends Repository<S, ID>,
@@ -163,7 +168,7 @@ public abstract class RepositoryFactoryBeanSupport<T extends Repository<S, ID>,
|
|
|
|
|
* Setter to inject repository fragments. This method is additive and will add another {@link RepositoryFragments} to |
|
|
|
|
* the already existing list of {@link RepositoryFragmentsFunction}. |
|
|
|
|
* |
|
|
|
|
* @param fragmentsFunction |
|
|
|
|
* @param fragmentsFunction function to derive additional repository fragments. |
|
|
|
|
* @since 4.0 |
|
|
|
|
*/ |
|
|
|
|
public void setRepositoryFragmentsFunction(RepositoryFragmentsFunction fragmentsFunction) { |
|
|
|
|
@ -173,7 +178,7 @@ public abstract class RepositoryFactoryBeanSupport<T extends Repository<S, ID>,
@@ -173,7 +178,7 @@ public abstract class RepositoryFactoryBeanSupport<T extends Repository<S, ID>,
|
|
|
|
|
/** |
|
|
|
|
* Setter to inject a {@link NamedQueries} instance. |
|
|
|
|
* |
|
|
|
|
* @param namedQueries the namedQueries to set |
|
|
|
|
* @param namedQueries the namedQueries to set. |
|
|
|
|
*/ |
|
|
|
|
public void setNamedQueries(NamedQueries namedQueries) { |
|
|
|
|
this.namedQueries = namedQueries; |
|
|
|
|
@ -183,7 +188,7 @@ public abstract class RepositoryFactoryBeanSupport<T extends Repository<S, ID>,
@@ -183,7 +188,7 @@ public abstract class RepositoryFactoryBeanSupport<T extends Repository<S, ID>,
|
|
|
|
|
* Configures the {@link MappingContext} to be used to lookup {@link PersistentEntity} instances for |
|
|
|
|
* {@link #getPersistentEntity()}. |
|
|
|
|
* |
|
|
|
|
* @param mappingContext |
|
|
|
|
* @param mappingContext mapping context to be used. |
|
|
|
|
*/ |
|
|
|
|
protected void setMappingContext(MappingContext<?, ?> mappingContext) { |
|
|
|
|
this.mappingContext = mappingContext; |
|
|
|
|
@ -301,14 +306,14 @@ public abstract class RepositoryFactoryBeanSupport<T extends Repository<S, ID>,
@@ -301,14 +306,14 @@ public abstract class RepositoryFactoryBeanSupport<T extends Repository<S, ID>,
|
|
|
|
|
return repositoryInterface; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
RepositoryFactorySupport getRequiredFactory() { |
|
|
|
|
private RepositoryFactorySupport getRequiredFactory() { |
|
|
|
|
|
|
|
|
|
Assert.state(factory != null, "RepositoryFactory is not initialized"); |
|
|
|
|
|
|
|
|
|
return factory; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
RepositoryMetadata getRequiredRepositoryMetadata() { |
|
|
|
|
private RepositoryMetadata getRequiredRepositoryMetadata() { |
|
|
|
|
|
|
|
|
|
Assert.state(repositoryMetadata != null, "RepositoryMetadata is not initialized"); |
|
|
|
|
|
|
|
|
|
|