Package ghidra.program.database.bookmark
Class BookmarkDB
- java.lang.Object
-
- ghidra.program.database.DatabaseObject
-
- ghidra.program.database.bookmark.BookmarkDB
-
public class BookmarkDB extends DatabaseObject implements Bookmark
-
-
Field Summary
-
Fields inherited from class ghidra.program.database.DatabaseObject
key
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(Bookmark otherBm)AddressgetAddress()Returns address at which this bookmark is applied.java.lang.StringgetCategory()Returns bookmark categoryjava.lang.StringgetComment()Returns bookmark commentlonggetId()Returns the id of the bookmark.BookmarkTypegetType()Returns bookmark type or null if type has been removed.java.lang.StringgetTypeString()Returns bookmark type as a stringinthashCode()protected booleanrefresh()Tells the object to refresh its state from the database.protected booleanrefresh(Record rec)Tells the object to refresh its state from the database using the specified record if not null.voidset(java.lang.String category, java.lang.String comment)Set the category and comment associated with a bookmark.voidsetComment(java.lang.String comment)java.lang.StringtoString()-
Methods inherited from class ghidra.program.database.DatabaseObject
checkDeleted, checkIsValid, checkIsValid, getKey, isDeleted, isInvalid, keyChanged, setInvalid, validate
-
-
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getId
public long getId()
Description copied from interface:BookmarkReturns the id of the bookmark.
-
getAddress
public Address getAddress()
Description copied from interface:BookmarkReturns address at which this bookmark is applied.- Specified by:
getAddressin interfaceBookmark
-
getType
public BookmarkType getType()
Returns bookmark type or null if type has been removed.
-
getTypeString
public java.lang.String getTypeString()
Description copied from interface:BookmarkReturns bookmark type as a string- Specified by:
getTypeStringin interfaceBookmark
-
getCategory
public java.lang.String getCategory()
Description copied from interface:BookmarkReturns bookmark category- Specified by:
getCategoryin interfaceBookmark
-
setComment
public void setComment(java.lang.String comment)
-
getComment
public java.lang.String getComment()
Description copied from interface:BookmarkReturns bookmark comment- Specified by:
getCommentin interfaceBookmark
-
set
public void set(java.lang.String category, java.lang.String comment)Description copied from interface:BookmarkSet the category and comment associated with a bookmark.
-
refresh
protected boolean refresh()
Description copied from class:DatabaseObjectTells the object to refresh its state from the database.- Specified by:
refreshin classDatabaseObject- 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(Record rec)
Description copied from class:DatabaseObjectTells 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:
refreshin classDatabaseObject- 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:
hashCodein classjava.lang.Object
-
-