E - MappingContext 実装が作成する具体的な PersistentEntity 型 P - MappingContext 実装が作成する具体的な PersistentProperty 型 public abstract class AbstractMappingContext<E extends MutablePersistentEntity<?,P>,P extends PersistentProperty<P>> extends ObjectSE implements MappingContext<E,P>, ApplicationEventPublisherAware, ApplicationContextAware, InitializingBean
PersistentEntity および PersistentProperty のインスタンスを作成するための基本クラス。 実装では、ReentrantReadWriteLockSE を使用して、外部からアクセスする前に PersistentEntity が完全に実装されていることを確認します。
| 修飾子 | コンストラクターと説明 |
|---|---|
protected | AbstractMappingContext() |
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSEgetRequiredPersistentEntity, getRequiredPersistentEntity, getRequiredPersistentEntitypublic void setApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher)
ApplicationEventPublisherAware 内の setApplicationEventPublisher public void setApplicationContext(ApplicationContext applicationContext) throws BeansException
ApplicationContextAware 内の setApplicationContext BeansExceptionpublic void setInitialEntitySet(SetSE<? extends ClassSE<?>> initialEntitySet)
SetSE を設定して、最初にコンテキストにデータを入力します。initialEntitySet -public void setStrict(boolean strict)
MappingContext が厳密モードであるかどうかを構成します。つまり、コンテキストにまだ存在しない PersistentEntity を検索しようとした場合に、MappingException をスローします。これはデフォルトで false に設定されているため、事前に不明な場合は不明な型が MappingContext に透過的に追加されます。strict -public void setSimpleTypeHolder(SimpleTypeHolder simpleTypes)
MappingContext で使用されるように SimpleTypeHolder を構成します。どの型が単純型と見なされ、再帰的に分析されないかをカスタマイズできます。simpleTypes - null であってはなりません。public CollectionSE<E> getPersistentEntities()
MappingContextPersistentEntity を返します。MappingContext<E extends MutablePersistentEntity<?,P>,P extends PersistentProperty<P>> 内の getPersistentEntities @Nullable public E getPersistentEntity(ClassSE<?> type)
MappingContextMappingContext<E extends MutablePersistentEntity<?,P>,P extends PersistentProperty<P>> 内の getPersistentEntity type - null であってはなりません。PersistentEntity が見つからない場合は null。SimpleTypeHolder.isSimpleType(Class)public boolean hasPersistentEntityFor(ClassSE<?> type)
MappingContextMappingContext に現在その型の PersistentEntity が含まれているかどうかを返します。MappingContext<E extends MutablePersistentEntity<?,P>,P extends PersistentProperty<P>> 内の hasPersistentEntityFor type - null であってはなりません。PersistentEntity が存在する場合は true。@Nullable public E getPersistentEntity(TypeInformation<?> type)
MappingContextMappingContext<E extends MutablePersistentEntity<?,P>,P extends PersistentProperty<P>> 内の getPersistentEntity type - null であってはなりません。TypeInformation の PersistentEntity が見つからない場合は null。SimpleTypeHolder.isSimpleType(Class)@Nullable public E getPersistentEntity(P persistentProperty)
MappingContextPersistentProperty によってマップされた PersistentEntity を返します。MappingContext<E extends MutablePersistentEntity<?,P>,P extends PersistentProperty<P>> 内の getPersistentEntity persistentProperty - null であってはなりません。PersistentProperty によってマップされた PersistentEntity、または PersistentEntity が存在しない場合、PersistentProperty がエンティティを参照しない場合は null(プロパティの型は単純と見なされる SimpleTypeHolder.isSimpleType(Class) を参照)public PersistentPropertyPath<P> getPersistentPropertyPath(PropertyPath propertyPath)
MappingContextPropertyPath に基づいて、指定されたパス式のすべての PersistentProperty を返します。MappingContext<E extends MutablePersistentEntity<?,P>,P extends PersistentProperty<P>> 内の getPersistentPropertyPath propertyPath - null であってはなりません。PropertyPath を表す PersistentPropertyPathpublic PersistentPropertyPath<P> getPersistentPropertyPath(StringSE propertyPath, ClassSE<?> type)
MappingContextPersistentProperty を返します。MappingContext<E extends MutablePersistentEntity<?,P>,P extends PersistentProperty<P>> 内の getPersistentPropertyPath propertyPath - null であってはなりません。type - null であってはなりません。PersistentPropertyPathpublic <T> PersistentPropertyPaths<T,P> findPersistentPropertyPaths(ClassSE<T> type, PredicateSE<? super P> predicate)
MappingContextPredicateSE に一致する指定された型のプロパティを指すすべての PersistentPropertyPath を返します。循環参照の場合、検出は、すでにパスに含まれている型を参照するプロパティで停止します。結果をキャッシュできないため、これは潜在的にコストのかかる操作です。MappingContext<E extends MutablePersistentEntity<?,P>,P extends PersistentProperty<P>> 内の findPersistentPropertyPaths type - null であってはなりません。predicate - null であってはなりません。protected final <T> PersistentPropertyPaths<T,P> doFindPersistentPropertyPaths(ClassSE<T> type, PredicateSE<? super P> predicate, PredicateSE<P> traversalGuard)
PersistentPropertyPaths を検索します。主な目的は、サブ型がデフォルトのトラバーサルガードを変更できるようにすることです。findPersistentPropertyPaths(Class, Predicate) によって使用されます。type - null になることはありません。predicate - null になることはありません。traversalGuard - null になることはありません。findPersistentPropertyPaths(Class, Predicate)protected OptionalSE<E> addPersistentEntity(ClassSE<?> type)
MappingContext に追加します。type - null であってはなりません。protected OptionalSE<E> addPersistentEntity(TypeInformation<?> typeInformation)
TypeInformation を MappingContext に追加します。typeInformation - null であってはなりません。public CollectionSE<TypeInformation<?>> getManagedTypes()
MappingContextMappingContext<E extends MutablePersistentEntity<?,P>,P extends PersistentProperty<P>> 内の getManagedTypes MappingContext の PersistentEntity のすべての TypeInformation。protected abstract <T> E createPersistentEntity(TypeInformation<T> typeInformation)
PersistentEntity インスタンスを作成します。T -typeInformation -protected abstract P createPersistentProperty(Property property, E owner, SimpleTypeHolder simpleTypeHolder)
PersistentProperty の具象インスタンスを作成します。property -owner -simpleTypeHolder -public void afterPropertiesSet()
InitializingBean 内の afterPropertiesSet public void initialize()
setInitialEntitySet(Set) を介して構成された型をコンテキストに追加します。protected boolean shouldCreatePersistentEntityFor(TypeInformation<?> type)
TypeInformation に対して PersistentEntity インスタンスを作成する必要があるかどうかを返します。デフォルトでは、これは単純でサポートされていない Kotlin クラスと見なされるすべての型を拒否しますが、最上位の型 (単純と見なされるようにレンダリングする) のカスタムコンバーターを登録しているが、メタ情報が必要な場合は、微調整が必要になる場合があります。それらについて。type - null になることはありません。Copyright © 2011–2020 Pivotal Software, Inc.. All rights reserved.