public class JpaMetamodelMappingContext extends org.springframework.data.mapping.context.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(org.springframework.data.util.TypeInformation<T> typeInformation) |
protected JpaPersistentProperty |
createPersistentProperty(org.springframework.data.mapping.model.Property property,
org.springframework.data.jpa.mapping.JpaPersistentEntityImpl<?> owner,
org.springframework.data.mapping.model.SimpleTypeHolder simpleTypeHolder) |
<T> org.springframework.data.mapping.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(org.springframework.data.util.TypeInformation<?> type) |
addPersistentEntity, addPersistentEntity, afterPropertiesSet, doFindPersistentPropertyPaths, getManagedTypes, getPersistentEntities, getPersistentEntity, getPersistentEntity, getPersistentEntity, getPersistentPropertyPath, getPersistentPropertyPath, initialize, setApplicationContext, setApplicationEventPublisher, setInitialEntitySet, setSimpleTypeHolder, setStrict
public 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(org.springframework.data.util.TypeInformation<T> typeInformation)
createPersistentEntity
in class org.springframework.data.mapping.context.AbstractMappingContext<org.springframework.data.jpa.mapping.JpaPersistentEntityImpl<?>,JpaPersistentProperty>
protected JpaPersistentProperty createPersistentProperty(org.springframework.data.mapping.model.Property property, org.springframework.data.jpa.mapping.JpaPersistentEntityImpl<?> owner, org.springframework.data.mapping.model.SimpleTypeHolder simpleTypeHolder)
createPersistentProperty
in class org.springframework.data.mapping.context.AbstractMappingContext<org.springframework.data.jpa.mapping.JpaPersistentEntityImpl<?>,JpaPersistentProperty>
protected boolean shouldCreatePersistentEntityFor(org.springframework.data.util.TypeInformation<?> type)
shouldCreatePersistentEntityFor
in class org.springframework.data.mapping.context.AbstractMappingContext<org.springframework.data.jpa.mapping.JpaPersistentEntityImpl<?>,JpaPersistentProperty>
public <T> org.springframework.data.mapping.PersistentPropertyPaths<T,JpaPersistentProperty> findPersistentPropertyPaths(Class<T> type, Predicate<? super JpaPersistentProperty> predicate)
PersistentPropertyPaths
by also traversing properties that are embeddables.findPersistentPropertyPaths
in interface org.springframework.data.mapping.context.MappingContext<org.springframework.data.jpa.mapping.JpaPersistentEntityImpl<?>,JpaPersistentProperty>
findPersistentPropertyPaths
in class org.springframework.data.mapping.context.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 org.springframework.data.mapping.context.MappingContext<org.springframework.data.jpa.mapping.JpaPersistentEntityImpl<?>,JpaPersistentProperty>
hasPersistentEntityFor
in class org.springframework.data.mapping.context.AbstractMappingContext<org.springframework.data.jpa.mapping.JpaPersistentEntityImpl<?>,JpaPersistentProperty>
Copyright © 2011–2023 Pivotal Software, Inc.. All rights reserved.