Class Neo4JConfiguration
java.lang.Object
org.eclipse.jnosql.databases.neo4j.communication.Neo4JConfiguration
- All Implemented Interfaces:
Function<org.eclipse.jnosql.communication.Settings,,org.eclipse.jnosql.communication.semistructured.DatabaseManagerFactory> org.eclipse.jnosql.communication.semistructured.DatabaseConfiguration
public final class Neo4JConfiguration
extends Object
implements org.eclipse.jnosql.communication.semistructured.DatabaseConfiguration
Class Neo4JConfiguration
This class provides the configuration for the Neo4j database using the Eclipse jNoSQL framework.
It implements the
DatabaseConfiguration interface to set up a connection to a Neo4j database.
The configuration retrieves the following settings from the provided Settings:
Neo4JConfigurations.URI: The connection URI for the Neo4j database (e.g., "bolt://localhost:7687").Neo4JConfigurations.USERNAME: The username for authentication (optional).Neo4JConfigurations.PASSWORD: The password for authentication (optional).
If no URI is provided, a default URI ("bolt://localhost:7687") is used.
Usage example:
Settings settings = Settings.builder()
.put(Neo4JConfigurations.URI, "bolt://custom-host:7687")
.put(Neo4JConfigurations.USERNAME, "neo4j")
.put(Neo4JConfigurations.PASSWORD, "password123")
.build();
Neo4JConfiguration configuration = new Neo4JConfiguration();
Neo4JDatabaseManagerFactory factory = configuration.apply(settings);
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(org.eclipse.jnosql.communication.Settings settings) Applies the provided settings to the Neo4j database configuration.
-
Constructor Details
-
Neo4JConfiguration
public Neo4JConfiguration()
-
-
Method Details
-
apply
Applies the provided settings to the Neo4j database configuration.- Specified by:
applyin interfaceFunction<org.eclipse.jnosql.communication.Settings,org.eclipse.jnosql.communication.semistructured.DatabaseManagerFactory> - Parameters:
settings- the settings to apply- Returns:
- a new
Neo4JDatabaseManagerFactoryinstance
-