public class NodeQueryStatements<ID extends Serializable> extends Object implements QueryStatements<ID>
Modifier and Type | Field and Description |
---|---|
static String |
PROPERTY_SEPARATOR
Some arbitrary characters that hopefully are not used in a
@Property . |
Constructor and Description |
---|
NodeQueryStatements() |
NodeQueryStatements(String primaryIndex,
LoadClauseBuilder loadClauseBuilder) |
Modifier and Type | Method and Description |
---|---|
PagingAndSortingQuery |
findAllByType(String label,
Collection<ID> ids,
int depth)
construct a query to fetch all objects with the specified ids
|
PagingAndSortingQuery |
findByType(String label,
Filters parameters,
int depth)
construct queries to fetch all objects with the specified label that match the specified filters
|
PagingAndSortingQuery |
findByType(String label,
int depth)
construct queries to fetch all objects with the specified label or relationship type
|
PagingAndSortingQuery |
findOne(ID id,
int depth)
construct a query to fetch a single object with the specified id
|
PagingAndSortingQuery |
findOneByType(String label,
ID id,
int depth)
construct a query to fetch a single object with the specified id of a specific type
|
static String |
joinPrimaryIndexAttributesIfNecessary(String defaultPrimaryIndex,
Object id)
This method concatenates the keys of an id into one string in case the id is a map, aka a composite key.
|
static String |
splitPrimaryIndexAttributes(String property)
This joins properties separated by
PROPERTY_SEPARATOR into a literal map to be used to match on.. |
public static final String PROPERTY_SEPARATOR
@Property
.
We use them to separate the properties in composite primary keys when passing them through the existing API.
This constant is not to be used outside OGM.public NodeQueryStatements()
public NodeQueryStatements(String primaryIndex, LoadClauseBuilder loadClauseBuilder)
public static String joinPrimaryIndexAttributesIfNecessary(String defaultPrimaryIndex, Object id)
This method is the obverse of splitPrimaryIndexAttributes(String)
public static String splitPrimaryIndexAttributes(String property)
PROPERTY_SEPARATOR
into a literal map to be used to match on..property
- The property that may contain multiple, separated properties.public PagingAndSortingQuery findOne(ID id, int depth)
QueryStatements
findOne
in interface QueryStatements<ID extends Serializable>
id
- the id of the object to finddepth
- the depth to traverse for any related objectsPagingAndSortingQuery
public PagingAndSortingQuery findOneByType(String label, ID id, int depth)
QueryStatements
findOneByType
in interface QueryStatements<ID extends Serializable>
label
- the label attached to the object or relationship typeid
- the id of the object to finddepth
- the depth to traverse for any related objectsPagingAndSortingQuery
public PagingAndSortingQuery findAllByType(String label, Collection<ID> ids, int depth)
QueryStatements
findAllByType
in interface QueryStatements<ID extends Serializable>
label
- the label attached to the object, or the relationship typeids
- the ids of the objects to finddepth
- the depth to traverse for any related objectsPagingAndSortingQuery
public PagingAndSortingQuery findByType(String label, int depth)
QueryStatements
findByType
in interface QueryStatements<ID extends Serializable>
label
- the label attached to the object, or the relationship typedepth
- the depth to traverse for related objectsPagingAndSortingQuery
public PagingAndSortingQuery findByType(String label, Filters parameters, int depth)
QueryStatements
findByType
in interface QueryStatements<ID extends Serializable>
label
- the label value or relationship type to filter onparameters
- parameters to filter ondepth
- the depth to traverse for related objectsPagingAndSortingQuery
Copyright © 2015–2021 Neo Technology, Inc.. All rights reserved.