org.apache.cayenne.access.flush.operation

## Class GraphBasedDbRowOpSorter

- java.lang.Object
- - org.apache.cayenne.access.flush.operation.GraphBasedDbRowOpSorter

- All Implemented Interfaces:
    DbRowOpSorter

      public class GraphBasedDbRowOpSorter
      extends Object
      implements DbRowOpSorter

  Db operation sorted that builds dependency graph and uses topological sort to get final order. This in general slower than `DefaultDbRowOpSorter` but can handle more edge cases (like multiple meaningful PKs/FKs). TODO: possible optimizations could be optional logic parts (e.g. detecting effective id intersections, reflexive dependencies, etc.)
  Since:
    4.2

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `GraphBasedDbRowOpSorter(Provider<DataDomain> dataDomainProvider)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `List<DbRowOp>` | `sort(List<DbRowOp> dbRows)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### GraphBasedDbRowOpSorter

          public GraphBasedDbRowOpSorter(Provider<DataDomain> dataDomainProvider)

  - ### Method Detail

    - #### sort

          public List<DbRowOp> sort(List<DbRowOp> dbRows)

      Specified by:
        `sort` in interface `DbRowOpSorter`

Copyright © 2001–2021 Apache Cayenne. All rights reserved.