public class Neo4jDatastore extends AbstractDatastore implements java.io.Closeable, GraphDatastore, MultiTenantCapableDatastore, MultipleConnectionSourceCapableDatastore, Settings, StatelessDatastore, org.springframework.context.MessageSourceAware, TransactionCapableDatastore
Datastore implementation for Neo4j backend
Modifiers | Name | Description |
---|---|---|
protected AutoTimestampEventListener |
autoTimestampEventListener |
|
protected org.neo4j.driver.Driver |
boltDriver |
|
protected ConnectionSources<org.neo4j.driver.Driver, Neo4jConnectionSourceSettings> |
connectionSources |
|
protected java.util.Map<java.lang.String, Neo4jDatastore> |
datastoresByConnectionSource |
|
protected javax.persistence.FlushModeType |
defaultFlushMode |
|
protected ConfigurableApplicationEventPublisher |
eventPublisher |
|
protected GormEnhancer |
gormEnhancer |
|
private static org.slf4j.Logger |
log |
|
protected MultiTenancyMode |
multiTenancyMode |
|
protected boolean |
skipIndexSetup |
|
protected TenantResolver |
tenantResolver |
|
protected Neo4jDatastoreTransactionManager |
transactionManager |
Fields inherited from class | Fields |
---|---|
class AbstractDatastore |
LOG, applicationContext, cacheAdapterRepository, connectionDetails, mappingContext, serviceRegistry |
Constructor and description |
---|
Neo4jDatastore
(ConnectionSources<org.neo4j.driver.Driver, Neo4jConnectionSourceSettings> connectionSources, Neo4jMappingContext mappingContext, ConfigurableApplicationEventPublisher eventPublisher) Configures a new Neo4jDatastore for the given arguments |
Neo4jDatastore
(ConnectionSources<org.neo4j.driver.Driver, Neo4jConnectionSourceSettings> connectionSources, ConfigurableApplicationEventPublisher eventPublisher, java.lang.Class classes) Configures a new Neo4jDatastore for the given arguments |
Neo4jDatastore
(ConnectionSources<org.neo4j.driver.Driver, Neo4jConnectionSourceSettings> connectionSources, java.lang.Class classes) Configures a new Neo4jDatastore for the given arguments |
Neo4jDatastore
(org.neo4j.driver.Driver boltDriver, org.springframework.core.env.PropertyResolver configuration, ConfigurableApplicationEventPublisher eventPublisher, java.lang.Class classes) Configures a new Neo4jDatastore for the given arguments |
Neo4jDatastore
(org.neo4j.driver.Driver boltDriver, ConfigurableApplicationEventPublisher eventPublisher, java.lang.Class classes) Configures a new Neo4jDatastore for the given arguments |
Neo4jDatastore
(org.neo4j.driver.Driver boltDriver, org.springframework.core.env.PropertyResolver configuration, java.lang.Class classes) Configures a new Neo4jDatastore for the given arguments |
Neo4jDatastore
(org.neo4j.driver.Driver boltDriver, java.lang.Class classes) Configures a new Neo4jDatastore for the given arguments |
Neo4jDatastore
(org.springframework.core.env.PropertyResolver configuration, Neo4jConnectionSourceFactory connectionSourceFactory, ConfigurableApplicationEventPublisher eventPublisher, java.lang.Class classes) Configures a new Neo4jDatastore for the given arguments |
Neo4jDatastore
(org.springframework.core.env.PropertyResolver configuration, Neo4jConnectionSourceFactory connectionSourceFactory, ConfigurableApplicationEventPublisher eventPublisher, java.lang.Package packagesToScan) Configures a new Neo4jDatastore for the given arguments |
Neo4jDatastore
(org.springframework.core.env.PropertyResolver configuration, ConfigurableApplicationEventPublisher eventPublisher, java.lang.Class classes) Configures a new Neo4jDatastore for the given arguments |
Neo4jDatastore
(org.springframework.core.env.PropertyResolver configuration, ConfigurableApplicationEventPublisher eventPublisher, java.lang.Package packagesToScan) Configures a new Neo4jDatastore for the given arguments |
Neo4jDatastore
(org.springframework.core.env.PropertyResolver configuration, java.lang.Class classes) Configures a new Neo4jDatastore for the given arguments |
Neo4jDatastore
(java.lang.Class classes) Configures a new Neo4jDatastore for the given arguments. |
Neo4jDatastore
(java.util.Map<java.lang.String, java.lang.Object> configuration, ConfigurableApplicationEventPublisher eventPublisher, java.lang.Class classes) Configures a new Neo4jDatastore for the given arguments |
Neo4jDatastore
(java.util.Map<java.lang.String, java.lang.Object> configuration, java.lang.Class classes) Configures a new Neo4jDatastore for the given arguments |
Neo4jDatastore
(java.lang.Package packagesToScan) Construct a Mongo datastore scanning the given packages |
Neo4jDatastore
(java.lang.Package packageToScan) Construct a Mongo datastore scanning the given packages |
Neo4jDatastore
(org.springframework.core.env.PropertyResolver configuration, java.lang.Package packagesToScan) Construct a Mongo datastore scanning the given packages |
Neo4jDatastore
(java.util.Map<java.lang.String, java.lang.Object> configuration, java.lang.Package packagesToScan) Construct a Mongo datastore scanning the given packages |
Type Params | Return Type | Name and description |
---|---|---|
|
public void |
close() |
|
private static void |
configureValidatorRegistry(Neo4jMappingContext neo4jMappingContext, org.springframework.context.MessageSource messageSource, ValidatorRegistry defaultValidatorRegistry) |
|
protected static ConnectionSources<org.neo4j.driver.Driver, Neo4jConnectionSourceSettings> |
createDefaultConnectionSources(org.neo4j.driver.Driver driver, org.springframework.core.env.PropertyResolver configuration) Creates the connection sources for an existing org.neo4j.driver.Driver |
|
protected static Neo4jMappingContext |
createMappingContext(ConnectionSources<org.neo4j.driver.Driver, Neo4jConnectionSourceSettings> connectionSources, java.lang.Class classes) |
|
protected Session |
createSession(org.springframework.core.env.PropertyResolver connectionDetails) |
|
private void |
createUniqueConstraintOnProperty(java.lang.String label, PersistentProperty persistentProperty, java.util.List<java.lang.String> schemaStrings) |
|
private static ValidatorRegistry |
createValidatorRegistry(Neo4jConnectionSourceSettings settings, Neo4jMappingContext neo4jMappingContext, org.springframework.context.MessageSource messageSource) |
|
public ConfigurableApplicationEventPublisher |
getApplicationEventPublisher() |
|
public AutoTimestampEventListener |
getAutoTimestampEventListener() |
|
public org.neo4j.driver.Driver |
getBoltDriver()
|
|
public ConnectionSources<org.neo4j.driver.Driver, Neo4jConnectionSourceSettings> |
getConnectionSources() |
|
public Datastore |
getDatastoreForConnection(java.lang.String connectionName) |
<D> |
private Neo4jDatastore |
getDatastoreForQualifier(java.lang.Class<D> cls, java.lang.String qualifier) |
|
public Neo4jDatastore |
getDatastoreForTenantId(java.io.Serializable tenantId) |
<D> |
protected GormInstanceApi<D> |
getInstanceApi(java.lang.Class<D> cls, java.lang.String qualifier) |
|
public Neo4jMappingContext |
getMappingContext() |
|
public MultiTenancyMode |
getMultiTenancyMode() |
<D> |
protected GormStaticApi<D> |
getStaticApi(java.lang.Class<D> cls, java.lang.String qualifier) |
|
public TenantResolver |
getTenantResolver() |
|
public Neo4jDatastoreTransactionManager |
getTransactionManager()
|
<D> |
protected GormValidationApi<D> |
getValidationApi(java.lang.Class<D> cls, java.lang.String qualifier) |
|
protected GormEnhancer |
initialize(Neo4jConnectionSourceSettings settings) |
|
protected GormEnhancer |
initialize(Neo4jConnectionSourceSettings settings) |
|
public void |
persistentEntityAdded(PersistentEntity entity) |
|
protected void |
registerEventListeners(ConfigurableApplicationEventPublisher eventPublisher) |
|
private static org.springframework.core.env.PropertyResolver |
resolveEmbeddedConfiguration() |
|
public void |
setMessageSource(org.springframework.context.MessageSource messageSource) |
|
public void |
setSkipIndexSetup(boolean skipIndexSetup) |
|
public void |
setupIndexing() |
<T1> |
public T1 |
withNewSession(java.io.Serializable tenantId, groovy.lang.Closure<T1> callable) |
Methods inherited from class | Name |
---|---|
class AbstractDatastore |
connect, connect, connectStateless, createSession, createStatelessSession, destroy, doInSession, getApplicationContext, getApplicationEventPublisher, getCurrentSession, getMappingContext, getService, getServices, hasCurrentSession, initializeConverters, isIndexed, isSchemaless, mapToPropertyResolver, publishSessionCreationEvent, retrieveSession, retrieveSession, setApplicationContext, withSession |
Configures a new Neo4jDatastore for the given arguments
mappingContext
- The MappingContext which contains information about the mapped classeseventPublisher
- The Spring ApplicationContextConfigures a new Neo4jDatastore for the given arguments
eventPublisher
- The Spring ApplicationContextclasses
- The persistent classesConfigures a new Neo4jDatastore for the given arguments
classes
- The persistent classesConfigures a new Neo4jDatastore for the given arguments
boltDriver
- The driverconfiguration
- The configuration for the datastoreeventPublisher
- The Spring ApplicationContextclasses
- The persistent classesConfigures a new Neo4jDatastore for the given arguments
boltDriver
- The drivereventPublisher
- The Spring ApplicationContextclasses
- The persistent classesConfigures a new Neo4jDatastore for the given arguments
boltDriver
- The driverconfiguration
- The configuration for the datastoreclasses
- The persistent classesConfigures a new Neo4jDatastore for the given arguments
boltDriver
- The driverclasses
- The persistent classesConfigures a new Neo4jDatastore for the given arguments
configuration
- The configuration for the datastoreconnectionSourceFactory
- The Neo4jConnectionSourceFactory to use to configure Neo4jeventPublisher
- The Spring ApplicationContextclasses
- The persistent classesConfigures a new Neo4jDatastore for the given arguments
configuration
- The configuration for the datastoreeventPublisher
- The Spring ApplicationContextpackagesToScan
- The packages to scanConfigures a new Neo4jDatastore for the given arguments
configuration
- The configuration for the datastoreeventPublisher
- The Spring ApplicationContextclasses
- The persistent classesConfigures a new Neo4jDatastore for the given arguments
configuration
- The configuration for the datastoreeventPublisher
- The Spring ApplicationContextpackagesToScan
- The packages to scanConfigures a new Neo4jDatastore for the given arguments
configuration
- The configuration for the datastoreclasses
- The persistent classesConfigures a new Neo4jDatastore for the given arguments. This constructor is mainly used for testing, since no configuration is supplied it will be default try to create an embedded server
classes
- The persistent classesConfigures a new Neo4jDatastore for the given arguments
configuration
- The configurationclasses
- The persistent classesConfigures a new Neo4jDatastore for the given arguments
configuration
- The configurationclasses
- The persistent classesConstruct a Mongo datastore scanning the given packages
packagesToScan
- The packages to scanConstruct a Mongo datastore scanning the given packages
packageToScan
- The packages to scanConstruct a Mongo datastore scanning the given packages
configuration
- The configurationpackagesToScan
- The packages to scanConstruct a Mongo datastore scanning the given packages
configuration
- The configurationpackagesToScan
- The packages to scanCreates the connection sources for an existing org.neo4j.driver.Driver
driver
- The org.neo4j.driver.Driverconfiguration
- The configuration