Cayenne Operations Sorters

From: Andrus (andru..bjectstyle.org)
Date: Sat Jan 25 2003 - 17:26:39 EST

  • Next message: Andrus: "Re: Cayenne Operations Sorters"

    First, I wanted to bring it to everybody's attention that Andriy's graph
    library called Ashwood is now a top-level ObjectStyle.org project. Welcome
    to ObjectStyle !! :-)

    http://objectstyle.org/ashwood/

    The website is just a placeholder now. Andriy is working on a better
    solution. BTW, Andriy, are you planning on renaming Java packages from
    net.ash to org.objectstyle.ahswood?

    I took the first steps on integrating it to Cayenne for the purpose of
    sorting dependencies.

    New Sorting Design
    ------------------

    1. org.objectstyle.cayenne.access.util.SortHandler is a cleaner and more
    generic version of OperationSorter. Once we switch, OperationSorter will
    become deprecated and replaced by SortHandler.

    2. org.objectstyle.cayenne.access.util.DependencySorter is an interface of
    a sort algorithm. It decouples SortHandler from the algorithm implementation.

    3. org.objectstyle.cayenne.access.util.DefaultSorter - an implementation of
    DependencySorter. This was directly ported from Andriy's
    RefIntegritySupport class (Andriy has his own version of Cayenne that
    deviated from ours, and now we are working to bring them together).

    Unresolved Issues
    -----------------

    Note that I haven't switched current code to SortHandler just yet. There
    are few issues to solve. Once this is done, I volunteer to switch Cayenne,
    including DbAdapters to the new SortHandler architecture.

    1. From this mailing list thread:

    http://objectstyle.org/cayenne/lists/cayenne-devel/2003/01/0014.html
    http://objectstyle.org/cayenne/lists/cayenne-devel/2003/01/0023.html

    it seems that Ashwood doesn't handle ordering of objects with reflexive
    relationships - something that Craig's implementation does. My suggestion
    is to split the solution between DefaultSorter and Ashwood's Table. Table
    will tell that it does indeed have the reflexive relationships, while
    DefaultSorter will take this into account in its DataObjectComparator.
    Andriy, do you think this is doable?

    2. Andriy's code initializes net.ash.dbutil.Table instances partially using
    JDBC MetaData, partially - Cayenne DataMap. Andriy, how hard is it to add
    API to use DbEntity relationships as opposed to retrieving PK/FK
    information via JDBC on every run (which is quiet an overhead, esp. given
    that this information is already in the relationships)?

    Andrus



    This archive was generated by hypermail 2.0.0 : Sat Jan 25 2003 - 17:26:18 EST