java.lang.Object
org.neo4j.ogm.driver.AbstractConfigurableDriver
- All Implemented Interfaces:
AutoCloseable,Driver
The AbstractConfigurableDriver is used by all drivers to register themselves.
The register method takes a generic
Configuration object, which is used to register the
driver appropriately. This object contains of one or more key-value
pairs. Every driver configuration must contain a mandatory key "URI", whose corresponding value is
a text representation of the driver uri, for example:
setConfig("URI", "http://username:password@hostname:port")
if credentials are not present the URI, they can be specified in one of
two ways, either as a plain text username/password key-values pair in the configuration e.g.
setConfig("username", "bilbo")
setConfig("password", "hobbit")
or, alternatively using the "credentials" key
setConfig("credentials", new UsernamePasswordCredentials("bilbo", "hobbit")- Author:
- Vince Bickers, Mark Angrish, Michael J. Simons
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ConfigurationUsed for configuring the cypher modification providers.protected ParameterConversionprotected TypeSystem -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractConfigurableDriver(Supplier<Map<String, Object>> customPropertiesSupplier) This is only provided for the embedded driver that can take a preconfigured, embedded database without any way to add configuration properties. -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigure(Configuration newConfiguration) Stores the configuration locally and loads the native type system for this driver if applicable.final TypeSystemThis returns the type system of the specific drivers.protected abstract StringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.neo4j.ogm.driver.Driver
close, getExceptionTranslator, getTransactionFactorySupplier, request, requiresTransaction, unwrap
-
Field Details
-
configuration
-
typeSystem
-
parameterConversion
-
customPropertiesSupplier
Used for configuring the cypher modification providers. Defaults togetConfiguration()and reads the custom properties from the commonConfiguration.
-
-
Constructor Details
-
AbstractConfigurableDriver
public AbstractConfigurableDriver() -
AbstractConfigurableDriver
This is only provided for the embedded driver that can take a preconfigured, embedded database without any way to add configuration properties.- Parameters:
customPropertiesSupplier-
-
-
Method Details
-
configure
Stores the configuration locally and loads the native type system for this driver if applicable. Be sure to call this method in case you opt to overwrite it in an implementation. -
getConfiguration
- Specified by:
getConfigurationin interfaceDriver
-
getCypherModification
- Specified by:
getCypherModificationin interfaceDriver
-
getTypeSystem
Description copied from interface:DriverThis returns the type system of the specific drivers. A type system for a driver is set of types that are special to Neo4j and can be represented in either Java built-ins or dedicated types. The driver interface defaults to a type system that does not support any native types.- Specified by:
getTypeSystemin interfaceDriver- Returns:
- This driver's type system.
-
getTypeSystemName
- Returns:
- The fully qualified name of the native typesystem to use.
- Throws:
UnsupportedOperationException- in case the concrete driver doesn't support a native typesystem.
-