|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.cayenne.ashwood.AshwoodEntitySorter
public class AshwoodEntitySorter
Implements dependency sorting algorithms for ObjEntities, DbEntities and DataObjects. Presently it works for acyclic database schemas with possible multi-reflexive tables.
| Field Summary | |
|---|---|
protected Map<DbEntity,org.apache.cayenne.ashwood.AshwoodEntitySorter.ComponentRecord> |
components
|
protected Comparator<DbEntity> |
dbEntityComparator
|
protected EntityResolver |
entityResolver
|
protected Comparator<ObjEntity> |
objEntityComparator
|
protected Map<DbEntity,List<DbRelationship>> |
reflexiveDbEntities
|
| Constructor Summary | |
|---|---|
AshwoodEntitySorter()
|
|
AshwoodEntitySorter(Collection<DataMap> dataMaps)
Deprecated. since 3.1. Use AshwoodEntitySorter() constructor together with
setDataMaps(Collection) instead. |
|
| Method Summary | |
|---|---|
protected void |
doIndexSorter()
Reindexes internal sorter without synchronization. |
protected Object |
findReflexiveMaster(Persistent object,
ObjRelationship toOneRel,
String targetEntityName)
|
protected Comparator<DbEntity> |
getDbEntityComparator(boolean dependantFirst)
|
protected Comparator<ObjEntity> |
getObjEntityComparator(boolean dependantFirst)
|
protected void |
indexSorter()
Reindexes internal sorter in a thread-safe manner. |
protected boolean |
isReflexive(DbEntity metadata)
|
void |
setDataMaps(Collection<DataMap> dataMaps)
Deprecated. since 3.1, setEntityResolver(EntityResolver) is used instead. |
void |
setEntityResolver(EntityResolver entityResolver)
Sets EntityResolver for this sorter. |
void |
sortDbEntities(List<DbEntity> dbEntities,
boolean deleteOrder)
Sorts a list of DbEntities. |
void |
sortObjectsForEntity(ObjEntity objEntity,
List<?> objects,
boolean deleteOrder)
Sorts a list of objects belonging to the ObjEntity. |
void |
sortObjEntities(List<ObjEntity> objEntities,
boolean deleteOrder)
Sorts a list of ObjEntities. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected EntityResolver entityResolver
protected Map<DbEntity,org.apache.cayenne.ashwood.AshwoodEntitySorter.ComponentRecord> components
protected Map<DbEntity,List<DbRelationship>> reflexiveDbEntities
protected Comparator<DbEntity> dbEntityComparator
protected Comparator<ObjEntity> objEntityComparator
| Constructor Detail |
|---|
public AshwoodEntitySorter()
@Deprecated public AshwoodEntitySorter(Collection<DataMap> dataMaps)
AshwoodEntitySorter() constructor together with
setDataMaps(Collection) instead.
| Method Detail |
|---|
protected void indexSorter()
protected void doIndexSorter()
@Deprecated public void setDataMaps(Collection<DataMap> dataMaps)
setEntityResolver(EntityResolver) is used instead.
EntitySorter
setDataMaps in interface EntitySorterpublic void setEntityResolver(EntityResolver entityResolver)
EntitySorter
setEntityResolver in interface EntitySorter
public void sortDbEntities(List<DbEntity> dbEntities,
boolean deleteOrder)
EntitySorter
sortDbEntities in interface EntitySorter
public void sortObjEntities(List<ObjEntity> objEntities,
boolean deleteOrder)
EntitySorter
sortObjEntities in interface EntitySorter
public void sortObjectsForEntity(ObjEntity objEntity,
List<?> objects,
boolean deleteOrder)
EntitySorter
sortObjectsForEntity in interface EntitySorter
protected Object findReflexiveMaster(Persistent object,
ObjRelationship toOneRel,
String targetEntityName)
protected Comparator<DbEntity> getDbEntityComparator(boolean dependantFirst)
protected Comparator<ObjEntity> getObjEntityComparator(boolean dependantFirst)
protected boolean isReflexive(DbEntity metadata)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||