Class Configuration

java.lang.Object
org.neo4j.ogm.config.Configuration

public class Configuration extends Object
A generic configuration class that can be set up programmatically or via a properties file.
Author:
Vince Bickers, Mark Angrish, Michael J. Simons
  • Method Details

    • setClassLoaderPrecedence

      public static void setClassLoaderPrecedence(Configuration.ClassLoaderPrecedence classLoaderPrecedence)
      Set the class loader precedence for interacting with classes during the mapping process. This is necessary when running Neo4j-OGM in async environments (like CompletableFuture usage, Spring Boot's @Async , etc.). In those cases, please use setClassLoaderPrecedence(ClassLoaderPrecedence) with Configuration.ClassLoaderPrecedence.OGM_CLASS_LOADER.
    • getClassLoaderPrecedence

      public static Configuration.ClassLoaderPrecedence getClassLoaderPrecedence()
      Retrieve the current set class loader precedence that is used for working with classes during the mapping process.
      Returns:
      current configured Configuration.ClassLoaderPrecedence
    • getDefaultClassLoader

      public static ClassLoader getDefaultClassLoader()
      Returns:
      The classloader to be used by OGM.
    • getAutoIndex

      public AutoIndexMode getAutoIndex()
    • getDumpDir

      public String getDumpDir()
    • getDumpFilename

      public String getDumpFilename()
    • getURI

      public String getURI()
    • getDriverClassName

      public String getDriverClassName()
    • getConnectionPoolSize

      public int getConnectionPoolSize()
    • getEncryptionLevel

      public String getEncryptionLevel()
    • getTrustStrategy

      public String getTrustStrategy()
    • getTrustCertFile

      public String getTrustCertFile()
    • getConnectionLivenessCheckTimeout

      public Integer getConnectionLivenessCheckTimeout()
    • getVerifyConnection

      public Boolean getVerifyConnection()
    • getNeo4jConfLocation

      public String getNeo4jConfLocation()
    • getDatabase

      public String getDatabase()
    • getDatabaseSelectionProvider

      public DatabaseSelectionProvider getDatabaseSelectionProvider()
    • getUserSelectionProvider

      public UserSelectionProvider getUserSelectionProvider()
    • isEmbeddedHA

      public boolean isEmbeddedHA()
      Returns:
      True if current configuration is setup to use embedded HA.
    • getResourceUrl

      public URL getResourceUrl(String resourceLocation) throws FileNotFoundException
      Throws:
      FileNotFoundException
    • getCredentials

      public Credentials getCredentials()
    • getCustomProperties

      public Map<String,Object> getCustomProperties()
    • getUseNativeTypes

      public Boolean getUseNativeTypes()
    • getUseStrictQuerying

      public Boolean getUseStrictQuerying()
    • getBasePackages

      public String[] getBasePackages()
    • mergeBasePackagesWith

      public String[] mergeBasePackagesWith(String... anotherSetOfBasePackages)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object