Class BookmarkDB

java.lang.Object
ghidra.program.database.DatabaseObject
ghidra.program.database.bookmark.BookmarkDB
All Implemented Interfaces:
Bookmark, Comparable<Bookmark>

public class BookmarkDB extends DatabaseObject implements Bookmark
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getId

      public long getId()
      Description copied from interface: Bookmark
      Returns the id of the bookmark.
      Specified by:
      getId in interface Bookmark
    • getAddress

      public Address getAddress()
      Description copied from interface: Bookmark
      Returns address at which this bookmark is applied.
      Specified by:
      getAddress in interface Bookmark
    • getType

      public BookmarkType getType()
      Returns bookmark type or null if type has been removed.
      Specified by:
      getType in interface Bookmark
    • getTypeString

      public String getTypeString()
      Description copied from interface: Bookmark
      Returns bookmark type as a string
      Specified by:
      getTypeString in interface Bookmark
    • getCategory

      public String getCategory()
      Description copied from interface: Bookmark
      Returns bookmark category
      Specified by:
      getCategory in interface Bookmark
    • setComment

      public void setComment(String comment)
    • getComment

      public String getComment()
      Description copied from interface: Bookmark
      Returns bookmark comment
      Specified by:
      getComment in interface Bookmark
    • set

      public void set(String category, String comment)
      Description copied from interface: Bookmark
      Set the category and comment associated with a bookmark.
      Specified by:
      set in interface Bookmark
      Parameters:
      category - category
      comment - single line comment
    • 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.
    • refresh

      protected boolean refresh(DBRecord rec)
      Description copied from class: DatabaseObject
      Tells the object to refresh its state from the database using the specified record if not null. NOTE: The default implementation ignores the record and invokes refresh(). Implementations of this method must take care if multiple database tables are used since the record supplied could correspond to another object. In some cases it may be best not to override this method or ignore the record provided.
      Overrides:
      refresh in class DatabaseObject
      Parameters:
      rec - valid record associated with object's key (optional, may be null to force record lookup or other refresh technique)
      Returns:
      true if the object was able to refresh itself. Return false if record is null and 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.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • compareTo

      public int compareTo(Bookmark otherBm)
      Specified by:
      compareTo in interface Comparable<Bookmark>