Class BookmarkDB

    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.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 java.lang.String getTypeString()
        Description copied from interface: Bookmark
        Returns bookmark type as a string
        Specified by:
        getTypeString in interface Bookmark
      • getCategory

        public java.lang.String getCategory()
        Description copied from interface: Bookmark
        Returns bookmark category
        Specified by:
        getCategory in interface Bookmark
      • 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 interface Bookmark
      • 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.
        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​(Record 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 java.lang.Object
      • compareTo

        public int compareTo​(Bookmark otherBm)
        Specified by:
        compareTo in interface java.lang.Comparable<Bookmark>