protected void setProgramArchitecture(ProgramArchitecture programArchitecture,
			VariableStorageManager variableStorageMgr, boolean store, TaskMonitor monitor)
			throws IOException, CancelledException {

		this.programArchitecture = programArchitecture;
		this.variableStorageMgr = programArchitecture != null ? variableStorageMgr : null;

		dataOrganization = programArchitecture != null
				? programArchitecture.getCompilerSpec().getDataOrganization()
				: DataOrganizationImpl.getDefaultOrganization();

		if (store) {
			try {
				compilerSpecChanged(monitor);
				updateLastChangeTime();
			}
			finally {
				invalidateCache();
			}
		}
	}
Set the architecture-specific details associated with this datatype manager.
The data organization will be obtained from the compiler spec specified by
the program architecture.  Fixup of all composites will be performed, if store is
true, to reflect any changes in the data organization.
The caller is resposible for ensuring that this setting is done consistent 
with the {@link #addrMap} setting used during construction if applicable.
<br>
If not storing caller may need to check for data organization change to communicate
change or to facilitate an upgrade situation.

@param programArchitecture program architecture details (may be null) in which case
default data organization will be used.
@param variableStorageMgr variable storage manager (within same database) or null
to disable variable storage support.  Ignored if programArchitecture is null;
@param store if true database update will occur and datatypes will be updated if
any change to the data organization is detected (a stored copy may be used to
detect this condition).  This should never be passed as true if opened read-only.
This should be false during create mode where only the state is affected without 
changing the Database or existing datatypes.
@param monitor task monitor
@throws IOException if IO error occurs
@throws CancelledException if processing cancelled - data types may not properly reflect
updated compiler specification
@throws UnsupportedOperationException if language was previously set
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/data/DataTypeManagerDB.java