private void initializeAdapters(OpenMode openMode, TaskMonitor monitor)
			throws CancelledException, IOException, VersionException {

		DBHandle handle = treeMgr.getDatabaseHandle();

		VersionException versionExc = null;

		try {
			parentChildAdapter = ParentChildDBAdapter.getAdapter(handle, openMode, treeID);
		}
		catch (VersionException e) {
			versionExc = e.combine(versionExc);
		}
		try {
			// ParentChildDBAdapter must be available for upgrade use
			moduleAdapter = ModuleDBAdapter.getAdapter(this, openMode, monitor);
		}
		catch (VersionException e) {
			versionExc = e.combine(versionExc);
		}
		try {
			fragmentAdapter = FragmentDBAdapter.getAdapter(handle, openMode, treeID);
		}
		catch (VersionException e) {
			versionExc = e.combine(versionExc);
		}

		if (addrMap.isUpgraded()) {
			if (openMode == OpenMode.UPDATE) {
				versionExc = (new VersionException(true)).combine(versionExc);
			}
			else if (openMode == OpenMode.UPGRADE) {
				addressUpgrade(handle, monitor);
			}
		}

		fragMap = new AddressRangeMapDB(handle, addrMap, lock, getFragAddressTableName(treeID),
			errHandler, LongField.INSTANCE, true);

		if (versionExc != null) {
			throw versionExc;
		}
	}
Construct a program tree module manager
@param treeMgr program tree manager
@param rec program tree record
@param openMode the mode this adapter is to be opened for (CREATE, UPDATE, READ_ONLY, UPGRADE).
@param monitor task monitor
@throws IOException if a database IO error occurs
@throws CancelledException if monitor cancelled (upgrade case only)
@throws VersionException if opening an existing program tree and an underlying table 
schema version differs from the expected version.
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/module/ModuleManager.java