Project Wonder 2.0

er.extensions
Class ERXModelGroup

java.lang.Object
  extended bycom.webobjects.eoaccess.EOModelGroup
      extended byer.extensions.ERXModelGroup

public class ERXModelGroup
extends EOModelGroup

The reason that this model group is needed is because the regular EOModelGroup will fail to load a model if it has an entity name conflict. While normally this could be considered a 'good thing' in the case of EOPrototypes multiple EOModels might all need there own prototype entities (in fact EOM requires it). This model group subclass will only print warning messages when duplicate entity names are found.


Nested Class Summary
 
Nested classes inherited from class com.webobjects.eoaccess.EOModelGroup
EOModelGroup.ClassDelegate, EOModelGroup.Delegate
 
Field Summary
static ERXLogger log
          logging support
 
Fields inherited from class com.webobjects.eoaccess.EOModelGroup
_delegate, _delegateRespondsTo_classForObjectWithGlobalID, _delegateRespondsTo_failedToLookupClassNamed, _delegateRespondsTo_relationshipFailedToLookupDestinationWithName, _delegateRespondsTo_relationshipForRow, _delegateRespondsTo_subEntityForEntity, _modelsByName, _subEntitiesCache, ModelAddedNotification, ModelInvalidatedNotification
 
Constructor Summary
ERXModelGroup()
          Default public constructor
 
Method Summary
 void addModel(EOModel eomodel)
          This implementation will load models that have entity name conflicts, removing the offending entity.
 void checkInheritanceRelationships()
          Corrects a strange EOF inheritance issue where if a model gets loaded and an entity that has children located in a different model that hasn't been loaded yet will not be setup correctly.
static EOModelGroup modelGroupForLoadedBundles()
          The only reason this method is needed is so our model group subclass is used.
 
Methods inherited from class com.webobjects.eoaccess.EOModelGroup
_addSubEntitiesCache, _childrenForEntityNamed, _registerChildForParent, addModelWithPath, addModelWithPathURL, classDelegate, defaultGroup, delegate, entitiesWithSharedObjects, entityForObject, entityNamed, fetchSpecificationNamed, globalModelGroup, loadAllModelObjects, modelGroupForObjectStoreCoordinator, modelNamed, modelNames, models, modelWithPath, modelWithPathURL, removeModel, setClassDelegate, setDefaultGroup, setDelegate, setModelGroupForObjectStoreCoordinator, storedProcedureNamed, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

public static ERXLogger log
logging support

Constructor Detail

ERXModelGroup

public ERXModelGroup()
Default public constructor

Method Detail

modelGroupForLoadedBundles

public static EOModelGroup modelGroupForLoadedBundles()
The only reason this method is needed is so our model group subclass is used. Other than that it does the exact same thing as EOModelGroup's implementation.

Returns:
ERXModelGroup for all of the loaded bundles

addModel

public void addModel(EOModel eomodel)
This implementation will load models that have entity name conflicts, removing the offending entity. The reason this is needed is because multiple models might have JDBC prototype entities which would cause problems for the model group.

Parameters:
eomodel - model to be added

checkInheritanceRelationships

public void checkInheritanceRelationships()
Corrects a strange EOF inheritance issue where if a model gets loaded and an entity that has children located in a different model that hasn't been loaded yet will not be setup correctly. Specifically when those child entities are loaded they will not have their parentEntity relationship set correctly.


Last updated: Do, Dez 9, 2004 • 12:46 PM CET

Copyright © 2002 – 2004 Project Wonder.