@API(status=STABLE,
since="6.0")
public final class Neo4jMappingContext
extends AbstractMappingContext<Neo4jPersistentEntity<?>,Neo4jPersistentProperty>
implements Schema
Schema as well as a Neo4j version of Spring Data's
MappingContext. It is recommended to provide the initial set of
classes through AbstractMappingContext.setInitialEntitySet(Set).| Constructor and Description |
|---|
Neo4jMappingContext() |
Neo4jMappingContext(Neo4jConversions neo4jConversions) |
Neo4jMappingContext(Neo4jConversions neo4jConversions,
org.neo4j.driver.types.TypeSystem typeSystem)
This API is primarily used from inside the CDI extension to configure the type system.
|
addPersistentEntity, afterPropertiesSet, doFindPersistentPropertyPaths, findPersistentPropertyPaths, getManagedTypes, getPersistentEntities, getPersistentEntity, getPersistentEntity, getPersistentPropertyPath, getPersistentPropertyPath, hasPersistentEntityFor, initialize, setApplicationEventPublisher, setInitialEntitySet, setSimpleTypeHolder, shouldCreatePersistentEntityForclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetRequiredBinderFunctionFor, getRequiredMappingFunctionFor, getRequiredNodeDescription, getRequiredNodeDescriptiongetRequiredPersistentEntity, getRequiredPersistentEntity, getRequiredPersistentEntitypublic Neo4jMappingContext()
public Neo4jMappingContext(Neo4jConversions neo4jConversions)
@API(status=INTERNAL,
since="6.0")
public Neo4jMappingContext(Neo4jConversions neo4jConversions,
@Nullable
org.neo4j.driver.types.TypeSystem typeSystem)
setApplicationContext(ApplicationContext applicationContext).neo4jConversions - The conversions to be usedtypeSystem - The current drivers typeystem. If this is null, we use the default one without accessing the driver.public void setStrict(boolean strict)
setStrict in class AbstractMappingContext<Neo4jPersistentEntity<?>,Neo4jPersistentProperty>strict - The new value for the strict setting.public Neo4jEntityConverter getEntityConverter()
getEntityConverter in interface Schemapublic Neo4jConversionService getConversionService()
public EntityInstantiator getInstantiatorFor(PersistentEntity<?,?> entity)
protected <T> Neo4jPersistentEntity<?> createPersistentEntity(TypeInformation<T> typeInformation)
createPersistentEntity in class AbstractMappingContext<Neo4jPersistentEntity<?>,Neo4jPersistentProperty>protected Neo4jPersistentProperty createPersistentProperty(Property property, Neo4jPersistentEntity<?> owner, SimpleTypeHolder simpleTypeHolder)
createPersistentProperty in class AbstractMappingContext<Neo4jPersistentEntity<?>,Neo4jPersistentProperty>@Nullable public NodeDescription<?> getNodeDescription(String primaryLabel)
SchemagetNodeDescription in interface SchemaprimaryLabel - The primary label under which the node is describedpublic NodeDescription<?> getNodeDescription(Class<?> underlyingClass)
SchemagetNodeDescription in interface SchemaunderlyingClass - The underlying class of the node description to be retrieved@Nullable public Neo4jPersistentEntity<?> getPersistentEntity(TypeInformation<?> typeInformation)
getPersistentEntity in interface MappingContext<Neo4jPersistentEntity<?>,Neo4jPersistentProperty>getPersistentEntity in class AbstractMappingContext<Neo4jPersistentEntity<?>,Neo4jPersistentProperty>public Optional<Neo4jPersistentEntity<?>> addPersistentEntity(TypeInformation<?> typeInformation)
addPersistentEntity in class AbstractMappingContext<Neo4jPersistentEntity<?>,Neo4jPersistentProperty>public <T extends IdGenerator<?>> T getOrCreateIdGeneratorOfType(Class<T> idGeneratorType)
SchemagetOrCreateIdGeneratorOfType in interface SchemaidGeneratorType - The type of the ID generator to returnpublic <T extends IdGenerator<?>> Optional<T> getIdGenerator(String reference)
getIdGenerator in interface Schemapublic void setApplicationContext(ApplicationContext applicationContext) throws BeansException
setApplicationContext in interface ApplicationContextAwaresetApplicationContext in class AbstractMappingContext<Neo4jPersistentEntity<?>,Neo4jPersistentProperty>BeansExceptionpublic CreateRelationshipStatementHolder createStatement(Neo4jPersistentEntity<?> neo4jPersistentEntity, NestedRelationshipContext relationshipContext, Object relatedValue)
Copyright © 2019–2021 Neo4j, Neo4j Sweden AB. All rights reserved.