
Classes | |
| class | EntityDeleteOrderComparator |
| class | EntityInsertOrderComparator |
Public Member Functions | |
| NSArray | allEntities () |
| void | createListOfEntities (EOModelGroup modelGroup) |
| ERXEntityOrder () | |
| ERXEntityOrder (EOModelGroup modelGroup) | |
| NSMutableDictionary | groupedEntities () |
Protected Member Functions | |
| abstract NSDictionary | dependenciesByEntity () |
| String | dependencyKeyFor (EOEntity entity) |
| NSSet | dependentEntities (NSDictionary dependencies, EOEntity entity) |
| void | generateOrdering () |
| boolean | hasDependenciesForEntity (NSDictionary dependencies, EOEntity entity) |
Protected Attributes | |
| NSArray | allEntities = null |
| NSMutableDictionary | groupedEntities = new NSMutableDictionary() |
Static Private Attributes | |
| static Logger | logger = Logger.getLogger(ERXEntityOrder.class) |
This is implemented by creating a dictionary of entity name to group. Group 1 is entities with no dependencies. Group 2 is entities with dependencies on entities in group 1. Group 3 is entities with dependencies on entities in groups 1 and 2. etc. The dependencies between entities are determined by the abstract NSDictionary dependenciesByEntity().
| ERXEntityOrder | ( | EOModelGroup | modelGroup | ) |
Designated constructor for implementing classes.
| modelGroup | EOModelGroup to get list of all entities from |
| ERXEntityOrder | ( | ) |
Convenience constructor for implementing classes. Uses EOModelGroup.defaultGroup().
| NSArray allEntities | ( | ) |
| void createListOfEntities | ( | EOModelGroup | modelGroup | ) |
Creates list of all entities (ecluding prototype entities) in all models in modelGroup.
| modelGroup | EOModelGroup to get list of all entities from |
| abstract NSDictionary dependenciesByEntity | ( | ) | [protected, pure virtual] |
Processes allEntities() and returns a dictionary keyed on dependencyKeyFor(EOEntity). The keys are usually entity.name() but are not required to be. The value associated with each key is an NSSet of the entity names that have a dependency on the key. This dictionary is used to determine the dependency ordering.
Implemented in ERXEntityFKConstraintOrder.
| String dependencyKeyFor | ( | EOEntity | entity | ) | [protected] |
This implementation returns entity.name().
| entity | EOEntity to return key into dependency dictionary for |
entity into dependency dictionary returned by dependenciesByEntity() Reimplemented in ERXEntityFKConstraintOrder.
| NSSet dependentEntities | ( | NSDictionary | dependencies, | |
| EOEntity | entity | |||
| ) | [protected] |
| dependencies | result from dependenciesByEntity() | |
| entity | EOEntity to return dependencies set for |
| void generateOrdering | ( | ) | [protected] |
Calls dependenciesByEntity() to determine dependencies and processes entities in allEntities() to generate the groupedEntities() dictionary.
Returns dictionary of group numbers (java.lang.Integer) to entity names. Group 1 is entities with no dependencies. Group 2 is entities with dependencies on entities in group 1. Group 3 is entities with dependencies on entities in groups 1 and 2. etc
| boolean hasDependenciesForEntity | ( | NSDictionary | dependencies, | |
| EOEntity | entity | |||
| ) | [protected] |
| dependencies | dictionary from dependenciesByEntity() | |
| entity | entity to check for dependencies |
groupedEntities() has all the entities named in dependentEntities(dependencies, entity).
NSArray allEntities = null [protected] |
NSMutableDictionary groupedEntities = new NSMutableDictionary() [protected] |
Logger logger = Logger.getLogger(ERXEntityOrder.class) [static, private] |
Reimplemented in ERXEntityFKConstraintOrder.
1.5.8