| Constructor and Description |
|---|
SessionFactory(Class... classes)
Constructs a new
SessionFactory by initialising the object-graph mapping meta-data from the given list of domain
object classes. |
SessionFactory(Configuration configuration,
Class... classes)
Constructs a new
SessionFactory by initialising the object-graph mapping meta-data from the given list of domain
object classes, and also sets the configuration to be used. |
SessionFactory(Configuration configuration,
String... packages)
Constructs a new
SessionFactory by initialising the object-graph mapping meta-data from the given list of domain
object packages, and also sets the configuration to be used. |
SessionFactory(String... packages)
Constructs a new
SessionFactory by initialising the object-graph mapping meta-data from the given list of domain
object packages. |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
deregister(EventListener eventListener)
Asynchronously removes the the specified listener from
this SessionFactory. |
MetaData |
metaData()
Retrieves the meta-data that was built up when this
SessionFactory was constructed. |
Session |
openSession()
Opens a new Neo4j mapping
Session using the Driver specified in the OGM configuration
The driver should be configured to connect to the database using the appropriate
DriverConfig |
void |
register(EventListener eventListener)
Asynchronously registers the specified listener on all
Session events generated from this SessionFactory. |
public SessionFactory(String... packages)
SessionFactory by initialising the object-graph mapping meta-data from the given list of domain
object packages.
The package names passed to this constructor should not contain wildcards or trailing full stops, for example, "org.springframework.data.neo4j.example.domain" would be fine. The default behaviour is for sub-packages to be scanned and you can also specify fully-qualified class names if you want to cherry pick particular classes.
Indexes will also be checked or built if configured.packages - The packages to scan for domain objectspublic SessionFactory(Class... classes)
SessionFactory by initialising the object-graph mapping meta-data from the given list of domain
object classes.
This will only load the classes explicitly listed. No other classes will be loaded.
Indexes will also be checked or built if configured.classes - The classes to load as domain objectspublic SessionFactory(Configuration configuration, String... packages)
SessionFactory by initialising the object-graph mapping meta-data from the given list of domain
object packages, and also sets the configuration to be used.
The package names passed to this constructor should not contain wildcards or trailing full stops, for example, "org.springframework.data.neo4j.example.domain" would be fine. The default behaviour is for sub-packages to be scanned and you can also specify fully-qualified class names if you want to cherry pick particular classes.
Indexes will also be checked or built if configured.configuration - The configuration to usepackages - The packages to scan for domain objectspublic SessionFactory(Configuration configuration, Class... classes)
SessionFactory by initialising the object-graph mapping meta-data from the given list of domain
object classes, and also sets the configuration to be used.
This will only load the classes explicitly listed. No other classes will be loaded.
Indexes will also be checked or built if configured.configuration - The configuration to useclasses - The classes to load as domain objectspublic MetaData metaData()
SessionFactory was constructed.MetaDatapublic Session openSession()
Session using the Driver specified in the OGM configuration
The driver should be configured to connect to the database using the appropriate
DriverConfigSessionpublic void register(EventListener eventListener)
Session events generated from this SessionFactory.eventListener - The event listener to register.public void deregister(EventListener eventListener)
this SessionFactory.eventListener - The event listener to deregister.public void close()
Copyright © 2016 Neo Technology, Inc.. All rights reserved.