Class CMSCategory

java.lang.Object
io.goobi.viewer.model.cms.CMSCategory
All Implemented Interfaces:
Serializable, Comparable<CMSCategory>

@Entity public class CMSCategory extends Object implements Comparable<CMSCategory>, Serializable
Represents a category tag that can be assigned to CMS pages and media items for grouping.
Author:
Florian Alpers
See Also:
  • Constructor Details

    • CMSCategory

      public CMSCategory()
      Creates a new CMSCategory instance.
    • CMSCategory

      public CMSCategory(String name)
      Creates a new CMSCategory instance.
      Parameters:
      name - display name for this category
    • CMSCategory

      public CMSCategory(CMSCategory blueprint, boolean keepId)
      Creates a new CMSCategory instance.
      Parameters:
      blueprint - category to copy fields from
      keepId - true to retain the original database ID; false to clear it
  • Method Details

    • isInUse

      public boolean isInUse() throws DAOException
      Returns:
      true if there are CMS pages or media using this category; false otherwise
      Throws:
      DAOException
    • getId

      public Long getId()
      Getter for the field id.
      Returns:
      the database primary key of this category
    • setId

      public void setId(Long id)
      Setter for the field id.
      Parameters:
      id - the database ID to set
    • getName

      public String getName()
      Getter for the field name.
      Returns:
      the unique name identifier of this CMS category
    • setName

      public void setName(String name)
      Setter for the field name.
      Parameters:
      name - the unique name identifier of this CMS category
    • getDescription

      public String getDescription()
      Getter for the field description.
      Returns:
      the optional human-readable description of this CMS category
    • setDescription

      public void setDescription(String description)
      Setter for the field description.
      Parameters:
      description - an optional human-readable description of this CMS category
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

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

      public int compareTo(CMSCategory other)
      Specified by:
      compareTo in interface Comparable<CMSCategory>