Class Neo4jClient.Builder

java.lang.Object
org.springframework.data.neo4j.core.Neo4jClient.Builder
Enclosing interface:
Neo4jClient

@API(status=STABLE, since="6.2") public static class Neo4jClient.Builder extends Object
A builder for Neo4j clients.
  • Method Details

    • withDatabaseSelectionProvider

      public Neo4jClient.Builder withDatabaseSelectionProvider(@Nullable DatabaseSelectionProvider databaseSelectionProvider)
      Configures the database selection provider. Make sure to use the same instance as for a possible Neo4jTransactionManager. During runtime, it will be checked if a call is made for the same database when happening in a managed transaction.
      Parameters:
      databaseSelectionProvider - The database selection provider
      Returns:
      The builder
    • withUserSelectionProvider

      public Neo4jClient.Builder withUserSelectionProvider(@Nullable UserSelectionProvider userSelectionProvider)
      Configures a provider for impersonated users. Make sure to use the same instance as for a possible Neo4jTransactionManager. During runtime, it will be checked if a call is made for the same user when happening in a managed transaction.
      Parameters:
      userSelectionProvider - The provider for impersonated users
      Returns:
      The builder
    • withNeo4jConversions

      public Neo4jClient.Builder withNeo4jConversions(Neo4jConversions neo4jConversions)
      Configures the set of Neo4jConversions to use.
      Parameters:
      neo4jConversions - the set of conversions to use, can be null, in this case the default set is used.
      Returns:
      The builder
      Since:
      6.3.3
    • withNeo4jBookmarkManager

      public Neo4jClient.Builder withNeo4jBookmarkManager(Neo4jBookmarkManager bookmarkManager)
      Configures the Neo4jBookmarkManager to use. This should be the same instance as provided for the Neo4jTransactionManager respectively the ReactiveNeo4jTransactionManager.
      Parameters:
      bookmarkManager - Neo4jBookmarkManager instance that is shared with the transaction manager.
      Returns:
      The builder
      Since:
      7.1.2
    • build

      public Neo4jClient build()