Class BwCategory

All Implemented Interfaces:
Serializable, Comparable<BwCategory>, Comparator<BwCategory>, CollatableEntity, OwnedEntity, ShareableEntity, SizedEntity, org.bedework.util.logging.Logged

public class BwCategory extends BwEventProperty<BwCategory> implements CollatableEntity, Comparator<BwCategory>, SizedEntity
A category in Bedework. This value object does no consistency or validity checking .
Version:
1.0
See Also:
  • Constructor Details

    • BwCategory

      public BwCategory()
      Constructor
  • Method Details

    • setWord

      public void setWord(BwString val)
      Set the word
      Parameters:
      val - BwString word
    • getWord

      public BwString getWord()
      Get the word
      Returns:
      BwString word
    • deleteWord

      public void deleteWord()
      Delete the category's keyword - this must be called rather than setting the value to null.
    • setDescription

      public void setDescription(BwString val)
      Set the category's description
      Parameters:
      val - BwString category's description
    • getDescription

      public BwString getDescription()
      Get the category's description
      Returns:
      BwString category's description
    • makeCategory

      public static BwCategory makeCategory()
      Returns:
      category with uid filled in.
    • deleteDescription

      public void deleteDescription()
      Delete the category's description - this must be called rather than setting the value to null.
    • setName

      public void setName(String val)
      Set the category's name (indexer)
      Parameters:
      val - String name
    • getName

      public String getName()
      Get the category's name
      Returns:
      name
    • getFinderKeyValue

      public BwString getFinderKeyValue()
      Specified by:
      getFinderKeyValue in class BwEventProperty<BwCategory>
      Returns:
      Finder Key value from this object.
    • getCollateValue

      public String getCollateValue()
      Description copied from interface: CollatableEntity
      Get the value to collate with
      Specified by:
      getCollateValue in interface CollatableEntity
      Returns:
      String collation value
    • afterDeletion

      public void afterDeletion()
      Description copied from class: BwDbentity
      Called after delete from the db
      Overrides:
      afterDeletion in class BwDbentity<BwCategory>
    • getSize

      public int getSize()
      Size to use for quotas.
      Specified by:
      getSize in interface SizedEntity
      Returns:
      int
    • setWordVal

      public void setWordVal(String val)
      Parameters:
      val - new category
    • getWordVal

      public String getWordVal()
      Returns:
      String
    • setDescriptionVal

      public void setDescriptionVal(String val)
      Parameters:
      val - new description value
    • getDescriptionVal

      public String getDescriptionVal()
      Returns:
      String
    • setStatus

      public void setStatus(String val)
    • getStatus

      public String getStatus()
      Specified by:
      getStatus in class BwEventProperty<BwCategory>
      Returns:
      String
    • length

      public int length()
      Size to use for quotas.
      Overrides:
      length in class BwDbentity<BwCategory>
      Returns:
      int
    • updateFrom

      public boolean updateFrom(BwCategory cat)
      Parameters:
      cat - the other one
      Returns:
      true if anything changed
    • toJson

      public void toJson(com.fasterxml.jackson.core.JsonGenerator jgen)
    • getRestoreCallback

      public static org.bedework.util.xml.FromXmlCallback getRestoreCallback()
    • compare

      public int compare(BwCategory o1, BwCategory o2)
      Specified by:
      compare in interface Comparator<BwCategory>
    • compareTo

      public int compareTo(BwCategory that)
      Specified by:
      compareTo in interface Comparable<BwCategory>
      Overrides:
      compareTo in class BwUnversionedDbentity<BwCategory>
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class BwUnversionedDbentity<BwCategory>
    • toString

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

      public Object clone()
      Description copied from class: BwUnversionedDbentity
      Make visible
      Overrides:
      clone in class BwUnversionedDbentity<BwCategory>
      Returns:
      Object of class T