Inherited by ERXModelGroup.Model.

Public Member Functions | |
| Object | _addEntityWithPropertyList (Object propertyList) throws InstantiationException, IllegalAccessException |
| NSArray | availablePrototypeAttributeNames () |
| ERXModel (NSDictionary propertyList, URL url) | |
| ERXModel (NSDictionary propertyList, String path) | |
| ERXModel (URL url) | |
| ERXModel () | |
| EOAttribute | prototypeAttributeNamed (String name) |
| void | setModelGroup (EOModelGroup modelGroup) |
Static Public Member Functions | |
| static void | createPrototypes (EOModel model) |
| static boolean | isUseExtendedPrototypesEnabled () |
Static Public Attributes | |
| static Object | _ERXGlobalModelLock |
Protected Member Functions | |
| boolean | useExtendedPrototypes () |
Static Package Functions | |
| [static initializer] | |
Static Private Member Functions | |
| static void | addAttributesToPrototypesCache (EOModel model, NSArray<?extends EOAttribute > prototypeAttributes) |
| static void | addAttributesToPrototypesCache (EOModel model, EOEntity prototypesEntity) |
| static NSArray< EOAttribute > | attributesFromEntity (EOEntity entity) |
| static NSArray< String > | namesForAttributes (NSArray<?extends EOAttribute > attributes) |
Static Private Attributes | |
| static final Logger | log = Logger.getLogger(ERXModel.class) |
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 appropriate
The priority order (which is basically the reverse of the search order) for prototype entities is as follows:
| ERXModel | ( | URL | url | ) |
Creates a new EOModel object by reading the contents of the model archive at url. Sets the EOModel's name and path from the context of the model archive. Throws an IllegalArgumentException if url is null or if unable to read content from url. Throws a runtime exception if unable for any other reason to initialize the model from the specified java.net.URL; the error text indicates the nature of the exception.
| url | - The java.net.URL to a model archive. |
| ERXModel | ( | NSDictionary | propertyList, | |
| URL | url | |||
| ) |
| propertyList | ||
| url |
| [static initializer] | ( | ) | [static, package] |
| Object _addEntityWithPropertyList | ( | Object | propertyList | ) | throws InstantiationException, IllegalAccessException |
Sets the default EOEntity class to com.webobjects.eoaccess.ERXEntity. You can provide your own via the property er.extensions.ERXModel.defaultEOEntityClassName however your class must be in the same package unless you plan on re-implementing eof itself.
| static void addAttributesToPrototypesCache | ( | EOModel | model, | |
| NSArray<?extends EOAttribute > | prototypeAttributes | |||
| ) | [static, private] |
Utility to add attributes to the prototype cache for a given model. As the attributes are chosen by name, replace already existing ones.
| model | - the model to which the prototype attributes will be cached | |
| prototypeAttributes | - the prototype attributes to add to the model |
| static void addAttributesToPrototypesCache | ( | EOModel | model, | |
| EOEntity | prototypesEntity | |||
| ) | [static, private] |
Utility to add attributes to the prototype cache. As the attributes are chosen by name, replace already existing ones.
| model | - the model to which the prototype attributes will be cached | |
| prototypesEntity | - the entity from which to copy the prototype attributes |
| static NSArray<EOAttribute> attributesFromEntity | ( | EOEntity | entity | ) | [static, private] |
Utility for getting all the attributes off an entity. If the entity is null, an empty array is returned.
| entity |
| NSArray availablePrototypeAttributeNames | ( | ) |
Overridden to use our prototype creation method if er.extensions.ERXModel.useExtendedPrototypes=true.
| static void createPrototypes | ( | EOModel | model | ) | [static] |
Create the prototype cache for the given model by walking a search order.
| model |
| static boolean isUseExtendedPrototypesEnabled | ( | ) | [static] |
Defaults to false. Note: when enabled, this may be incompatible with ERXModelGroup#flattenPrototypes.
er.extensions.ERXModel.useExtendedPrototypes. | static NSArray<String> namesForAttributes | ( | NSArray<?extends EOAttribute > | attributes | ) | [static, private] |
Utility for getting all names from an array of attributes.
| attributes |
| EOAttribute prototypeAttributeNamed | ( | String | name | ) |
Overridden to use our prototype creation method if er.extensions.ERXModel.useExtendedPrototypes=true.
| void setModelGroup | ( | EOModelGroup | modelGroup | ) |
| boolean useExtendedPrototypes | ( | ) | [protected] |
Defaults to false as returned by isUseExtendedPrototypesEnabled().
Reimplemented in ERXModelGroup.Model.
Object _ERXGlobalModelLock [static] |
final Logger log = Logger.getLogger(ERXModel.class) [static, private] |
1.5.8