@Override
	public void add(ProgramModule module)
			throws CircularDependencyException, DuplicateGroupException {

		lock.acquire();
		try {
			checkDeleted();
			ModuleDB moduleDB = (ModuleDB) module;
			long moduleID = moduleDB.getKey();

			DBRecord parentChildRecord = parentChildAdapter.getParentChildRecord(key, moduleID);
			if (parentChildRecord != null) {
				throw new DuplicateGroupException(
					module.getName() + " already exists a child of " + getName());
			}
			if (moduleMgr.isDescendant(key, moduleID)) {
				throw new CircularDependencyException(
					getName() + " is already a descendant of " + module.getName());
			}

			DBRecord pcRec = parentChildAdapter.addParentChildRecord(key, moduleID);
			updateChildCount(1);
			updateOrderField(pcRec, childCount - 1);
			moduleMgr.moduleAdded(key, module);
		}
		catch (IOException e) {
			moduleMgr.dbError(e);
		}
		finally {
			lock.release();
		}
	}
Constructor
@param moduleMgr module manager
@param cache ModuleDB cache
@param record database record for this module
@throws IOException if database IO error occurs
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/module/ModuleDB.java