Package ghidra.program.database.data

# Class SourceArchiveDB

java.lang.Object
ghidra.program.database.DatabaseObject
ghidra.program.database.data.SourceArchiveDB

All Implemented Interfaces:
  `SourceArchive`

public class SourceArchiveDB extends DatabaseObject implements SourceArchive

- ## Field Summary

  ### Fields inherited from class ghidra.program.database.DatabaseObject

  `key`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SourceArchiveDB(DataTypeManagerDB dtMgr, DBObjectCache<SourceArchiveDB> cache, ghidra.program.database.data.SourceArchiveAdapter adapter, DBRecord record)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `ArchiveType`
  `getArchiveType()`
  Gets an indicator for the type of data type archive.
  `String`
  `getDomainFileID()`
  Gets the ID used to uniquely identify the domain file for the data type archive.
  `long`
  `getLastSyncTime()`
  Returns the last time that this source archive was synchronized to the containing DataTypeManager.
  `String`
  `getName()`
  Returns the name of the source archive
  `UniversalID`
  `getSourceArchiveID()`
  Gets the ID that the program has associated with the data type archive.
  `boolean`
  `isDirty()`
  Returns true if at least one data type that originally came from this source archive has been changed.
  `protected boolean`
  `refresh()`
  Tells the object to refresh its state from the database.
  `void`
  `setDirtyFlag(boolean isDirty)`
  Sets the dirty flag to indicate if at least one data type that originally came from the associated source archive has been changed since the last time the containing DataTypeManager was synchronized with it.
  `void`
  `setLastSyncTime(long syncTime)`
  Sets the last time that this source archive was synchronized to the containing DataTypeManager.
  `void`
  `setName(String newName)`
  Sets the name of the source archive associated with this SourceArchive object.
  `String`
  `toString()`

  ### Methods inherited from class ghidra.program.database.DatabaseObject

  `checkDeleted, checkIsValid, checkIsValid, getKey, isDeleted, isInvalid, keyChanged, refresh, setDeleted, setInvalid, validate`

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

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

- ## Constructor Details

  - ### SourceArchiveDB

    public SourceArchiveDB(DataTypeManagerDB dtMgr, DBObjectCache<SourceArchiveDB> cache, ghidra.program.database.data.SourceArchiveAdapter adapter, DBRecord record)

- ## Method Details

  - ### getSourceArchiveID

    public UniversalID getSourceArchiveID()
    Gets the ID that the program has associated with the data type archive.
    Specified by:
      `getSourceArchiveID` in interface `SourceArchive`
    Returns:
      the data type archive ID

  - ### getDomainFileID

    public String getDomainFileID()
    Gets the ID used to uniquely identify the domain file for the data type archive.
    Specified by:
      `getDomainFileID` in interface `SourceArchive`
    Returns:
      the domain file identifier

  - ### getArchiveType

    public ArchiveType getArchiveType()
    Gets an indicator for the type of data type archive. (PROGRAM_TYPE, PROJECT_TYPE, FILE_TYPE)
    Specified by:
      `getArchiveType` in interface `SourceArchive`
    Returns:
      the type

  - ### getName

    public String getName()
    Description copied from interface: `SourceArchive`
    Returns the name of the source archive
    Specified by:
      `getName` in interface `SourceArchive`
    Returns:
      the name of the source archive.

  - ### refresh

    protected boolean refresh()
    Description copied from class: `DatabaseObject`
    Tells the object to refresh its state from the database.
    Specified by:
      `refresh` in class `DatabaseObject`
    Returns:
      true if the object was able to refresh itself. Return false if the object was deleted. Objects that extend this class must implement a refresh method. If an object can never refresh itself, then it should always return false.

  - ### getLastSyncTime

    public long getLastSyncTime()
    Description copied from interface: `SourceArchive`
    Returns the last time that this source archive was synchronized to the containing DataTypeManager.
    Specified by:
      `getLastSyncTime` in interface `SourceArchive`
    Returns:
      the last time that this source archive was synchronized to the containing DataTypeManager.

  - ### isDirty

    public boolean isDirty()
    Description copied from interface: `SourceArchive`
    Returns true if at least one data type that originally came from this source archive has been changed.
    Specified by:
      `isDirty` in interface `SourceArchive`
    Returns:
      true if at least one data type that originally came from this source archive has been changed.

  - ### setLastSyncTime

    public void setLastSyncTime(long syncTime)
    Description copied from interface: `SourceArchive`
    Sets the last time that this source archive was synchronized to the containing DataTypeManager.
    Specified by:
      `setLastSyncTime` in interface `SourceArchive`
    Parameters:
      `syncTime` - the last time that this source archive was synchronized to the containing DataTypeManager.

  - ### setDirtyFlag

    public void setDirtyFlag(boolean isDirty)
    Description copied from interface: `SourceArchive`
    Sets the dirty flag to indicate if at least one data type that originally came from the associated source archive has been changed since the last time the containing DataTypeManager was synchronized with it.
    Specified by:
      `setDirtyFlag` in interface `SourceArchive`
    Parameters:
      `isDirty` - true means at least one data type that originally came from this source archive has been changed.

  - ### setName

    public void setName(String newName)
    Description copied from interface: `SourceArchive`
    Sets the name of the source archive associated with this SourceArchive object.
    Specified by:
      `setName` in interface `SourceArchive`
    Parameters:
      `newName` - the name of the associated source archive.

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`