public abstract class RepositoryFactorySupport extends ObjectSE implements BeanClassLoaderAware, BeanFactoryAware
QueryExecutorMethodInterceptor
に渡すアドバイスを適用します。クエリ検出戦略は、QueryLookupStrategy.Key
を設定することで構成できます。コンストラクターと説明 |
---|
RepositoryFactorySupport() |
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSE
public void setQueryLookupStrategyKey(QueryLookupStrategy.Key key)
key
-public void setNamedQueries(NamedQueries namedQueries)
QueryLookupStrategy
に渡される NamedQueries
インスタンスを構成します。namedQueries
- 設定する namedQueriespublic void setBeanClassLoader(ClassLoaderSE classLoader)
BeanClassLoaderAware
の setBeanClassLoader
public void setBeanFactory(BeanFactory beanFactory) throws BeansException
BeanFactoryAware
の setBeanFactory
BeansException
public void setEvaluationContextProvider(QueryMethodEvaluationContextProvider evaluationContextProvider)
QueryMethodEvaluationContextProvider
を設定します。evaluationContextProvider
- null にすることができ、デフォルトは QueryMethodEvaluationContextProvider.DEFAULT
です。public void setRepositoryBaseClass(ClassSE<?> repositoryBaseClass)
getRepositoryBaseClass(RepositoryMetadata)
によって返される型を使用します。repositoryBaseClass
- リポジトリプロキシをサポートするリポジトリの基本クラス。null でもかまいません。public void addQueryCreationListener(QueryCreationListener<?> listener)
QueryCreationListener
をファクトリに追加して、RepositoryQuery
インスタンスの作成直後にトリガーされる機能をプラグインします。listener
-public void addInvocationListener(RepositoryMethodInvocationListener listener)
RepositoryMethodInvocationListener
をファクトリに追加して、query methods
および fragment methods
SE の実行直後にトリガーされる機能をプラグインします。listener
-public void addRepositoryProxyPostProcessor(RepositoryProxyPostProcessor processor)
RepositoryProxyPostProcessor
をファクトリに追加して、プロキシが作成される前に ProxyFactory
を操作できるようにします。RepositoryProxyPostProcessor
が考慮された後、QueryExecutorMethodInterceptor
がプロキシに追加されることに注意してください。processor
-protected RepositoryComposition.RepositoryFragments getRepositoryFragments(RepositoryMetadata metadata)
RepositoryMetadata
に基づいて RepositoryComposition.RepositoryFragments
を作成し、リポジトリ固有の拡張機能を追加します。metadata
-public <T> T getRepository(ClassSE<T> repositoryInterface)
repositoryInterface
- null であってはなりません。public <T> T getRepository(ClassSE<T> repositoryInterface, ObjectSE customImplementation)
#getRepository(Class, RepositoryFragments)
を使用する必要があります。repositoryInterface
- null であってはなりません。customImplementation
- null であってはなりません。public <T> T getRepository(ClassSE<T> repositoryInterface, RepositoryComposition.RepositoryFragments fragments)
repositoryInterface
- null であってはなりません。fragments
- null であってはなりません。protected ProjectionFactory getProjectionFactory(ClassLoaderSE classLoader, BeanFactory beanFactory)
ProjectionFactory
を返します。classLoader
- null になることはありません。beanFactory
- null になることはありません。protected RepositoryMetadata getRepositoryMetadata(ClassSE<?> repositoryInterface)
RepositoryMetadata
を返します。repositoryInterface
- null になることはありません。protected RepositoryInformation getRepositoryInformation(RepositoryMetadata metadata, RepositoryComposition.RepositoryFragments fragments)
RepositoryMetadata
およびカスタム RepositoryComposition.RepositoryFragments
の RepositoryInformation
を返します。metadata
- null であってはなりません。fragments
- null であってはなりません。protected ListSE<QueryMethod> getQueryMethods()
protected ProjectionFactory getProjectionFactory()
ProjectionFactory
インスタンスを返します。public abstract <T,ID> EntityInformation<T,ID> getEntityInformation(ClassSE<T> domainClass)
EntityInformation
を返します。T
- エンティティ型 ID
- ID 型 domainClass
-protected abstract ObjectSE getTargetRepository(RepositoryInformation metadata)
metadata
-protected abstract ClassSE<?> getRepositoryBaseClass(RepositoryMetadata metadata)
getTargetRepository(RepositoryInformation)
がこのクラスのインスタンスを返すことを確認してください。metadata
-protected OptionalSE<QueryLookupStrategy> getQueryLookupStrategy(@Nullable QueryLookupStrategy.Key key, QueryMethodEvaluationContextProvider evaluationContextProvider)
key
- null でもかまいません。evaluationContextProvider
- null になることはありません。QueryLookupStrategy
。クエリを検索する必要がない場合は null。protected void validate(RepositoryMetadata repositoryMetadata)
protected final <R> R getTargetRepositoryViaReflection(RepositoryInformation information, ObjectSE... constructorArguments)
RepositoryInformation
で定義されたリポジトリ基本クラスのリポジトリを作成します。information
-constructorArguments
-@DeprecatedSE protected final <R> R getTargetRepositoryViaReflection(ClassSE<?> baseClass, ObjectSE... constructorArguments)
instantiateClass(Class, Object...)
を使用してください。RepositoryInformation
で定義されたリポジトリ基本クラスのリポジトリを作成します。baseClass
-constructorArguments
-protected final <R> R instantiateClass(ClassSE<?> baseClass, ObjectSE... constructorArguments)
constructorArguments
を使用してクラスをインスタンス化するための便利なメソッド。このメソッドは、アクセスできない(つまり、非パブリック)コンストラクターが指定された場合、コンストラクターをアクセス可能に設定しようとし、オプションのパラメーターとデフォルト値を持つ Kotlin クラスをサポートすることに注意してください。
baseClass
-constructorArguments
-Copyright © 2011–2022 Pivotal Software, Inc.. All rights reserved.