| Constructor and Description |
|---|
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 |
|---|---|
MetaData |
metaData()
Retrieves the meta-data that was built up when this
SessionFactory was constructed. |
Session |
openSession(String url)
Opens a new Neo4j mapping
Session against the specified Neo4j database. |
Session |
openSession(String url,
String username,
String password)
Opens a new Neo4j mapping
Session against the specified Neo4j database. |
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.
packages - The packages to scan for domain objectspublic Session openSession(String url)
Session against the specified Neo4j database.
The url may optionally contain the username and password to use while authenticating
for example, http://username:password@neo-server:port
Otherwise, if authentication is required, the username and password will be read from System properties.url - The base URL of the Neo4j database with which to communicate.Sessionpublic Session openSession(String url, String username, String password)
Session against the specified Neo4j database.url - The base URL of the Neo4j database with which to communicateusername - The username to authenticate withpassword - The password to authenticate withSessionpublic MetaData metaData()
SessionFactory was constructed.MetaDataCopyright © 2015 Neo Technology, Inc.. All rights reserved.