static EnumValueDBAdapter getAdapter(DBHandle handle, OpenMode openMode, String tablePrefix,
			TaskMonitor monitor) throws VersionException, IOException, CancelledException {
		if (openMode == OpenMode.CREATE) {
			return new EnumValueDBAdapterV1(handle, tablePrefix, true);
		}
		try {
			return new EnumValueDBAdapterV1(handle, tablePrefix, false);
		}
		catch (VersionException e) {
			if (!e.isUpgradable() || openMode == OpenMode.UPDATE) {
				throw e;
			}
			EnumValueDBAdapter adapter = findReadOnlyAdapter(handle);
			if (openMode == OpenMode.UPGRADE) {
				adapter = upgrade(handle, adapter, tablePrefix, monitor);
			}
			return adapter;
		}
	}
Gets an adapter for working with the enumeration data type values database table. The adapter is based
on the version of the database associated with the specified database handle and the openMode.
@param handle handle to the database to be accessed.
@param openMode the mode this adapter is to be opened for (CREATE, UPDATE, READ_ONLY, UPGRADE).
@param tablePrefix prefix to be used with default table name
@param monitor the monitor to use for displaying status or for canceling.
@return the adapter for accessing the table of enumeration data type values.
@throws VersionException if the database handle's version doesn't match the expected version.
@throws IOException if there is trouble accessing the database.
@throws CancelledException if task is cancelled
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/data/EnumValueDBAdapter.java