Package org.neo4j.ogm.session
Class Neo4jSession
java.lang.Object
org.neo4j.ogm.session.Neo4jSession
- All Implemented Interfaces:
Session
- Author:
- Vince Bickers, Luanne Misquitta, Mihai Raulea, Mark Angrish, Michael J. Simons
-
Constructor Summary
ConstructorDescriptionNeo4jSession
(MetaData metaData, boolean useStrictQuerying, org.neo4j.ogm.driver.Driver driver) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addWriteProtection
(WriteProtectionTarget target, Predicate<Object> protection) org.neo4j.ogm.transaction.Transaction
Begin a new READ_WRITE transaction.org.neo4j.ogm.transaction.Transaction
beginTransaction
(org.neo4j.ogm.transaction.Transaction.Type type) Begin a new transaction, passing in the required type (READ_ONLY, READ_WRITE).org.neo4j.ogm.transaction.Transaction
beginTransaction
(org.neo4j.ogm.transaction.Transaction.Type type, Iterable<String> bookmarks) Begin a new transaction, passing in the required type and bookmarks If an existing transaction already exists, users must decide whether to commit or rollback.void
clear()
Clears the Sessioncontext()
long
Counts all the node entities of the specified type which match the filters suppliedlong
countEntitiesOfType
(Class<?> entity) Counts all the node entities of the specified type.<T> Object
Delete all entities of type matching filter<T> void
delete
(T object) Delete entity (or entities)<T> void
Delete all entities of typeboolean
detachNodeEntity
(Long id) Detach this node entity represented by the supplied Graph ID from the session.boolean
Detach this relationship entity represented by the supplied Graph ID from the session.determineLabelsOrTypeForLoading
(Class<?> type) Determines the one relationship type or maybe multiple labels to use in various statements during loading of things.boolean
dispose
(EventListener eventListener) Remove an event listener from this session.<T> T
doInTransaction
(TransactionalUnitOfWork<T> function, boolean forceTx, org.neo4j.ogm.transaction.Transaction.Type txType) For internal use only.<T> T
doInTransaction
(TransactionalUnitOfWork<T> function, org.neo4j.ogm.transaction.Transaction.Type txType) void
doInTransaction
(TransactionalUnitOfWorkWithoutResult function, boolean forceTx, org.neo4j.ogm.transaction.Transaction.Type txType) void
doInTransaction
(TransactionalUnitOfWorkWithoutResult function, org.neo4j.ogm.transaction.Transaction.Type txType) boolean
Determines if events are enabled for this session.Retrieves the last bookmark used in this session when used in a Neo4j Causal Cluster.Returns current load strategyorg.neo4j.ogm.transaction.Transaction
Get the existing transaction if availableorg.neo4j.ogm.transaction.TransactionManager
This is a convenience method that one can use to access a custom transaction manager that may or may not have special requirements or additional functionality.<T,
ID extends Serializable>
TLoad single entity instance of type, with default depth = 1<T,
ID extends Serializable>
TLoad single entity instance of type, with depth<T> Collection<T>
Load all entities of type, with default depth = 1.<T> Collection<T>
Load all entities of type, with depth<T,
ID extends Serializable>
Collection<T>loadAll
(Class<T> type, Collection<ID> ids) Load entities of type by their ids, with default depth = 1.<T,
ID extends Serializable>
Collection<T>loadAll
(Class<T> type, Collection<ID> ids, int depth) Load entities of type by their ids.<T,
ID extends Serializable>
Collection<T>loadAll
(Class<T> type, Collection<ID> ids, Pagination paging) Load entities of type by their ids, with default depth = 1.<T,
ID extends Serializable>
Collection<T>loadAll
(Class<T> type, Collection<ID> ids, Pagination paging, int depth) Load entities of type by their ids.<T,
ID extends Serializable>
Collection<T>loadAll
(Class<T> type, Collection<ID> ids, SortOrder sortOrder) Load entities of type by their ids, with default depth = 1.<T,
ID extends Serializable>
Collection<T>loadAll
(Class<T> type, Collection<ID> ids, SortOrder sortOrder, int depth) Load entities of type by their ids.<T,
ID extends Serializable>
Collection<T>loadAll
(Class<T> type, Collection<ID> ids, SortOrder sortOrder, Pagination pagination) Load entities of type by their ids, with default depth = 1.<T,
ID extends Serializable>
Collection<T>loadAll
(Class<T> type, Collection<ID> ids, SortOrder sortOrder, Pagination pagination, int depth) Load entities of type by their ids.<T> Collection<T>
Load all entities of type, filtered by filter, with default depth = 1.<T> Collection<T>
Load all entities of type, filtered by filter.<T> Collection<T>
loadAll
(Class<T> type, Filter filter, Pagination pagination) Load all entities of type, filtered by filter, with default depth = 1.<T> Collection<T>
loadAll
(Class<T> type, Filter filter, Pagination pagination, int depth) Load all entities of type, filtered by filter.<T> Collection<T>
Load all entities of type, filtered by filter, with default depth = 1.<T> Collection<T>
Load all entities of type, filtered by filter.<T> Collection<T>
loadAll
(Class<T> type, Filter filter, SortOrder sortOrder, Pagination pagination) Load all entities of type, filtered by filter, with default depth = 1.<T> Collection<T>
loadAll
(Class<T> type, Filter filter, SortOrder sortOrder, Pagination pagination, int depth) Load all entities of type, filtered by filter.<T> Collection<T>
Load all entities of type, filtered by filters, with default depth = 1.<T> Collection<T>
Load all entities of type, filtered by filters.<T> Collection<T>
loadAll
(Class<T> type, Filters filters, Pagination pagination) Load all entities of type, filtered by filters, with default depth = 1.<T> Collection<T>
loadAll
(Class<T> type, Filters filters, Pagination pagination, int depth) Load all entities of type, filtered by filters.<T> Collection<T>
Load all entities of type, filtered by filters, with default depth = 1.<T> Collection<T>
Load all entities of type, filtered by filters.<T> Collection<T>
loadAll
(Class<T> type, Filters filters, SortOrder sortOrder, Pagination pagination) Load all entities of type, filtered by filters, with default depth = 1.<T> Collection<T>
loadAll
(Class<T> type, Filters filters, SortOrder sortOrder, Pagination pagination, int depth) Load all entities of type, filtered by filters.<T> Collection<T>
loadAll
(Class<T> type, Pagination paging) Load all entities of type, with default depth = 1.<T> Collection<T>
loadAll
(Class<T> type, Pagination paging, int depth) Load all entities of type.<T> Collection<T>
Load all entities of type, with default depth = 1<T> Collection<T>
Load all entities of type.<T> Collection<T>
loadAll
(Class<T> type, SortOrder sortOrder, Pagination pagination) Load all entities of type, with default depth = 1.<T> Collection<T>
loadAll
(Class<T> type, SortOrder sortOrder, Pagination pagination, int depth) Load all entities of type.<T> Collection<T>
loadAll
(Collection<T> objects) Load entities by themselves - uses id of the entity to load it again, with default depth = 1.<T> Collection<T>
loadAll
(Collection<T> objects, int depth) Load entities by themselves - uses id of the entity to load it again.<T> Collection<T>
loadAll
(Collection<T> objects, Pagination pagination) Load entities by themselves - uses id of the entity to load it again, with default depth = 1.<T> Collection<T>
loadAll
(Collection<T> objects, Pagination pagination, int depth) Load entities by themselves - uses id of the entity to load it again.<T> Collection<T>
loadAll
(Collection<T> objects, SortOrder sortOrder) Load entities by themselves - uses id of the entity to load it again, with default depth = 1.<T> Collection<T>
loadAll
(Collection<T> objects, SortOrder sortOrder, int depth) Load entities by themselves - uses id of the entity to load it again.<T> Collection<T>
loadAll
(Collection<T> objects, SortOrder sortOrder, Pagination pagination) Load entities by themselves - uses id of the entity to load it again, with default depth = 1.<T> Collection<T>
loadAll
(Collection<T> objects, SortOrder sortOrder, Pagination pagination, int depth) Load entities by themselves - uses id of the entity to load it again.metaData()
void
notifyListeners
(Event event) Notifies listeners of this session of the suppliedEvent
.void
Delete all nodes in the database.<T> Iterable<T>
a cypher statement this method will return a collection of domain objects that is hydrated to the default level or a collection of scalars (depending on the parametrized type).org.neo4j.ogm.model.Result
a cypher statement this method will return a Result object containing a collection of Map's which represent Neo4j objects as properties, along with query statistics if applicable.org.neo4j.ogm.model.Result
a cypher statement this method will return a Result object containing a collection of Map's which represent Neo4j objects as properties, along with query statistics if applicable.<T> List<T>
Map non-entities to aList
of DTO objects.<T> T
queryForObject
(Class<T> type, String cypher, Map<String, ?> parameters) a cypher statement this method will return a domain object that is hydrated to the default level or a scalar (depending on the parametrized type).<T,
ID extends Serializable>
QueryStatements<ID>queryStatementsFor
(Class<T> type, int depth) register
(EventListener eventListener) Register an event listener with this session.void
Removes write protection for the specified mode.org.neo4j.ogm.request.Request
resolveGraphIdFor
(Object possibleEntity) Resolve the graph id for a possible entity.<T> void
save
(T object) Save entity(or entities) into the database, up to specified depth The entities are either created or updated.<T> void
save
(T object, int depth) Save entity(or entities) into the database, up to specified depth The objects are either created or updated.void
setLoadStrategy
(LoadStrategy loadStrategy) Sets the LoadStrategy Will be used for all subsequent queries.void
setWriteProtectionStrategy
(WriteProtectionStrategy writeProtectionStrategy) Can be used to apply a completely custom write protection strategy.void
void
withBookmark
(String bookmark) Sets the bookmark to use on this session.
-
Constructor Details
-
Neo4jSession
public Neo4jSession(MetaData metaData, boolean useStrictQuerying, org.neo4j.ogm.driver.Driver driver)
-
-
Method Details
-
register
Description copied from interface:Session
Register an event listener with this session. -
notifyListeners
Description copied from interface:Session
Notifies listeners of this session of the suppliedEvent
.- Specified by:
notifyListeners
in interfaceSession
- Parameters:
event
- The event to inform listeners with.
-
eventsEnabled
public boolean eventsEnabled()Description copied from interface:Session
Determines if events are enabled for this session.- Specified by:
eventsEnabled
in interfaceSession
- Returns:
true
if this session allows events.
-
dispose
Description copied from interface:Session
Remove an event listener from this session. -
load
Description copied from interface:Session
Load single entity instance of type, with default depth = 1 -
load
Description copied from interface:Session
Load single entity instance of type, with depth -
loadAll
Description copied from interface:Session
Load all entities of type, with default depth = 1. -
loadAll
Description copied from interface:Session
Load all entities of type, with depth -
loadAll
Description copied from interface:Session
Load all entities of type, with default depth = 1. -
loadAll
Description copied from interface:Session
Load all entities of type. -
loadAll
Description copied from interface:Session
Load all entities of type, with default depth = 1 -
loadAll
Description copied from interface:Session
Load all entities of type. -
loadAll
Description copied from interface:Session
Load all entities of type, with default depth = 1. -
loadAll
public <T> Collection<T> loadAll(Class<T> type, SortOrder sortOrder, Pagination pagination, int depth) Description copied from interface:Session
Load all entities of type. -
loadAll
Description copied from interface:Session
Load all entities of type, filtered by filter, with default depth = 1. -
loadAll
Description copied from interface:Session
Load all entities of type, filtered by filter. -
loadAll
Description copied from interface:Session
Load all entities of type, filtered by filter, with default depth = 1. -
loadAll
Description copied from interface:Session
Load all entities of type, filtered by filter. -
loadAll
Description copied from interface:Session
Load all entities of type, filtered by filter, with default depth = 1. -
loadAll
Description copied from interface:Session
Load all entities of type, filtered by filter. -
loadAll
public <T> Collection<T> loadAll(Class<T> type, Filter filter, SortOrder sortOrder, Pagination pagination) Description copied from interface:Session
Load all entities of type, filtered by filter, with default depth = 1. -
loadAll
public <T> Collection<T> loadAll(Class<T> type, Filter filter, SortOrder sortOrder, Pagination pagination, int depth) Description copied from interface:Session
Load all entities of type, filtered by filter. -
loadAll
Description copied from interface:Session
Load all entities of type, filtered by filters, with default depth = 1. -
loadAll
Description copied from interface:Session
Load all entities of type, filtered by filters. -
loadAll
Description copied from interface:Session
Load all entities of type, filtered by filters, with default depth = 1. -
loadAll
Description copied from interface:Session
Load all entities of type, filtered by filters. -
loadAll
Description copied from interface:Session
Load all entities of type, filtered by filters, with default depth = 1. -
loadAll
Description copied from interface:Session
Load all entities of type, filtered by filters. -
loadAll
public <T> Collection<T> loadAll(Class<T> type, Filters filters, SortOrder sortOrder, Pagination pagination) Description copied from interface:Session
Load all entities of type, filtered by filters, with default depth = 1. -
loadAll
public <T> Collection<T> loadAll(Class<T> type, Filters filters, SortOrder sortOrder, Pagination pagination, int depth) Description copied from interface:Session
Load all entities of type, filtered by filters. -
loadAll
Description copied from interface:Session
Load entities of type by their ids, with default depth = 1. -
loadAll
public <T,ID extends Serializable> Collection<T> loadAll(Class<T> type, Collection<ID> ids, int depth) Description copied from interface:Session
Load entities of type by their ids. -
loadAll
public <T,ID extends Serializable> Collection<T> loadAll(Class<T> type, Collection<ID> ids, SortOrder sortOrder) Description copied from interface:Session
Load entities of type by their ids, with default depth = 1. -
loadAll
public <T,ID extends Serializable> Collection<T> loadAll(Class<T> type, Collection<ID> ids, SortOrder sortOrder, int depth) Description copied from interface:Session
Load entities of type by their ids. -
loadAll
public <T,ID extends Serializable> Collection<T> loadAll(Class<T> type, Collection<ID> ids, Pagination paging) Description copied from interface:Session
Load entities of type by their ids, with default depth = 1. -
loadAll
public <T,ID extends Serializable> Collection<T> loadAll(Class<T> type, Collection<ID> ids, Pagination paging, int depth) Description copied from interface:Session
Load entities of type by their ids. -
loadAll
public <T,ID extends Serializable> Collection<T> loadAll(Class<T> type, Collection<ID> ids, SortOrder sortOrder, Pagination pagination) Description copied from interface:Session
Load entities of type by their ids, with default depth = 1. -
loadAll
public <T,ID extends Serializable> Collection<T> loadAll(Class<T> type, Collection<ID> ids, SortOrder sortOrder, Pagination pagination, int depth) Description copied from interface:Session
Load entities of type by their ids. -
loadAll
Description copied from interface:Session
Load entities by themselves - uses id of the entity to load it again, with default depth = 1. Note that standard session behaviour regarding entity loading an reloading applies. -
loadAll
Description copied from interface:Session
Load entities by themselves - uses id of the entity to load it again. Note that standard session behaviour regarding entity loading an reloading applies. -
loadAll
Description copied from interface:Session
Load entities by themselves - uses id of the entity to load it again, with default depth = 1. Note that standard session behaviour regarding entity loading an reloading applies. -
loadAll
Description copied from interface:Session
Load entities by themselves - uses id of the entity to load it again. Note that standard session behaviour regarding entity loading an reloading applies. -
loadAll
Description copied from interface:Session
Load entities by themselves - uses id of the entity to load it again, with default depth = 1. Note that standard session behaviour regarding entity loading an reloading applies. -
loadAll
Description copied from interface:Session
Load entities by themselves - uses id of the entity to load it again. Note that standard session behaviour regarding entity loading an reloading applies. -
loadAll
Description copied from interface:Session
Load entities by themselves - uses id of the entity to load it again, with default depth = 1. Note that standard session behaviour regarding entity loading an reloading applies. -
loadAll
public <T> Collection<T> loadAll(Collection<T> objects, SortOrder sortOrder, Pagination pagination, int depth) Description copied from interface:Session
Load entities by themselves - uses id of the entity to load it again. Note that standard session behaviour regarding entity loading an reloading applies. -
queryForObject
Description copied from interface:Session
a cypher statement this method will return a domain object that is hydrated to the default level or a scalar (depending on the parametrized type).- Specified by:
queryForObject
in interfaceSession
- Type Parameters:
T
- A domain object or scalar.- Parameters:
type
- The type that should be returned from the query.cypher
- The parameterizable cypher to execute.parameters
- Any scalar parameters to attach to the cypher.- Returns:
- An instance of the objectType that matches the cypher and parameters. Null if no object is matched
-
query
Description copied from interface:Session
a cypher statement this method will return a collection of domain objects that is hydrated to the default level or a collection of scalars (depending on the parametrized type).- Specified by:
query
in interfaceSession
- Type Parameters:
T
- A domain object or scalar.- Parameters:
type
- The type that should be returned from the query.cypher
- The parameterizable cypher to execute.parameters
- Any parameters to attach to the cypher.- Returns:
- A collection of domain objects or scalars as prescribed by the parametrized type.
-
query
Description copied from interface:Session
a cypher statement this method will return a Result object containing a collection of Map's which represent Neo4j objects as properties, along with query statistics if applicable. Each element of the query result is a map which you can access by the name of the returned field TODO: Are we going to use the neo4jOperations conversion method to cast the value object to its proper class? -
queryDto
Description copied from interface:Session
Map non-entities to aList
of DTO objects.- Specified by:
queryDto
in interfaceSession
- Type Parameters:
T
- Type of the expected result.- Parameters:
cypher
- The parameterisable cypher to execute.parameters
- Any parameters to attach to the cypher.type
- The tyoe that should be returned from the query.- Returns:
- A
List
of the resulting object.
-
query
Description copied from interface:Session
a cypher statement this method will return a Result object containing a collection of Map's which represent Neo4j objects as properties, along with query statistics if applicable. Each element of the query result is a map which you can access by the name of the returned field TODO: Are we going to use the neo4jOperations conversion method to cast the value object to its proper class?- Specified by:
query
in interfaceSession
- Parameters:
cypher
- The parameterisable cypher to execute.parameters
- Any parameters to attach to the cypher.readOnly
- true if the query is readOnly, false otherwise- Returns:
- A
Result
ofIterable
s with each entry representing a neo4j object's properties.
-
countEntitiesOfType
Description copied from interface:Session
Counts all the node entities of the specified type.- Specified by:
countEntitiesOfType
in interfaceSession
- Parameters:
entity
- TheClass
denoting the type of entity to count- Returns:
- The number of entities in the database of the type
-
count
Description copied from interface:Session
Counts all the node entities of the specified type which match the filters supplied -
purgeDatabase
public void purgeDatabase()Description copied from interface:Session
Delete all nodes in the database. The delete is performed in a single transaction so it may not be suitable for large data sets. NOTE: This will delete all data, not only nodes/relationships with matching metadata in the domain.- Specified by:
purgeDatabase
in interfaceSession
-
delete
public <T> void delete(T object) Description copied from interface:Session
Delete entity (or entities) -
deleteAll
Description copied from interface:Session
Delete all entities of type -
delete
Description copied from interface:Session
Delete all entities of type matching filter -
save
public <T> void save(T object) Description copied from interface:Session
Save entity(or entities) into the database, up to specified depth The entities are either created or updated. When new objects are saved and the objects have a field that is mapped withId
using the internal Id-generation-strategy, those fields are modified and set to the internal graph-id. -
save
public <T> void save(T object, int depth) Description copied from interface:Session
Save entity(or entities) into the database, up to specified depth The objects are either created or updated. When new objects are saved and the objects have a field that is mapped withId
using the internal Id-generation-strategy, those fields are modified and set to the internal graph-id. -
addWriteProtection
Adds aPredicate
as possible write protection for the specifiedtarget
. OGM will pass the entity that currently is persisted to the predicate and will skip writing or updating it (depending on the mode) when the predicate returns true.
IfsetWriteProtectionStrategy(WriteProtectionStrategy)
has been used to apply a custom strategy, is has to be used with null again to remove the custom write protection strategy before applying the simple one here.- Parameters:
target
- The target to which the write protection should be appliedprotection
- A predicate determines per entity if write protection has to be applied or node.
-
removeWriteProtection
Removes write protection for the specified mode.- Parameters:
target
- The target to remove all write protections for.
-
setWriteProtectionStrategy
Can be used to apply a completely custom write protection strategy.- Parameters:
writeProtectionStrategy
-
-
beginTransaction
public org.neo4j.ogm.transaction.Transaction beginTransaction()Description copied from interface:Session
Begin a new READ_WRITE transaction. If an existing transaction already exists, users must decide whether to commit or rollback. Only one transaction can be bound to a thread at any time, so active transactions that have not been closed but are no longer bound to the thread must be handled by client code.- Specified by:
beginTransaction
in interfaceSession
- Returns:
- a new active Transaction
-
beginTransaction
public org.neo4j.ogm.transaction.Transaction beginTransaction(org.neo4j.ogm.transaction.Transaction.Type type) Description copied from interface:Session
Begin a new transaction, passing in the required type (READ_ONLY, READ_WRITE). If an existing transaction already exists, users must decide whether to commit or rollback. Only one transaction can be bound to a thread at any time, so active transactions that have not been closed but are no longer bound to the thread must be handled by client code.- Specified by:
beginTransaction
in interfaceSession
- Parameters:
type
- theTransaction.Type
required for this transaction- Returns:
- a new active Transaction
-
beginTransaction
public org.neo4j.ogm.transaction.Transaction beginTransaction(org.neo4j.ogm.transaction.Transaction.Type type, Iterable<String> bookmarks) Description copied from interface:Session
Begin a new transaction, passing in the required type and bookmarks If an existing transaction already exists, users must decide whether to commit or rollback. Only one transaction can be bound to a thread at any time, so active transactions that have not been closed but are no longer bound to the thread must be handled by client code.- Specified by:
beginTransaction
in interfaceSession
- Parameters:
type
- theTransaction.Type
required for this transactionbookmarks
- bookmarks that are passed to driver- Returns:
- a new active Transaction
-
doInTransaction
public void doInTransaction(TransactionalUnitOfWorkWithoutResult function, org.neo4j.ogm.transaction.Transaction.Type txType) - Parameters:
function
- The code to execute.txType
- Transaction type, readonly or not.- See Also:
-
doInTransaction
public void doInTransaction(TransactionalUnitOfWorkWithoutResult function, boolean forceTx, org.neo4j.ogm.transaction.Transaction.Type txType) -
doInTransaction
public <T> T doInTransaction(TransactionalUnitOfWork<T> function, org.neo4j.ogm.transaction.Transaction.Type txType) -
doInTransaction
public <T> T doInTransaction(TransactionalUnitOfWork<T> function, boolean forceTx, org.neo4j.ogm.transaction.Transaction.Type txType) For internal use only. Opens a new transaction if necessary before running statements in case an explicit transaction does not exist. It is designed to be the central point for handling exceptions coming from the DB and apply commit / rollback rules.- Type Parameters:
T
- The result type.- Parameters:
function
- The callback to execute.txType
- Transaction type, readonly or not.- Returns:
- The result of the transaction function.
-
getTransaction
public org.neo4j.ogm.transaction.Transaction getTransaction()Description copied from interface:Session
Get the existing transaction if available- Specified by:
getTransaction
in interfaceSession
- Returns:
- an active Transaction, or null if none exists
-
getTransactionManager
public org.neo4j.ogm.transaction.TransactionManager getTransactionManager()This is a convenience method that one can use to access a custom transaction manager that may or may not have special requirements or additional functionality. While not part ofsession interface
, it is safe to use after down-casting toNeo4jSession
- Returns:
- This sessions transaction manager.
- Since:
- 4.0.3
-
resolveGraphIdFor
Description copied from interface:Session
Resolve the graph id for a possible entity.- Specified by:
resolveGraphIdFor
in interfaceSession
- Parameters:
possibleEntity
- the possible entity- Returns:
- the value of the internal graph id for the possible entity. Returns null if either the object is not an entity or the id is null.
-
detachNodeEntity
Description copied from interface:Session
Detach this node entity represented by the supplied Graph ID from the session.- Specified by:
detachNodeEntity
in interfaceSession
- Parameters:
id
- the node id to detach.- Returns:
true
if detached successfully.
-
detachRelationshipEntity
Description copied from interface:Session
Detach this relationship entity represented by the supplied Graph ID from the session.- Specified by:
detachRelationshipEntity
in interfaceSession
- Parameters:
id
- the relationship id to detach.- Returns:
true
if detached successfully.
-
queryStatementsFor
public <T,ID extends Serializable> QueryStatements<ID> queryStatementsFor(Class<T> type, int depth) -
determineLabelsOrTypeForLoading
Determines the one relationship type or maybe multiple labels to use in various statements during loading of things.Multiple labels are pre-joined with
`:`
. There are meant to be passed to various clause builders, which cannot deal with list of labels, but use the one label or type and use it in between tickmarks.- Parameters:
type
- The type of the objects that shall be loaded- Returns:
- Label(s) or type, empty optional of no valid label or type could be determined.
-
context
-
optimisticLockingChecker
-
metaData
-
clear
public void clear()Description copied from interface:Session
Clears the Session -
requestHandler
public org.neo4j.ogm.request.Request requestHandler() -
warn
-
getLastBookmark
Description copied from interface:Session
Retrieves the last bookmark used in this session when used in a Neo4j Causal Cluster. This bookmark can be used to ensure the cluster is consistent before performing a read/write.- Specified by:
getLastBookmark
in interfaceSession
- Returns:
- The last used bookmark String on this session.
-
withBookmark
Description copied from interface:Session
Sets the bookmark to use on this session. Useful when resuming a user session with a causal cluster.- Specified by:
withBookmark
in interfaceSession
- Parameters:
bookmark
- The last used bookmark String that this session should start from.
-
getLoadStrategy
Description copied from interface:Session
Returns current load strategy- Specified by:
getLoadStrategy
in interfaceSession
- Returns:
- load strategy
-
getEntityInstantiator
-
setLoadStrategy
Description copied from interface:Session
Sets the LoadStrategy Will be used for all subsequent queries.- Specified by:
setLoadStrategy
in interfaceSession
-