クラス CdiRepositoryBean<T>
java.lang.ObjectSE
org.springframework.data.repository.cdi.CdiRepositoryBean<T>
- 実装されたすべてのインターフェース:
jakarta.enterprise.context.spi.Contextual<T>
、jakarta.enterprise.inject.spi.Bean<T>
、jakarta.enterprise.inject.spi.BeanAttributes<T>
、jakarta.enterprise.inject.spi.PassivationCapable
public abstract class CdiRepositoryBean<T>
extends ObjectSE
implements jakarta.enterprise.inject.spi.Bean<T>, jakarta.enterprise.inject.spi.PassivationCapable
Bean
ラッパーの基本クラス。- 作成者:
- Dirk Mahler, Oliver Gierke, Mark Paluchs, Peter Rietzler, Jens Schauder, Christoph Strobl, Ariel Carrera, Xeno Amess, Johannes Englmeier
コンストラクターのサマリー
コンストラクターコンストラクター説明CdiRepositoryBean
(SetSE<AnnotationSE> qualifiers, ClassSE<T> repositoryType, jakarta.enterprise.inject.spi.BeanManager beanManager) 新しいCdiRepositoryBean
を作成します。CdiRepositoryBean
(SetSE<AnnotationSE> qualifiers, ClassSE<T> repositoryType, jakarta.enterprise.inject.spi.BeanManager beanManager, OptionalSE<CustomRepositoryImplementationDetector> detector) 新しいCdiRepositoryBean
を作成します。CdiRepositoryBean
(SetSE<AnnotationSE> qualifiers, ClassSE<T> repositoryType, jakarta.enterprise.inject.spi.BeanManager beanManager, CdiRepositoryContext context) 新しいCdiRepositoryBean
を作成します。メソッドのサマリー
修飾子と型メソッド説明protected void
applyConfiguration
(RepositoryFactorySupport repositoryFactory) 実際の構成を検索して、CdiRepositoryConfiguration
からRepositoryFactorySupport
に構成を適用します。protected static void
applyConfiguration
(RepositoryFactorySupport repositoryFactory, CdiRepositoryConfiguration configuration) 実際の構成を検索して、CdiRepositoryConfiguration
からRepositoryFactorySupport
に構成を適用します。final T
protected abstract T
create
(jakarta.enterprise.context.spi.CreationalContext<T> creationalContext, ClassSE<T> repositoryType) 実際のコンポーネントインスタンスを作成します。protected T
create
(SupplierSE<? extends RepositoryFactorySupport> factorySupplier, ClassSE<T> repositoryType) repository factory supplier
およびリポジトリtype
SE を指定して、実際のコンポーネントインスタンスを作成します。protected static <T> T
create
(RepositoryFactorySupport repositoryFactory, ClassSE<T> repositoryType, RepositoryComposition.RepositoryFragments repositoryFragments) 実際のリポジトリインスタンスを作成します。void
ClassSE<?>
protected <S> S
getDependencyInstance
(jakarta.enterprise.inject.spi.Bean<S> bean) 指定されたBean
のインスタンスを返します。protected <S> S
getDependencyInstance
(jakarta.enterprise.inject.spi.Bean<S> bean, ClassSE<?> type) 指定されたBean
のインスタンスを返し、これから作成される型について特定できるようにします。getId()
SetSE<jakarta.enterprise.inject.spi.InjectionPoint>
getName()
getRepositoryFragments
(ClassSE<T> repositoryType) repository interface
SE のリポジトリフラグメントを検索します。ClassSE<? extends AnnotationSE>
getScope()
SetSE<ClassSE<? extends AnnotationSE>>
getTypes()
final void
Bean ターゲットの初期化を強制します。boolean
boolean
protected CdiRepositoryConfiguration
lookupConfiguration
(jakarta.enterprise.inject.spi.BeanManager beanManager, SetSE<AnnotationSE> qualifiers) CdiRepositoryConfiguration
のインスタンスを検索します。toString()
コンストラクターの詳細
CdiRepositoryBean
public CdiRepositoryBean(SetSE<AnnotationSE> qualifiers, ClassSE<T> repositoryType, jakarta.enterprise.inject.spi.BeanManager beanManager) 新しいCdiRepositoryBean
を作成します。- パラメーター:
qualifiers
- null であってはなりません。repositoryType
- インターフェースでなければならない null であってはなりません。beanManager
- CDIBeanManager
、null であってはなりません。
CdiRepositoryBean
public CdiRepositoryBean(SetSE<AnnotationSE> qualifiers, ClassSE<T> repositoryType, jakarta.enterprise.inject.spi.BeanManager beanManager, OptionalSE<CustomRepositoryImplementationDetector> detector) 新しいCdiRepositoryBean
を作成します。- パラメーター:
qualifiers
- null であってはなりません。repositoryType
- インターフェースでなければならない null であってはなりません。beanManager
- CDIBeanManager
、null であってはなりません。detector
- カスタムリポジトリ実装CustomRepositoryImplementationDetector
のディテクター。
CdiRepositoryBean
public CdiRepositoryBean(SetSE<AnnotationSE> qualifiers, ClassSE<T> repositoryType, jakarta.enterprise.inject.spi.BeanManager beanManager, CdiRepositoryContext context) 新しいCdiRepositoryBean
を作成します。- パラメーター:
qualifiers
- null であってはなりません。repositoryType
- インターフェースでなければならない null であってはなりません。beanManager
- CDIBeanManager
、null であってはなりません。context
- クラスローダー、メタデータスキャン、フラグメント検出をカプセル化する CDI コンテキスト。- 導入:
- 2.1
メソッドの詳細
getTypes
- 次で指定:
- インターフェース
jakarta.enterprise.inject.spi.BeanAttributes<T>
のgetTypes
getDependencyInstance
protected <S> S getDependencyInstance(jakarta.enterprise.inject.spi.Bean<S> bean) 指定されたBean
のインスタンスを返します。- パラメーター:
bean
- インスタンスを作成しようとしているBean
- 戻り値:
- 実際のコンポーネントのインスタンス。
- 関連事項:
BeanAttributes.getTypes()
getDependencyInstance
指定されたBean
のインスタンスを返し、これから作成される型について特定できるようにします。- パラメーター:
bean
- インスタンスを作成しようとしているBean
type
- そのBean
に対して作成されたコンポーネントインスタンスの予想される型。Bean
は複数の型を運ぶ可能性がありますが、プライマリ型が最初ではない可能性があるため、このパラメーターを明示的に渡す必要があります。つまり、Bean.getBeanClass()
によって返された型です。- 戻り値:
- 実際のコンポーネントのインスタンス。
- 関連事項:
BeanAttributes.getTypes()
initialize
public final void initialize()Bean ターゲットの初期化を強制します。create
- 次で指定:
- インターフェース
jakarta.enterprise.context.spi.Contextual<T>
のcreate
destroy
public void destroy(T instance, jakarta.enterprise.context.spi.CreationalContext<T> creationalContext) - 次で指定:
- インターフェース
jakarta.enterprise.context.spi.Contextual<T>
のdestroy
getQualifiers
- 次で指定:
- インターフェース
jakarta.enterprise.inject.spi.BeanAttributes<T>
のgetQualifiers
getName
- 次で指定:
- インターフェース
jakarta.enterprise.inject.spi.BeanAttributes<T>
のgetName
getStereotypes
- 次で指定:
- インターフェース
jakarta.enterprise.inject.spi.BeanAttributes<T>
のgetStereotypes
getBeanClass
- 次で指定:
- インターフェース
jakarta.enterprise.inject.spi.Bean<T>
のgetBeanClass
isAlternative
public boolean isAlternative()- 次で指定:
- インターフェース
jakarta.enterprise.inject.spi.BeanAttributes<T>
のisAlternative
isNullable
public boolean isNullable()getInjectionPoints
- 次で指定:
- インターフェース
jakarta.enterprise.inject.spi.Bean<T>
のgetInjectionPoints
getScope
- 次で指定:
- インターフェース
jakarta.enterprise.inject.spi.BeanAttributes<T>
のgetScope
getId
- 次で指定:
- インターフェース
jakarta.enterprise.inject.spi.PassivationCapable
のgetId
create
protected abstract T create(jakarta.enterprise.context.spi.CreationalContext<T> creationalContext, ClassSE<T> repositoryType) 実際のコンポーネントインスタンスを作成します。- パラメーター:
creationalContext
- null になることはありません。repositoryType
- null になることはありません。- 戻り値:
create
protected T create(SupplierSE<? extends RepositoryFactorySupport> factorySupplier, ClassSE<T> repositoryType) repository factory supplier
およびリポジトリtype
SE を指定して、実際のコンポーネントインスタンスを作成します。このメソッドは、リポジトリを作成するためのユーティリティです。このメソッドはrepository factory
を取得し、CdiRepositoryConfiguration
で構成します。- パラメーター:
factorySupplier
- null であってはなりません。repositoryType
- null であってはなりません。- 戻り値:
- 導入:
- 2.1
getRepositoryFragments
protected RepositoryComposition.RepositoryFragments getRepositoryFragments(ClassSE<T> repositoryType) repository interface
SE のリポジトリフラグメントを検索します。- パラメーター:
repositoryType
- null であってはなりません。- 戻り値:
RepositoryComposition.RepositoryFragments
- 導入:
- 2.1
lookupConfiguration
protected CdiRepositoryConfiguration lookupConfiguration(jakarta.enterprise.inject.spi.BeanManager beanManager, SetSE<AnnotationSE> qualifiers) CdiRepositoryConfiguration
のインスタンスを検索します。CDI スコープ内でインスタンスが見つからない場合、デフォルトの構成が使用されます。- 戻り値:
- 使用可能な CdiRepositoryConfiguration インスタンスまたはデフォルト構成。
applyConfiguration
実際の構成を検索して、CdiRepositoryConfiguration
からRepositoryFactorySupport
に構成を適用します。- パラメーター:
repositoryFactory
- null になることはありません。- 導入:
- 2.1
applyConfiguration
protected static void applyConfiguration(RepositoryFactorySupport repositoryFactory, CdiRepositoryConfiguration configuration) 実際の構成を検索して、CdiRepositoryConfiguration
からRepositoryFactorySupport
に構成を適用します。- パラメーター:
repositoryFactory
- null になることはありません。configuration
- null になることはありません。- 導入:
- 2.1
create
protected static <T> T create(RepositoryFactorySupport repositoryFactory, ClassSE<T> repositoryType, RepositoryComposition.RepositoryFragments repositoryFragments) 実際のリポジトリインスタンスを作成します。- パラメーター:
repositoryType
- null になることはありません。repositoryFragments
- null になることはありません。- 戻り値:
toString