Enum Class Neo4JConfigurations
java.lang.Object
java.lang.Enum<Neo4JConfigurations>
org.eclipse.jnosql.databases.neo4j.communication.Neo4JConfigurations
- All Implemented Interfaces:
Serializable,Comparable<Neo4JConfigurations>,Constable,Supplier<String>
Enum Neo4JConfigurations
This enum defines the configuration keys used in the Eclipse jNoSQL driver for Neo4j.
Each configuration key is associated with a specific property required to connect to a Neo4j database.
- URI: The connection URI for the Neo4j database (e.g., bolt://localhost:7687).
- USERNAME: The username used for authentication (e.g., "neo4j").
- PASSWORD: The password used for authentication (e.g., "password123").
This enum implements the Supplier interface, providing a method to retrieve the configuration key as a string. Usage example:
String uri = Neo4JConfigurations.URI.get(); // Returns "jnosql.neo4j.uri" String username = Neo4JConfigurations.USERNAME.get(); // Returns "jnosql.neo4j.username" String password = Neo4JConfigurations.PASSWORD.get(); // Returns "jnosql.neo4j.password" // Example of configuring a connection: Settings settings = Settings.builder().put(Neo4JConfigurations.URI, "bolt://localhost:7687") .put(Neo4JConfigurations.USERNAME, "neo4j") .put(Neo4JConfigurations.PASSWORD, "password123") .build();
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionget()static Neo4JConfigurationsReturns the enum constant of this class with the specified name.static Neo4JConfigurations[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
URI
The URI of the Neo4j database. Example: bolt://localhost:7687 -
USERNAME
The username for authentication. Example: "neo4j" -
PASSWORD
The password for authentication. Example: "password123" -
DATABASE
The database name. Example: "library"
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
get
-