インターフェース MappingContext<E extends PersistentEntity<?,P>,P extends PersistentProperty<P>>
- すべての既知の実装クラス:
AbstractMappingContext
public interface MappingContext<E extends PersistentEntity<?,P>,P extends PersistentProperty<P>>
このインターフェースは、すべての既知の PersistentEntity インスタンスとオンデマンドでインスタンスを取得するメソッドを含む全体的なコンテキストを定義します。これは、エンティティ間の関連付けを確立するために内部で使用され、実行時に名前でエンティティを取得するためにも使用されます。
- 作成者:
- Oliver Gierke, Jon Brisbin, Graeme Rocher, Mark Paluch, Christoph Strobl, Johannes Englmeier
メソッドのサマリー
修飾子と型メソッド説明<T> PersistentPropertyPaths<T,P> findPersistentPropertyPaths(ClassSE<T> type, PredicateSE<? super P> predicate) 指定されたPredicateSE と一致する、指定された型のプロパティを指すすべてのPersistentPropertyPathを返します。コンテキストに保持されているすべてのPersistentEntityを返します。getPersistentEntity(ClassSE<?> type) 指定されたClassSE のPersistentEntityを返します。getPersistentEntity(TypeInformation<?> type) 指定されたTypeInformationのPersistentEntityを返します。getPersistentEntity(P persistentProperty) 指定されたPersistentPropertyによってマップされたPersistentEntityを返します。getPersistentPropertyPath(StringSE propertyPath, ClassSE<?> type) 指定された型に基づいて、指定されたドットパス表記のすべてのPersistentPropertyを返します。getPersistentPropertyPath(StringSE propertyPath, TypeInformation<?> type) 指定された型に基づいて、指定されたドットパス表記のすべてのPersistentPropertyを返します。getPersistentPropertyPath(PropertyPath propertyPath) 指定されたPropertyPathに基づいて、指定されたパス式のすべてのPersistentPropertyを返します。default EgetRequiredPersistentEntity(ClassSE<?> type) 指定されたClassSE に必要なPersistentEntityを返します。default E指定されたTypeInformationのPersistentEntityを返します。default EgetRequiredPersistentEntity(P persistentProperty) 指定されたPersistentPropertyによってマップされたPersistentEntityを返します。booleanhasPersistentEntityFor(ClassSE<?> type) MappingContextに現在その型のPersistentEntityが含まれているかどうかを返します。
メソッドの詳細
getPersistentEntities
CollectionSE<E> getPersistentEntities()コンテキストに保持されているすべてのPersistentEntityを返します。- 戻り値:
- 決して null にはなりません。
getPersistentEntity
- パラメーター:
type- null であってはなりません。- 戻り値:
- 型に
PersistentEntityが見つからない場合は null。 - 関連事項:
getRequiredPersistentEntity
- パラメーター:
type- null であってはなりません。- 戻り値:
- 決して null にはなりません。
- 例外:
MappingException- 指定された型のPersistentEntityが見つからない場合。- 導入:
- 2.0
- 関連事項:
hasPersistentEntityFor
MappingContextに現在その型のPersistentEntityが含まれているかどうかを返します。- パラメーター:
type- null であってはなりません。- 戻り値:
- 指定された型に
PersistentEntityが存在する場合は true。 - 導入:
- 1.8
getPersistentEntity
- パラメーター:
type- null であってはなりません。- 戻り値:
TypeInformationのPersistentEntityが見つからない場合は null。- 関連事項:
getRequiredPersistentEntity
- パラメーター:
type- null であってはなりません。- 戻り値:
- 決して null にはなりません。
- 例外:
MappingException- 指定されたTypeInformationに対してPersistentEntityが見つからない場合。- 関連事項:
getPersistentEntity
指定されたPersistentPropertyによってマップされたPersistentEntityを返します。- パラメーター:
persistentProperty- null であってはなりません。- 戻り値:
- 指定された
PersistentPropertyによってマップされたPersistentEntity、またはPersistentEntityが存在しない場合、PersistentPropertyがエンティティを参照しない場合は null(プロパティの型は単純と見なされるSimpleTypeHolder.isSimpleType(Class)を参照)
getRequiredPersistentEntity
指定されたPersistentPropertyによってマップされたPersistentEntityを返します。- パラメーター:
persistentProperty- null であってはなりません。- 戻り値:
- 指定された
PersistentPropertyによってマップされたPersistentEntity、またはPersistentEntityが存在しない場合、PersistentPropertyがエンティティを参照しない場合は null(プロパティの型は単純と見なされるSimpleTypeHolder.isSimpleType(Class)を参照) - 例外:
MappingException- 指定されたPersistentPropertyに対してPersistentEntityが見つからない場合。
getPersistentPropertyPath
PersistentPropertyPath<P> getPersistentPropertyPath(PropertyPath propertyPath) throws InvalidPersistentPropertyPath 指定されたPropertyPathに基づいて、指定されたパス式のすべてのPersistentPropertyを返します。- パラメーター:
propertyPath- null であってはなりません。- 戻り値:
- 指定された
PropertyPathを表すPersistentPropertyPath - 例外:
InvalidPersistentPropertyPath- 指定されたPropertyPathのすべてのセグメントを解決できない場合に備えて。
getPersistentPropertyPath
PersistentPropertyPath<P> getPersistentPropertyPath(StringSE propertyPath, ClassSE<?> type) throws InvalidPersistentPropertyPath 指定された型に基づいて、指定されたドットパス表記のすべてのPersistentPropertyを返します。- パラメーター:
propertyPath- null であってはなりません。type- null であってはなりません。- 戻り値:
- 指定された型の指定されたプロパティパスを表す
PersistentPropertyPath - 例外:
InvalidPersistentPropertyPath- 指定されたプロパティパスのすべてのセグメントを解決できない場合に備えて。
getPersistentPropertyPath
PersistentPropertyPath<P> getPersistentPropertyPath(StringSE propertyPath, TypeInformation<?> type) throws InvalidPersistentPropertyPath 指定された型に基づいて、指定されたドットパス表記のすべてのPersistentPropertyを返します。- パラメーター:
propertyPath- null であってはなりません。type- null であってはなりません。- 戻り値:
- 指定された型の指定されたプロパティパスを表す
PersistentPropertyPath - 例外:
InvalidPersistentPropertyPath- 指定されたプロパティパスのすべてのセグメントを解決できない場合に備えて。- 導入:
- 3.2.1
findPersistentPropertyPaths
<T> PersistentPropertyPaths<T,P> findPersistentPropertyPaths(ClassSE<T> type, PredicateSE<? super P> predicate) 指定されたPredicateSE に一致する、指定された型のプロパティを指すすべてのPersistentPropertyPathを返します。循環参照の場合、検出はパスにすでに含まれている型を参照するプロパティで停止します。結果をキャッシュできないため、この操作はコストがかかる可能性があることに注意してください。- パラメーター:
type- null であってはなりません。predicate- null であってはなりません。- 戻り値:
- 導入:
- 2.1
getManagedTypes
CollectionSE<TypeInformation<?>> getManagedTypes()- 戻り値:
MappingContextのPersistentEntityのすべてのTypeInformation。- 導入:
- 1.8