if (!connectionDictionary.isEmpty()) {
if (connectionDictionary != null && !connectionDictionary.isEmpty()) {
	public void loadFromFolder(File _modelFolder, Set _failures) throws EOModelException, IOException {		File indexFile = new File(_modelFolder, "index.eomodeld");		if (!indexFile.exists()) {			throw new EOModelException(indexFile + " does not exist.");		}		myModelFolder = _modelFolder;		Map rawModelMap = (Map) PropertyListSerialization.propertyListFromFile(indexFile, new EOModelParserDataStructureFactory());		if (rawModelMap == null) {			throw new EOModelException(indexFile + " is corrupted.");		}		EOModelMap modelMap = new EOModelMap(rawModelMap);		myModelMap = modelMap;		Object version = modelMap.get("EOModelVersion");		if (version instanceof String) {			myVersion = (String) version;		} else if (version instanceof Number) {			myVersion = String.valueOf(((Number) version).floatValue());		} else {			throw new IllegalArgumentException("Unknown version format:" + version);		}		myAdaptorName = modelMap.getString("adaptorName", true);		loadUserInfo(modelMap);		Set entities = modelMap.getSet("entities");		if (entities != null) {			Iterator entitiesIter = entities.iterator();			while (entitiesIter.hasNext()) {				EOModelMap entityMap = new EOModelMap((Map) entitiesIter.next());				String entityName = entityMap.getString("name", true);				EOEntity entity = new EOEntity();				File entityFile = new File(_modelFolder, entityName + ".plist");				if (entityFile.exists()) {					entity.loadFromFile(entityFile, _failures);					File fspecFile = new File(_modelFolder, entityName + ".fspec");					if (fspecFile.exists()) {						entity.loadFetchSpecsFromFile(fspecFile, _failures);					}					addEntity(entity, false, _failures);				} else {					_failures.add(new EOModelVerificationFailure("The entity file " + entityFile.getAbsolutePath() + " was missing."));				}			}		}		Set storedProcedureNames = modelMap.getSet("storedProcedures");		if (storedProcedureNames != null) {			Iterator storedProcedureNamesIter = storedProcedureNames.iterator();			while (storedProcedureNamesIter.hasNext()) {				String storedProcedureName = (String) storedProcedureNamesIter.next();				EOStoredProcedure storedProcedure = new EOStoredProcedure();				File storedProcedureFile = new File(_modelFolder, storedProcedureName + ".storedProcedure");				if (storedProcedureFile.exists()) {					storedProcedure.loadFromFile(storedProcedureFile, _failures);					addStoredProcedure(storedProcedure, false, _failures);				} else {					_failures.add(new EOModelVerificationFailure("The stored procedure file " + storedProcedureFile.getAbsolutePath() + " was missing."));				}			}		}		Map internalInfoMap = modelMap.getMap("internalInfo");		if (internalInfoMap != null) {			Set deletedEntityNamesInObjectStore = modelMap.getSet("_deletedEntityNamesInObjectStore", true);			if (deletedEntityNamesInObjectStore != null) {				myDeletedEntityNamesInObjectStore = deletedEntityNamesInObjectStore;			}		}		EOModelMap entityModelerMap = new EOModelMap((Map) getUserInfo().get(EOModel.ENTITY_MODELER_KEY));		Map databaseConfigs = entityModelerMap.getMap("databaseConfigs");		if (databaseConfigs != null) {			Iterator databaseConfigsIter = databaseConfigs.entrySet().iterator();			while (databaseConfigsIter.hasNext()) {				Map.Entry databaseConfigEntry = (Map.Entry) databaseConfigsIter.next();				String name = (String) databaseConfigEntry.getKey();				EODatabaseConfig databaseConfig = new EODatabaseConfig(name);				databaseConfig.loadFromMap(new EOModelMap((Map) databaseConfigEntry.getValue()), _failures);				addDatabaseConfig(databaseConfig, false, _failures);			}		}		EODatabaseConfig activeDatabaseConfig = null; 		String activeDatabaseConfigName = entityModelerMap.getString("activeDatabaseConfigName", false);		if (activeDatabaseConfigName != null) {			activeDatabaseConfig = getDatabaseConfigNamed(activeDatabaseConfigName);		}		// If there is a connection dictionary, then look for a database config that is equivalent ...		Map connectionDictionary = modelMap.getMap("connectionDictionary", true);		if (!connectionDictionary.isEmpty()) {			EODatabaseConfig tempConnectionDictionaryDatabaseConfig = _createDatabaseConfig(connectionDictionary);			EODatabaseConfig connectionDictionaryDatabaseConfig = null; 			Iterator databaseConfigsIter = myDatabaseConfigs.iterator();			while (connectionDictionaryDatabaseConfig == null && databaseConfigsIter.hasNext()) {				EODatabaseConfig databaseConfig = (EODatabaseConfig)databaseConfigsIter.next();				if (tempConnectionDictionaryDatabaseConfig.isEquivalent(databaseConfig)) {					connectionDictionaryDatabaseConfig = databaseConfig;				}			}			// if one isn't found, then make a new database config based off the connection dictionary 			if (connectionDictionaryDatabaseConfig == null) {				connectionDictionaryDatabaseConfig = tempConnectionDictionaryDatabaseConfig;				addDatabaseConfig(connectionDictionaryDatabaseConfig, false, _failures);			}			// if the identified active database config isn't the connection dictionary config, then			// change the active config to the connection dictionary config			if (activeDatabaseConfig != connectionDictionaryDatabaseConfig) {				activeDatabaseConfig = connectionDictionaryDatabaseConfig;			}		}		// try to always have at least one active database config		if (activeDatabaseConfig == null && !myDatabaseConfigs.isEmpty()) {			activeDatabaseConfig = (EODatabaseConfig)myDatabaseConfigs.iterator().next();		}		if (activeDatabaseConfig != null) {			if (ComparisonUtils.equals(activeDatabaseConfig.getName(), activeDatabaseConfigName)) {				myActiveDatabaseConfig = activeDatabaseConfig;				}			else {				setActiveDatabaseConfig(activeDatabaseConfig);			}		}	}