public class ERXModelGroup extends EOModelGroup
You must use EOModelGroup.defaultGroup() and not EOModelGroup.globalModelGroup() because only the former will result in this class getting created.
Name | Description |
---|---|
EOPrototypesFileGLOBAL | EOPrototypesFileGLOBAL |
JNDI.global.authenticationMethod | JNDI.global.authenticationMethod |
JNDI.global.password | JNDI.global.password |
JNDI.global.plugin | JNDI.global.plugin |
JNDI.global.serverUrl | JNDI.global.serverUrl |
JNDI.global.username | JNDI.global.username |
dbConfigNameGLOBAL | dbConfigNameGLOBAL |
[MODEL_NAME].DBConfigName | [MODEL_NAME].DBConfigName |
dbConnectAdaptorGLOBAL | dbConnectAdaptorGLOBAL |
[MODEL_NAME].adaptor | [MODEL_NAME].adaptor |
dbConnectDatabaseGLOBAL | dbConnectDatabaseGLOBAL |
[MODEL_NAME].DBDatabase | [MODEL_NAME].DBDatabase |
dbConnectDriverGLOBAL | dbConnectDriverGLOBAL |
[MODEL_NAME].DBDriver | [MODEL_NAME].DBDriver |
dbConnectHostNameGLOBAL | dbConnectHostNameGLOBAL |
[MODEL_NAME].DBHostName | [MODEL_NAME].DBHostName |
dbConnectJDBCInfoGLOBAL | dbConnectJDBCInfoGLOBAL |
[MODEL_NAME].DBJDBCInfo | [MODEL_NAME].DBJDBCInfo |
dbConnectPasswordGLOBAL | dbConnectPasswordGLOBAL |
[MODEL_NAME].DBPassword | [MODEL_NAME].DBPassword |
[MODEL_NAME].password | [MODEL_NAME].password |
dbConnectPluginGLOBAL | dbConnectPluginGLOBAL |
[MODEL_NAME].DBPlugin | [MODEL_NAME].DBPlugin |
[MODEL_NAME].plugin | [MODEL_NAME].plugin |
dbConnectServerGLOBAL | dbConnectServerGLOBAL |
[MODEL_NAME].DBServer | [MODEL_NAME].DBServer |
dbConnectURLGLOBAL | dbConnectURLGLOBAL |
[MODEL_NAME].URL | [MODEL_NAME].URL |
[MODEL_NAME].serverUrl | [MODEL_NAME].serverUrl |
dbConnectUserGLOBAL | dbConnectUserGLOBAL |
[MODEL_NAME].DBUser | [MODEL_NAME].DBUser |
[MODEL_NAME].username | [MODEL_NAME].username |
dbConnectionRecycleGLOBAL | dbConnectionRecycleGLOBAL |
dbDebugLevelGLOBAL | dbDebugLevelGLOBAL |
dbEOPrototypesEntityGLOBAL | dbEOPrototypesEntityGLOBAL |
dbLogPathGLOBAL | dbLogPathGLOBAL |
dbMaxCheckoutGLOBAL | dbMaxCheckoutGLOBAL |
dbMaxConnectionsGLOBAL | dbMaxConnectionsGLOBAL |
dbMinConnectionsGLOBAL | dbMinConnectionsGLOBAL |
dbRemoveJdbc2InfoGLOBAL | dbRemoveJdbc2InfoGLOBAL |
er.extensions.ERXModelGroup.[ENTITY_NAME].[ATTRIBUTE_NAME].columnName | er.extensions.ERXModelGroup.[ENTITY_NAME].[ATTRIBUTE_NAME].columnName |
er.extensions.ERXModelGroup.[ENTITY_NAME].[ATTRIBUTE_NAME].ignoreTypeMismatch | er.extensions.ERXModelGroup.[ENTITY_NAME].[ATTRIBUTE_NAME].ignoreTypeMismatch |
er.extensions.ERXModelGroup.[ENTITY_NAME].externalName | er.extensions.ERXModelGroup.[ENTITY_NAME].externalName |
er.extensions.ERXModelGroup.flattenPrototypes | defined if the prototypes should get flattened. Default is true. Note: this default value may be incompatible with {@link ERXModel#isUseExtendedPrototypesEnabled}. |
er.extensions.ERXModelGroup.ignoreTypeMismatch | er.extensions.ERXModelGroup.ignoreTypeMismatch |
er.extensions.ERXModelGroup.modelClassName | er.extensions.ERXModelGroup.modelClassName |
er.extensions.ERXModelGroup.modelLoadOrder | defines the load order of the models. When you use this property, the bundle loading will be disregarded. The default returns NSArray.EmptyArray. |
er.extensions.ERXModelGroup.patchModelsOnLoad | a boolean that defines whether the created should be a {@link Model}, not a EOModel. Default is false. |
er.extensions.ERXModelGroup.patchedModelClassName | er.extensions.ERXModelGroup.patchedModelClassName |
er.extensions.ERXModelGroup.prototypeModelName | if defined, overrides the default name, erprototypes.eomodeld. |
er.extensions.ERXModelGroup.prototypeModelNames | defines the names of the models that are prototypes. They get put in front of the model load order. The default is (erprototypes) . |
er.extensions.ERXModelGroup.raiseOnUnmatchingConnectionDictionaries | default is true |
er.extensions.ERXModelGroup.sqlDumpDirectory | er.extensions.ERXModelGroup.sqlDumpDirectory |
[MODEL_NAME].DBConnectionRecycle | [MODEL_NAME].DBConnectionRecycle |
[MODEL_NAME].DBDebugLevel | [MODEL_NAME].DBDebugLevel |
[MODEL_NAME].DBLogPath | [MODEL_NAME].DBLogPath |
[MODEL_NAME].DBMaxCheckout | [MODEL_NAME].DBMaxCheckout |
[MODEL_NAME].DBMaxConnections | [MODEL_NAME].DBMaxConnections |
[MODEL_NAME].DBMinConnections | [MODEL_NAME].DBMinConnections |
[MODEL_NAME].EOPrototypesEntity | [MODEL_NAME].EOPrototypesEntity |
[MODEL_NAME].EOPrototypesFile | [MODEL_NAME].EOPrototypesFile |
[MODEL_NAME].authenticationMethod | [MODEL_NAME].authenticationMethod |
[MODEL_NAME].removeJdbc2Info | [MODEL_NAME].removeJdbc2Info |
Modifier and Type | Class and Description |
---|---|
static class |
ERXModelGroup.LocalizedAttributeProcessor
Processes ERXLanguages attributes.
|
static class |
ERXModelGroup.Model
Extends models by model-specific prototypes.
|
EOModelGroup.ClassDelegate, EOModelGroup.Delegate
Modifier and Type | Field and Description |
---|---|
protected NSArray<String> |
_modelLoadOrder |
protected NSArray<String> |
_prototypeModelNames |
protected static boolean |
flattenPrototypes |
static String |
LANGUAGES_KEY
Key for languages, can be either in properties or in the model object's user info.
|
static String |
ModelGroupAddedNotification
Notification that is sent when the model group was created form the bundle loading.
|
protected static boolean |
patchModelsOnLoad |
protected boolean |
raiseOnUnmatchingConnectionDictionaries |
_delegate, _delegateRespondsTo_classForObjectWithGlobalID, _delegateRespondsTo_failedToLookupClassNamed, _delegateRespondsTo_relationshipFailedToLookupDestinationWithName, _delegateRespondsTo_relationshipForRow, _delegateRespondsTo_subEntityForEntity, _modelsByName, _subEntitiesCache, ModelAddedNotification, ModelInvalidatedNotification
Constructor and Description |
---|
ERXModelGroup()
Default public constructor
|
Modifier and Type | Method and Description |
---|---|
static int |
_enumForKey(String key) |
static boolean |
_isKeyEnumOverriden(EOAttribute att,
int key) |
static Object |
_keyForEnum(int key) |
static NSArray |
_prototypeKeys() |
void |
addModel(EOModel eomodel)
This implementation will load models that have entity name conflicts, removing the offending entity.
|
EOModel |
addModelWithPathURL(URL url)
Overridden to use our model class in the runtime.
|
void |
checkForMismatchedJoinTypes()
Looks for foreign key attributes that have a different type from the destination attribute.
|
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.
|
protected static NSDictionary |
databaseConfigForModel(EOModel model) |
protected static String |
decryptProperty(String key,
String alternateKey) |
int |
entityCode(EOEntity entity)
Looks up the userInfo for the Entity with the specified entityName and returns it if the code could be found.
|
int |
entityCode(String ename)
Looks up the userInfo for the Entity with the specified entityName and returns it if the code could be found.
|
protected void |
fixFlatDictionary(EOModel model) |
protected void |
fixJDBCDictionary(EOModel model) |
protected void |
fixJNDIDictionary(EOModel model)
Similar to fixJDBCDictionary, but for JNDI EOModels.
|
protected void |
fixOpenBaseDictionary(EOModel model) |
protected void |
fixOracleDictionary(EOModel model) |
protected static String |
getProperty(String key,
String alternateKey) |
protected static String |
getProperty(String key,
String alternateKey,
String defaultValue) |
static boolean |
isPrototypeEntity(EOEntity entity)
Returns whether or not the given entity is a prototype.
|
static boolean |
isPrototypeEntityName(String entityName)
Returns whether or not the given entity name is a prototype entity
|
boolean |
isPrototypeModel(EOModel model)
Returns whether the given model is listed as a prototype model in the properties.
|
void |
loadModelsFromLoadedBundles()
The only reason this method is needed is so our model group subclass is used.
|
void |
modelAddedHandler(NSNotification n)
Called when a model is loaded.
|
protected void |
modifyModelsFromProperties()
Modifies various settings of the entities and attributes in this model group based on System properties.
|
static boolean |
patchModelsOnLoad() |
protected void |
preloadERXConstantClassesForModel(EOModel model)
The classes referenced in the ERXConstantClassName field of an attribute's userInfo needs to be
class-loaded before the attribute is used.
|
static String |
prototypeEntityNameForModel(EOModel model) |
void |
resetConnectionDictionaryInModel(EOModel model)
Resets the connection dictionary to the specified values that are in the defaults.
|
static String |
sqlDumpDirectory() |
_addSubEntitiesCache, _childrenForEntityNamed, _registerChildForParent, addModelWithPath, classDelegate, defaultGroup, delegate, entitiesWithSharedObjects, entityForObject, entityNamed, fetchSpecificationNamed, globalModelGroup, loadAllModelObjects, modelGroupForObjectStoreCoordinator, modelNamed, modelNames, models, modelWithPath, modelWithPathURL, removeModel, setClassDelegate, setDefaultGroup, setDelegate, setModelGroupForObjectStoreCoordinator, storedProcedureNamed, toString
public static final String LANGUAGES_KEY
protected static final boolean patchModelsOnLoad
protected static final boolean flattenPrototypes
protected boolean raiseOnUnmatchingConnectionDictionaries
public static final String ModelGroupAddedNotification
public void loadModelsFromLoadedBundles()
public void addModel(EOModel eomodel)
addModel
in class EOModelGroup
eomodel
- model to be addedpublic static String sqlDumpDirectory()
public EOModel addModelWithPathURL(URL url)
addModelWithPathURL
in class EOModelGroup
url
- URL to modelpublic void checkForMismatchedJoinTypes()
public void checkInheritanceRelationships()
public int entityCode(String ename)
ename
- the name from the Entity for which we want to the get entityCodepublic int entityCode(EOEntity entity)
entity
- the Entity for which we want to the get entityCodepublic static boolean patchModelsOnLoad()
public static boolean isPrototypeEntity(EOEntity entity)
entity
- the entity to checkpublic static boolean isPrototypeEntityName(String entityName)
entityName
- entity nametrue
if entity if a prototypepublic void modelAddedHandler(NSNotification n)
n
- notification posted when a model is loaded. The object is the model.protected static String getProperty(String key, String alternateKey, String defaultValue)
protected void fixOracleDictionary(EOModel model)
protected void fixFlatDictionary(EOModel model)
protected void fixOpenBaseDictionary(EOModel model)
protected void fixJNDIDictionary(EOModel model)
model
- the JNDI EOModel to fixName | Description |
---|---|
[modelName].serverUrl | the per-model server URL to set |
[modelName].user | the per-model username to set |
[modelName].password | the per-model password to set |
[modelName].authenticationModel | the per-model authenticationMethod to set |
JNDI.global.serverUrl | the global JNDI serverUrl to use by default |
JNDI.global.username | the global JNDI username to use by default |
JNDI.global.password | the global JNDI password to use by default |
JNDI.global.authenticationMethod | the global JNDI authenticationMethod to use by default |
protected void fixJDBCDictionary(EOModel model)
public boolean isPrototypeModel(EOModel model)
model
- model objecttrue
if model is used for prototypespublic void resetConnectionDictionaryInModel(EOModel model)
<MODELNAME>.DBServer
<MODELNAME>.DBUser
<MODELNAME>.DBPassword
<MODELNAME>.URL (for JDBC)
if the serverName and username both exists, we overwrite the connection dict (password is optional). Otherwise we
fall back to what's in the model.
Likewise default values can be specified of the form:
dbConnectUserGLOBAL
dbConnectPasswordGLOBAL
dbConnectURLGLOBAL
model
- to be resetprotected static NSDictionary databaseConfigForModel(EOModel model)
protected void preloadERXConstantClassesForModel(EOModel model)
model
- the model to load constants forIllegalArgumentException
- if the ERXConstantClassName cannot be resolved.protected void modifyModelsFromProperties()
Name | Description |
---|---|
er.extensions.ERXModelGroup.[entityName].externalName | change the table name for the given entityName |
er.extensions.ERXModelGroup.[entityName].[attributeName].columnName | change the column name for the given attribute |
public static NSArray _prototypeKeys()
public static Object _keyForEnum(int key)
public static int _enumForKey(String key)
public static boolean _isKeyEnumOverriden(EOAttribute att, int key)
Copyright © 2002 – 2024 Project Wonder.