Class JpaMetamodelMappingContext
java.lang.Object
org.springframework.data.mapping.context.AbstractMappingContext<org.springframework.data.jpa.mapping.JpaPersistentEntityImpl<?>,JpaPersistentProperty>
 
org.springframework.data.jpa.mapping.JpaMetamodelMappingContext
- All Implemented Interfaces:
- Aware,- InitializingBean,- ApplicationContextAware,- ApplicationEventPublisherAware,- MappingContext<org.springframework.data.jpa.mapping.JpaPersistentEntityImpl<?>,- JpaPersistentProperty> 
public class JpaMetamodelMappingContext
extends AbstractMappingContext<org.springframework.data.jpa.mapping.JpaPersistentEntityImpl<?>,JpaPersistentProperty> 
MappingContext implementation based on a Jpa Metamodel.- Since:
- 1.3
- Author:
- Oliver Gierke, Christoph Strobl, Mark Paluch, David Madden
- 
Constructor SummaryConstructorsConstructorDescriptionJpaMetamodelMappingContext(Set<jakarta.persistence.metamodel.Metamodel> models) Creates a new JPAMetamodelbasedMappingContext.
- 
Method SummaryModifier and TypeMethodDescriptionprotected <T> org.springframework.data.jpa.mapping.JpaPersistentEntityImpl<?>createPersistentEntity(TypeInformation<T> typeInformation) protected JpaPersistentPropertycreatePersistentProperty(Property property, org.springframework.data.jpa.mapping.JpaPersistentEntityImpl<?> owner, SimpleTypeHolder simpleTypeHolder) findPersistentPropertyPaths(Class<T> type, Predicate<? super JpaPersistentProperty> predicate) We customize the lookup ofPersistentPropertyPathsby also traversing properties that are embeddables.booleanhasPersistentEntityFor(Class<?> type) protected booleanMethods inherited from class org.springframework.data.mapping.context.AbstractMappingContextaddPersistentEntity, addPersistentEntity, afterPropertiesSet, doFindPersistentPropertyPaths, getManagedTypes, getPersistentEntities, getPersistentEntity, getPersistentEntity, getPersistentEntity, getPersistentPropertyPath, getPersistentPropertyPath, initialize, setApplicationContext, setApplicationEventPublisher, setInitialEntitySet, setManagedTypes, setSimpleTypeHolder, setStrictMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.data.mapping.context.MappingContextgetRequiredPersistentEntity, getRequiredPersistentEntity, getRequiredPersistentEntity
- 
Constructor Details- 
JpaMetamodelMappingContextCreates a new JPAMetamodelbasedMappingContext.- Parameters:
- models- must not be null or empty.
 
 
- 
- 
Method Details- 
createPersistentEntityprotected <T> org.springframework.data.jpa.mapping.JpaPersistentEntityImpl<?> createPersistentEntity(TypeInformation<T> typeInformation) - Specified by:
- createPersistentEntityin class- AbstractMappingContext<org.springframework.data.jpa.mapping.JpaPersistentEntityImpl<?>,- JpaPersistentProperty> 
 
- 
createPersistentPropertyprotected JpaPersistentProperty createPersistentProperty(Property property, org.springframework.data.jpa.mapping.JpaPersistentEntityImpl<?> owner, SimpleTypeHolder simpleTypeHolder) - Specified by:
- createPersistentPropertyin class- AbstractMappingContext<org.springframework.data.jpa.mapping.JpaPersistentEntityImpl<?>,- JpaPersistentProperty> 
 
- 
shouldCreatePersistentEntityFor- Overrides:
- shouldCreatePersistentEntityForin class- AbstractMappingContext<org.springframework.data.jpa.mapping.JpaPersistentEntityImpl<?>,- JpaPersistentProperty> 
 
- 
findPersistentPropertyPathspublic <T> PersistentPropertyPaths<T,JpaPersistentProperty> findPersistentPropertyPaths(Class<T> type, Predicate<? super JpaPersistentProperty> predicate) We customize the lookup ofPersistentPropertyPathsby also traversing properties that are embeddables.- Specified by:
- findPersistentPropertyPathsin interface- MappingContext<org.springframework.data.jpa.mapping.JpaPersistentEntityImpl<?>,- JpaPersistentProperty> 
- Overrides:
- findPersistentPropertyPathsin class- AbstractMappingContext<org.springframework.data.jpa.mapping.JpaPersistentEntityImpl<?>,- JpaPersistentProperty> 
- See Also:
 
- 
hasPersistentEntityFor- Specified by:
- hasPersistentEntityForin interface- MappingContext<org.springframework.data.jpa.mapping.JpaPersistentEntityImpl<?>,- JpaPersistentProperty> 
- Overrides:
- hasPersistentEntityForin class- AbstractMappingContext<org.springframework.data.jpa.mapping.JpaPersistentEntityImpl<?>,- JpaPersistentProperty> 
 
 
-