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>

public enum Neo4JConfigurations extends Enum<Neo4JConfigurations> implements 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();
 
  • Enum Constant Details

    • URI

      public static final Neo4JConfigurations URI
      The URI of the Neo4j database. Example: bolt://localhost:7687
    • USERNAME

      public static final Neo4JConfigurations USERNAME
      The username for authentication. Example: "neo4j"
    • PASSWORD

      public static final Neo4JConfigurations PASSWORD
      The password for authentication. Example: "password123"
    • DATABASE

      public static final Neo4JConfigurations DATABASE
      The database name. Example: "library"
  • Method Details

    • values

      public static Neo4JConfigurations[] 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

      public static Neo4JConfigurations valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • get

      public String get()
      Specified by:
      get in interface Supplier<String>