Class CypherAdapterUtils

java.lang.Object
org.springframework.data.neo4j.repository.query.CypherAdapterUtils

@API(status=INTERNAL, since="6.0") public final class CypherAdapterUtils extends Object
Bridging between Spring Data domain Objects and Cypher constructs.
Author:
Michael J. Simons, Gerrit Meier
  • Method Details

    • sortAdapterFor

      public static Function<Sort.Order,org.neo4j.cypherdsl.core.SortItem> sortAdapterFor(NodeDescription<?> nodeDescription)
      Maps Spring Data's Sort.Order to a SortItem. See toSortItems(NodeDescription, Sort).
      Parameters:
      nodeDescription - NodeDescription to 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 of sort items.
      Parameters:
      nodeDescription - The node description to map the properties
      sort - 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)