private PropertyMap<?> getPropertyMap(String owner, String propertyName, int propertyType,
			Class<?> saveableClass, boolean create) throws PropertyTypeMismatchException {

		try {
			for (Field key : registryTable.findRecords(new StringField(owner),
				PROPERTY_OWNER_COL)) {
				DBRecord rec = registryTable.getRecord(key);
				if (propertyName.equals(rec.getString(PROPERTY_NAME_COL))) {
					int type = rec.getIntValue(PROPERTY_TYPE_COL);
					if (propertyType != type) {
						throw new PropertyTypeMismatchException(
							"'" + propertyName + "' is type " + PROPERTY_TYPES[type]);
					}
					if (propertyType == PROPERTY_TYPE_SAVEABLE) {
						String className = rec.getString(PROPERTY_CLASS_COL);
						if (!className.equals(saveableClass.getName())) {
							throw new PropertyTypeMismatchException(
								"'" + propertyName + "' is class " + className);
						}
					}
					return getPropertyMap(rec);
				}
			}

			if (!create) {
				return null;
			}

			long key = registryTable.getKey();
			DBRecord rec = REGISTRY_SCHEMA.createRecord(key);
			rec.setString(PROPERTY_OWNER_COL, owner);
			rec.setString(PROPERTY_NAME_COL, propertyName);
			rec.setIntValue(PROPERTY_TYPE_COL, propertyType);
			if (saveableClass != null) {
				rec.setString(PROPERTY_CLASS_COL, saveableClass.getName());
			}
			PropertyMap<?> map = null;
			boolean success = false;
			try {
				map = getPropertyMap(rec);
				registryTable.putRecord(rec);
				if (propertyMapOwners != null) {
					propertyMapOwners.add(owner);
				}
				success = true;
			}
			finally {
				if (!success && map != null) {
					propertyMaps.remove(key);
				}
			}
			return map;

		}
		catch (IOException e) {
			dbError(e);
		}
		return null;
	}
Translate language
@param translator language translator, if null only re-disassembly will occur.
@param monitor task monitor
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/ProgramUserDataDB.java