public class JpaMetamodelMappingContext extends AbstractMappingContext<org.springframework.data.jpa.mapping.JpaPersistentEntityImpl<?>,JpaPersistentProperty>
MappingContext implementation based on a Jpa Metamodel.| Constructor and Description |
|---|
JpaMetamodelMappingContext(Set<javax.persistence.metamodel.Metamodel> models)
Creates a new JPA
Metamodel based MappingContext. |
| Modifier and Type | Method and Description |
|---|---|
protected <T> org.springframework.data.jpa.mapping.JpaPersistentEntityImpl<?> |
createPersistentEntity(TypeInformation<T> typeInformation) |
protected JpaPersistentProperty |
createPersistentProperty(Property property,
org.springframework.data.jpa.mapping.JpaPersistentEntityImpl<?> owner,
SimpleTypeHolder simpleTypeHolder) |
<T> PersistentPropertyPaths<T,JpaPersistentProperty> |
findPersistentPropertyPaths(Class<T> type,
Predicate<? super JpaPersistentProperty> predicate)
We customize the lookup of
PersistentPropertyPaths by also traversing properties that are embeddables. |
boolean |
hasPersistentEntityFor(Class<?> type) |
protected boolean |
shouldCreatePersistentEntityFor(TypeInformation<?> type) |
addPersistentEntity, addPersistentEntity, afterPropertiesSet, doFindPersistentPropertyPaths, getManagedTypes, getPersistentEntities, getPersistentEntity, getPersistentEntity, getPersistentEntity, getPersistentPropertyPath, getPersistentPropertyPath, getPersistentPropertyPath, initialize, setApplicationContext, setApplicationEventPublisher, setInitialEntitySet, setSimpleTypeHolder, setStrictclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetRequiredPersistentEntity, getRequiredPersistentEntity, getRequiredPersistentEntitypublic JpaMetamodelMappingContext(Set<javax.persistence.metamodel.Metamodel> models)
Metamodel based MappingContext.models - must not be null or empty.protected <T> org.springframework.data.jpa.mapping.JpaPersistentEntityImpl<?> createPersistentEntity(TypeInformation<T> typeInformation)
createPersistentEntity in class AbstractMappingContext<org.springframework.data.jpa.mapping.JpaPersistentEntityImpl<?>,JpaPersistentProperty>protected JpaPersistentProperty createPersistentProperty(Property property, org.springframework.data.jpa.mapping.JpaPersistentEntityImpl<?> owner, SimpleTypeHolder simpleTypeHolder)
createPersistentProperty in class AbstractMappingContext<org.springframework.data.jpa.mapping.JpaPersistentEntityImpl<?>,JpaPersistentProperty>protected boolean shouldCreatePersistentEntityFor(TypeInformation<?> type)
shouldCreatePersistentEntityFor in class AbstractMappingContext<org.springframework.data.jpa.mapping.JpaPersistentEntityImpl<?>,JpaPersistentProperty>public <T> PersistentPropertyPaths<T,JpaPersistentProperty> findPersistentPropertyPaths(Class<T> type, Predicate<? super JpaPersistentProperty> predicate)
PersistentPropertyPaths by also traversing properties that are embeddables.findPersistentPropertyPaths in interface MappingContext<org.springframework.data.jpa.mapping.JpaPersistentEntityImpl<?>,JpaPersistentProperty>findPersistentPropertyPaths in class AbstractMappingContext<org.springframework.data.jpa.mapping.JpaPersistentEntityImpl<?>,JpaPersistentProperty>AbstractMappingContext.findPersistentPropertyPaths(java.lang.Class,
java.util.function.Predicate)public boolean hasPersistentEntityFor(Class<?> type)
hasPersistentEntityFor in interface MappingContext<org.springframework.data.jpa.mapping.JpaPersistentEntityImpl<?>,JpaPersistentProperty>hasPersistentEntityFor in class AbstractMappingContext<org.springframework.data.jpa.mapping.JpaPersistentEntityImpl<?>,JpaPersistentProperty>Copyright © 2011–2019 Pivotal Software, Inc.. All rights reserved.