Class AshwoodEntitySorter

  • All Implemented Interfaces:
    EntitySorter
    Direct Known Subclasses:
    WeightedAshwoodEntitySorter

    public class AshwoodEntitySorter
    extends Object
    implements EntitySorter
    Implements dependency sorting algorithms for ObjEntities, DbEntities and DataObjects. Presently it works for acyclic database schemas with possible multi-reflexive tables.
    Since:
    3.1
    • Constructor Detail

      • AshwoodEntitySorter

        public AshwoodEntitySorter()
    • Method Detail

      • indexSorter

        protected void indexSorter()
        Reindexes internal sorter in a thread-safe manner.
      • doIndexSorter

        protected void doIndexSorter()
        Reindexes internal sorter without synchronization.
      • setEntityResolver

        public void setEntityResolver​(EntityResolver entityResolver)
        Description copied from interface: EntitySorter
        Sets EntityResolver for this sorter. All entities present in the resolver will be used to determine sort ordering.
        Specified by:
        setEntityResolver in interface EntitySorter
        Since:
        3.1
      • sortObjectsForEntity

        public void sortObjectsForEntity​(ObjEntity objEntity,
                                         List<?> objects,
                                         boolean deleteOrder)
        Description copied from interface: EntitySorter
        Sorts a list of objects belonging to the ObjEntity.
        Specified by:
        sortObjectsForEntity in interface EntitySorter
      • getDbEntityComparator

        protected Comparator<DbEntity> getDbEntityComparator​(boolean dependantFirst)
      • getObjEntityComparator

        protected Comparator<ObjEntity> getObjEntityComparator​(boolean dependantFirst)
      • isReflexive

        protected boolean isReflexive​(DbEntity metadata)