er.extensions.eof
Class ERXEntityFKConstraintOrder
java.lang.Object
  
er.extensions.eof.ERXEntityOrder
      
er.extensions.eof.ERXEntityFKConstraintOrder
public class ERXEntityFKConstraintOrder
- extends ERXEntityOrder
 
Creates ordering based on foreign key dependencies.
- Author:
 
  - chill
 
 
 
 
 
 
| 
Method Summary | 
protected  com.webobjects.foundation.NSDictionary | 
dependenciesByEntity()
 
          Processes the list of entities, creating the ordering dictionary based on foreign key constraints. | 
protected  java.lang.String | 
dependencyKeyFor(com.webobjects.eoaccess.EOEntity entity)
 
          This implementation returns entity.externalName() as the dependcy is actually on tables not EOEntities
 . | 
protected  com.webobjects.foundation.NSMutableSet | 
entitiesDependentOn(com.webobjects.foundation.NSMutableDictionary dependencies,
                    com.webobjects.eoaccess.EOEntity entity)
 
          Returns the list of the names of the entities that reference (depend on)
 this entity. | 
protected  boolean | 
hasForeignKeyConstraint(com.webobjects.eoaccess.EORelationship relationship)
 
            | 
 
 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
ERXEntityFKConstraintOrder
public ERXEntityFKConstraintOrder(com.webobjects.eoaccess.EOModelGroup modelGroup)
- Designated constructor for implementing classes.
- Parameters:
 modelGroup - EOModelGroup to get list of all entities from
 
ERXEntityFKConstraintOrder
public ERXEntityFKConstraintOrder()
- Convenience constructor for implementing classes.  Uses 
EOModelGroup.defaultGroup().
 
dependenciesByEntity
protected com.webobjects.foundation.NSDictionary dependenciesByEntity()
- Processes the list of entities, creating the ordering dictionary based on foreign key constraints.
- Specified by:
 dependenciesByEntity in class ERXEntityOrder
 
- Returns:
 - a dictionary keyed on dependencyKeyFor(EOEntity)
 
 
 
hasForeignKeyConstraint
protected boolean hasForeignKeyConstraint(com.webobjects.eoaccess.EORelationship relationship)
- Parameters:
 relationship - EORelationship to test
- Returns:
 true if relationship models a relation that will have a foreign key constraint in the database
 
dependencyKeyFor
protected java.lang.String dependencyKeyFor(com.webobjects.eoaccess.EOEntity entity)
- This implementation returns 
entity.externalName() as the dependcy is actually on tables not EOEntities
 .
- Overrides:
 dependencyKeyFor in class ERXEntityOrder
 
- Parameters:
 entity - EOEntity to return key into dependency dictionary for
- Returns:
 - key for 
entity into dependency dictionary returned by dependenciesByEntity() 
 
 
entitiesDependentOn
protected com.webobjects.foundation.NSMutableSet entitiesDependentOn(com.webobjects.foundation.NSMutableDictionary dependencies,
                                                                     com.webobjects.eoaccess.EOEntity entity)
- Returns the list of the names of the entities that reference (depend on)
 this entity. This list is populated by 
builddependencyList().
 If builddependencyList() has not finished executing, the
 list returned by this method may not be complete.
- Parameters:
 dependencies - list of dependencies being built by
            builddependencyList()entity - EOEntity to return list of referencing entities for
- Returns:
 - list of names of entities previously recorded as referencing this
         entity
 
 
 
Copyright © 2002 – 2007  Project Wonder.