Module spring.data.neo4j
Class CypherAdapterUtils
java.lang.Object
org.springframework.data.neo4j.repository.query.CypherAdapterUtils
Bridging between Spring Data domain Objects and Cypher constructs.
- Author:
- Michael J. Simons, Gerrit Meier
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.neo4j.cypherdsl.core.StatementBuilder.BuildableStatementaddPagingParameter(NodeDescription<?> nodeDescription, Pageable pageable, org.neo4j.cypherdsl.core.StatementBuilder.OngoingReadingAndReturn returning) static org.neo4j.cypherdsl.core.ConditioncombineKeysetIntoCondition(Neo4jPersistentEntity<?> entity, KeysetScrollPosition scrollPosition, Sort sort, Neo4jConversionService conversionService) static Function<Sort.Order,org.neo4j.cypherdsl.core.SortItem> sortAdapterFor(NodeDescription<?> nodeDescription) Maps Spring Data'sSort.Orderto aSortItem.static Collection<org.neo4j.cypherdsl.core.SortItem>toSortItems(NodeDescription<?> nodeDescription, Sort sort) Converts a Spring Data sort to an equivalent list ofsort items.
-
Method Details
-
sortAdapterFor
public static Function<Sort.Order,org.neo4j.cypherdsl.core.SortItem> sortAdapterFor(NodeDescription<?> nodeDescription) - Parameters:
nodeDescription-NodeDescriptionto get properties for sorting from.- Returns:
- A stream if sort items. Will be empty when sort is unsorted.
-
combineKeysetIntoCondition
public static org.neo4j.cypherdsl.core.Condition combineKeysetIntoCondition(Neo4jPersistentEntity<?> entity, KeysetScrollPosition scrollPosition, Sort sort, Neo4jConversionService conversionService) -
toSortItems
public static Collection<org.neo4j.cypherdsl.core.SortItem> toSortItems(NodeDescription<?> nodeDescription, Sort sort) Converts a Spring Data sort to an equivalent list ofsort items.- Parameters:
nodeDescription- The node description to map the propertiessort- The sort object to convert- Returns:
- An of sort items. It will be empty when sort is unsorted.
-
addPagingParameter
public static org.neo4j.cypherdsl.core.StatementBuilder.BuildableStatement addPagingParameter(NodeDescription<?> nodeDescription, Pageable pageable, org.neo4j.cypherdsl.core.StatementBuilder.OngoingReadingAndReturn returning)
-