Package ghidra.program.database.properties

# Class ObjectPropertyMapDB<T extends Saveable>

java.lang.Object
ghidra.program.database.properties.PropertyMapDB<T>
ghidra.program.database.properties.ObjectPropertyMapDB<T>

Type Parameters:
  `T` - `Saveable` property value type

All Implemented Interfaces:
  `ObjectPropertyMap<T>`, `PropertyMap<T>`

public class ObjectPropertyMapDB<T extends Saveable> extends PropertyMapDB<T> implements ObjectPropertyMap<T>
Property manager that deals with properties that are of a `Saveable` Object type and store within a database table.

- ## Field Summary

  ### Fields inherited from class ghidra.program.database.properties.PropertyMapDB

  `addrMap, cache, changeMgr, dbHandle, DEFAULT_CACHE_SIZE, errHandler, lock, name, NO_SCHEMA_FIELD_NAMES, NO_SCHEMA_FIELDS, PROPERTY_VALUE_COL, propertyTable, schema, SCHEMA_FIELD_NAMES`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ObjectPropertyMapDB(DBHandle dbHandle, int openMode, ErrorHandler errHandler, ChangeManager changeMgr, AddressMap addrMap, String name, Class<T> saveableObjectClass, TaskMonitor monitor, boolean supportsPrivate)`
  Construct an Saveable object property map.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `add(Address addr, T value)`
  Add an object value at the specified address.
  `protected void`
  `createTable()`
  Create the necessary table(s) to support this property.
  `T`
  `get(Address addr)`
  Returns the property value stored at the specified address or null if no property found.
  `static Class<? extends Saveable>`
  `getSaveableClassForName(String classPath)`
  Returns the class for the indicated class path name.
  `Class<T>`
  `getValueClass()`
  Returns property value class.

  ### Methods inherited from class ghidra.program.database.properties.PropertyMapDB

  `createTable, delete, getAddressKeyIterator, getAddressKeyIterator, getAddressKeyIterator, getFirstPropertyAddress, getLastPropertyAddress, getName, getNextPropertyAddress, getPreviousPropertyAddress, getPropertyIterator, getPropertyIterator, getPropertyIterator, getPropertyIterator, getPropertyIterator, getPropertyIterator, getSize, getTableName, getTableName, hasProperty, intersects, intersects, invalidateCache, moveRange, remove, removeRange, setCacheSize`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface ghidra.program.model.util.ObjectPropertyMap

  `add`

  ### Methods inherited from interface ghidra.program.model.util.PropertyMap

  `getFirstPropertyAddress, getLastPropertyAddress, getName, getNextPropertyAddress, getPreviousPropertyAddress, getPropertyIterator, getPropertyIterator, getPropertyIterator, getPropertyIterator, getPropertyIterator, getPropertyIterator, getSize, hasProperty, intersects, intersects, moveRange, remove, removeRange`

- ## Constructor Details

  - ### ObjectPropertyMapDB

    public ObjectPropertyMapDB(DBHandle dbHandle, int openMode, ErrorHandler errHandler, ChangeManager changeMgr, AddressMap addrMap, String name, Class<T> saveableObjectClass, TaskMonitor monitor, boolean supportsPrivate) throws VersionException, CancelledException, IOException
    Construct an Saveable object property map.
    Parameters:
      `dbHandle` - database handle.
      `openMode` - the mode that the program was opened in.
      `errHandler` - database error handler.
      `changeMgr` - change manager for event notification
      `addrMap` - address map.
      `name` - property name.
      `saveableObjectClass` - saveable implementation class
      `monitor` - progress monitor that is only used when upgrading
      `supportsPrivate` - if private saveable changes should not be broadcast
    Throws:
      `CancelledException` - if the user cancels the upgrade operation.
      `IOException` - if a database io error occurs.
      `VersionException` - the map version is incompatible with the current Saveable object class version. This will never be thrown if upgrade is true.

- ## Method Details

  - ### getSaveableClassForName

    public static Class<? extends Saveable> getSaveableClassForName(String classPath)
    Returns the class for the indicated class path name. If the class can't be determined, the GenericSaveable class is returned.
    Parameters:
      `classPath` - the class path name of the desired class.
    Returns:
      the class or a GenericSaveable.

  - ### add

    public void add(Address addr, T value)
    Description copied from interface: `ObjectPropertyMap`
    Add an object value at the specified address.
    Specified by:
      `add` in interface `ObjectPropertyMap<T extends Saveable>`
    Parameters:
      `addr` - address for the property
      `value` - value of the property

  - ### getValueClass

    public Class<T> getValueClass()
    Description copied from interface: `PropertyMap`
    Returns property value class.
    Specified by:
      `getValueClass` in interface `PropertyMap<T extends Saveable>`
    Returns:
      property value class or null for an unsupported map type

  - ### get

    public T get(Address addr)
    Description copied from interface: `PropertyMap`
    Returns the property value stored at the specified address or null if no property found.
    Specified by:
      `get` in interface `PropertyMap<T extends Saveable>`
    Parameters:
      `addr` - property address
    Returns:
      property value

  - ### createTable

    protected void createTable()
    Create the necessary table(s) to support this property. Schema will vary depending upon Saveable object.