Package org.apache.cayenne.ashwood
Class WeightedAshwoodEntitySorter
java.lang.Object
org.apache.cayenne.ashwood.AshwoodEntitySorter
org.apache.cayenne.ashwood.WeightedAshwoodEntitySorter
- All Implemented Interfaces:
EntitySorter
EntitySorter that takes into account entity "weights", and otherwise delegating to
another (topological) sorter.
- Since:
- 3.1, since 4.0 moved to cayenne-server from cayenne-lifecycle
-
Field Summary
FieldsFields inherited from class org.apache.cayenne.ashwood.AshwoodEntitySorter
components, dbEntityComparator, entityResolver, objEntityComparator, reflexiveDbEntities -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddWeightForEntity(ObjEntity entity) protected Comparator<DbEntity> getDbEntityComparator(boolean dependantFirst) protected Comparator<ObjEntity> getObjEntityComparator(boolean dependantFirst) voidreindex()Rebuilds the internal index off the current state of the sorter's EntityResolver.Methods inherited from class org.apache.cayenne.ashwood.AshwoodEntitySorter
buildDigraph, findReflexiveMaster, getDbEntityComparator, getObjEntityComparator, getReflexiveRelationshipsNames, isReflexive, sortDbEntities, sortObjectsForEntity, sortObjectsForEntity, sortObjEntities, topologicalSort
-
Field Details
-
entityWeights
-
-
Constructor Details
-
WeightedAshwoodEntitySorter
-
-
Method Details
-
reindex
public void reindex()Description copied from interface:EntitySorterRebuilds the internal index off the current state of the sorter's EntityResolver. Called when the set of entities changes.- Specified by:
reindexin interfaceEntitySorter- Overrides:
reindexin classAshwoodEntitySorter
-
addWeightForEntity
-
getDbEntityComparator
- Overrides:
getDbEntityComparatorin classAshwoodEntitySorter
-
getObjEntityComparator
- Overrides:
getObjEntityComparatorin classAshwoodEntitySorter
-