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
のインスタンスを作成するための基本クラス。 実装では、ReentrantReadWriteLock
SE を使用して、外部からアクセスする前に PersistentEntity
が完全に実装されていることを確認します。
修飾子 | コンストラクターと説明 |
---|---|
protected | AbstractMappingContext() |
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSE
getRequiredPersistentEntity, getRequiredPersistentEntity, getRequiredPersistentEntity
public void setApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher)
ApplicationEventPublisherAware
の setApplicationEventPublisher
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException
ApplicationContextAware
の setApplicationContext
BeansException
public void setInitialEntitySet(SetSE<? extends ClassSE<?>> initialEntitySet)
Set
SE を設定して、最初にコンテキストにデータを入力します。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()
MappingContext
PersistentEntity
を返します。MappingContext<E extends MutablePersistentEntity<?,P>,P extends PersistentProperty<P>>
の getPersistentEntities
@Nullable public E getPersistentEntity(ClassSE<?> type)
MappingContext
MappingContext<E extends MutablePersistentEntity<?,P>,P extends PersistentProperty<P>>
の getPersistentEntity
type
- null であってはなりません。PersistentEntity
が見つからない場合は null。SimpleTypeHolder.isSimpleType(Class)
public boolean hasPersistentEntityFor(ClassSE<?> type)
MappingContext
MappingContext
に現在その型の PersistentEntity
が含まれているかどうかを返します。MappingContext<E extends MutablePersistentEntity<?,P>,P extends PersistentProperty<P>>
の hasPersistentEntityFor
type
- null であってはなりません。PersistentEntity
が存在する場合は true。@Nullable public E getPersistentEntity(TypeInformation<?> type)
MappingContext
MappingContext<E extends MutablePersistentEntity<?,P>,P extends PersistentProperty<P>>
の getPersistentEntity
type
- null であってはなりません。TypeInformation
の PersistentEntity
が見つからない場合は null。SimpleTypeHolder.isSimpleType(Class)
@Nullable public E getPersistentEntity(P persistentProperty)
MappingContext
PersistentProperty
によってマップされた 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)
MappingContext
PropertyPath
に基づいて、指定されたパス式のすべての PersistentProperty
を返します。MappingContext<E extends MutablePersistentEntity<?,P>,P extends PersistentProperty<P>>
の getPersistentPropertyPath
propertyPath
- null であってはなりません。PropertyPath
を表す PersistentPropertyPath
public PersistentPropertyPath<P> getPersistentPropertyPath(StringSE propertyPath, ClassSE<?> type)
MappingContext
PersistentProperty
を返します。MappingContext<E extends MutablePersistentEntity<?,P>,P extends PersistentProperty<P>>
の getPersistentPropertyPath
propertyPath
- null であってはなりません。type
- null であってはなりません。PersistentPropertyPath
public PersistentPropertyPath<P> getPersistentPropertyPath(InvalidPersistentPropertyPath invalidPath)
MappingContext
InvalidPersistentPropertyPath
の解決可能な部分の PersistentPropertyPath
を返します。MappingContext<E extends MutablePersistentEntity<?,P>,P extends PersistentProperty<P>>
の getPersistentPropertyPath
invalidPath
- null であってはなりません。InvalidPersistentPropertyPath
の解決可能な部分の PersistentPropertyPath
。public <T> PersistentPropertyPaths<T,P> findPersistentPropertyPaths(ClassSE<T> type, PredicateSE<? super P> predicate)
MappingContext
Predicate
SE に一致する指定された型のプロパティを指すすべての 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()
MappingContext
MappingContext<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–2019 Pivotal Software, Inc.. All rights reserved.