Package 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 | Description
    --- | ---
    `GraphBasedDbRowOpSorter​(Provider<DataDomain> dataDomainProvider)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | 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`