public class ERXModel
extends com.webobjects.eoaccess.EOModel
Note the package com.webobjects.eoaccess
is used to
allow any protected or default access superclass instance methods to resolve
at runtime.
To allow for extended prototypes set
er.extensions.ERXModel.useExtendedPrototypes=true
.
Note: this may be incompatible with ERXModelGroup.flattenPrototypes
.
The existence of prototype entities based on specific conventions is checked and the attributes of those prototype entities are added to the model's prototype attributes cache in a specific order. The search order ensures that the same prototype attribute names in different prototype entities get chosen in a predictable way.
Consequently, you can use this search order knowledge to over-ride Wonder's ERPrototypes for your entire set of application eomodels or just for specific named eomodels.
To understand the variables used in deriving the prototype entity names that are searched a few definitions are appropriateModifier and Type | Field and Description |
---|---|
static Object |
_ERXGlobalModelLock |
_adaptorName, _connectionDictionary, _entities, _entitiesByClass, _entitiesByName, _EOGlobalModelLock, _extraRefCount, _group, _internalInfo, _name, _prototypesByName, _sharedObjectEntities, _storedProcedures, _subEntitiesCache, _url, _userInfo, EntityLoadedNotification
Constructor and Description |
---|
ERXModel()
Creates and returns a new ERXModel.
|
ERXModel(NSDictionary propertyList,
String path) |
ERXModel(NSDictionary propertyList,
URL url) |
ERXModel(URL url)
Creates a new EOModel object by reading the contents of the model archive
at url.
|
Modifier and Type | Method and Description |
---|---|
Object |
_addEntityWithPropertyList(Object propertyList)
Sets the default EOEntity class to com.webobjects.eoaccess.ERXEntity.
|
NSArray |
availablePrototypeAttributeNames()
Overridden to use our prototype creation method if
er.extensions.ERXModel.useExtendedPrototypes=true . |
static void |
createPrototypes(com.webobjects.eoaccess.EOModel model)
Create the prototype cache for the given model by walking a search order.
|
static boolean |
isUseExtendedPrototypesEnabled()
Defaults to false.
|
EOAttribute |
prototypeAttributeNamed(String name)
Overridden to use our prototype creation method if
er.extensions.ERXModel.useExtendedPrototypes=true . |
void |
setModelGroup(com.webobjects.eoaccess.EOModelGroup modelGroup) |
protected boolean |
useExtendedPrototypes()
Defaults to false as returned by
isUseExtendedPrototypesEnabled() . |
_addEntity, _addFakeEntityWithPropertyList, _childrenForEntityNamed, _classDescriptionNeededForClass, _classDescriptionNeededForEntityName, _entityForClass, _externalModelsReferencedByEntities, _filenameForFetchSpecificationDictionaryForEntityNamedWithModelPath, _initWithPropertyListOwner, _initWithTableOfContentsPropertyListPathURL, _instantiatedEntities, _internalInfo, _isPrototypesEntity, _loadFetchSpecificationDictionaryForEntityNamed, _registerChildForParent, _removeEntity, _removePropertiesReferencingEntity, _resetPrototypeCache, _setEntitiesWithSharedObjects, _setEntityForEntityNameClassName, _setInheritanceLinks, _setInternalInfo, _setPathURL, _toString, _writeFetchSpecificationDictionaryForEntityNamedToModelPath, adaptorName, addEntity, addStoredProcedure, beautifyNames, connectionDictionary, dispose, encodeTableOfContentsIntoPropertyList, entities, entitiesWithSharedObjects, entityForObject, entityNamed, entityNames, entityPrototypeNameForAdaptor, entityPrototypePlugInNameForAdaptor, externalModelsReferenced, loadAllModelObjects, modelGroup, name, path, pathURL, referencesToProperty, removeEntity, removeEntityAndReferences, removeStoredProcedure, setAdaptorName, setConnectionDictionary, setName, setUserInfo, storedProcedureNamed, storedProcedureNames, storedProcedures, toString, userInfo, writeToFile
public static Object _ERXGlobalModelLock
public ERXModel()
public ERXModel(URL url)
url
- - The java.net.URL to a model archive.public ERXModel(NSDictionary propertyList, String path)
propertyList
- path
- public ERXModel(NSDictionary propertyList, URL url)
propertyList
- url
- public static void createPrototypes(com.webobjects.eoaccess.EOModel model)
model
- public static boolean isUseExtendedPrototypesEnabled()
ERXModelGroup.flattenPrototypes
.er.extensions.ERXModel.useExtendedPrototypes
.public Object _addEntityWithPropertyList(Object propertyList) throws InstantiationException, IllegalAccessException
er.extensions.ERXModel.defaultEOEntityClassName
however your class
must be in the same package unless you plan on re-implementing eof itself._addEntityWithPropertyList
in class com.webobjects.eoaccess.EOModel
InstantiationException
IllegalAccessException
EOModel._addEntityWithPropertyList(java.lang.Object)
public NSArray availablePrototypeAttributeNames()
er.extensions.ERXModel.useExtendedPrototypes=true
.availablePrototypeAttributeNames
in class com.webobjects.eoaccess.EOModel
public EOAttribute prototypeAttributeNamed(String name)
er.extensions.ERXModel.useExtendedPrototypes=true
.prototypeAttributeNamed
in class com.webobjects.eoaccess.EOModel
public void setModelGroup(com.webobjects.eoaccess.EOModelGroup modelGroup)
setModelGroup
in class com.webobjects.eoaccess.EOModel
protected boolean useExtendedPrototypes()
isUseExtendedPrototypesEnabled()
.true
if extended prototypes are usedisUseExtendedPrototypesEnabled()
Copyright © 2002 – 2020 Project Wonder.