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 int
compareTo(Bookmark otherBm)
Address
getAddress()
Returns address at which this bookmark is applied.java.lang.String
getCategory()
Returns bookmark categoryjava.lang.String
getComment()
Returns bookmark commentlong
getId()
Returns the id of the bookmark.BookmarkType
getType()
Returns bookmark type or null if type has been removed.java.lang.String
getTypeString()
Returns bookmark type as a stringint
hashCode()
protected boolean
refresh()
Tells the object to refresh its state from the database.protected boolean
refresh(DBRecord rec)
Tells the object to refresh its state from the database using the specified record if not null.void
set(java.lang.String category, java.lang.String comment)
Set the category and comment associated with a bookmark.void
setComment(java.lang.String comment)
java.lang.String
toString()
-
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:
toString
in classjava.lang.Object
-
getId
public long getId()
Description copied from interface:Bookmark
Returns the id of the bookmark.
-
getAddress
public Address getAddress()
Description copied from interface:Bookmark
Returns address at which this bookmark is applied.- Specified by:
getAddress
in 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:Bookmark
Returns bookmark type as a string- Specified by:
getTypeString
in interfaceBookmark
-
getCategory
public java.lang.String getCategory()
Description copied from interface:Bookmark
Returns bookmark category- Specified by:
getCategory
in interfaceBookmark
-
setComment
public void setComment(java.lang.String comment)
-
getComment
public java.lang.String getComment()
Description copied from interface:Bookmark
Returns bookmark comment- Specified by:
getComment
in interfaceBookmark
-
set
public void set(java.lang.String category, java.lang.String comment)
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
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 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:
hashCode
in classjava.lang.Object
-
-