Package ghidra.program.database.bookmark
Class BookmarkDB
java.lang.Object
ghidra.program.database.DatabaseObject
ghidra.program.database.bookmark.BookmarkDB
- All Implemented Interfaces:
Bookmark
,Comparable<Bookmark>
-
Field Summary
Fields inherited from class ghidra.program.database.DatabaseObject
key
-
Method Summary
Modifier and TypeMethodDescriptionint
Returns address at which this bookmark is applied.Returns bookmark categoryReturns bookmark commentlong
getId()
Returns the id of the bookmark.getType()
Returns bookmark type or null if type has been removed.Returns bookmark type as a stringint
hashCode()
protected boolean
refresh()
Tells the object to refresh its state from the database.protected boolean
Tells the object to refresh its state from the database using the specified record if not null.void
Set the category and comment associated with a bookmark.void
setComment
(String comment) toString()
Methods inherited from class ghidra.program.database.DatabaseObject
checkDeleted, checkIsValid, checkIsValid, getKey, isDeleted, isInvalid, keyChanged, setDeleted, setInvalid, validate
-
Method Details
-
toString
-
getId
public long getId()Description copied from interface:Bookmark
Returns the id of the bookmark. -
getAddress
Description copied from interface:Bookmark
Returns address at which this bookmark is applied.- Specified by:
getAddress
in interfaceBookmark
-
getType
Returns bookmark type or null if type has been removed. -
getTypeString
Description copied from interface:Bookmark
Returns bookmark type as a string- Specified by:
getTypeString
in interfaceBookmark
-
getCategory
Description copied from interface:Bookmark
Returns bookmark category- Specified by:
getCategory
in interfaceBookmark
-
setComment
-
getComment
Description copied from interface:Bookmark
Returns bookmark comment- Specified by:
getComment
in interfaceBookmark
-
set
Description copied from interface:Bookmark
Set the category and comment associated with a bookmark. -
refresh
protected boolean refresh()Description copied from class:DatabaseObject
Tells the object to refresh its state from the database.- Specified by:
refresh
in 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
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 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() -
compareTo
- Specified by:
compareTo
in interfaceComparable<Bookmark>
-