Class TitleContentMapping

java.lang.Object
com.atlassian.core.bean.EntityObject
com.atlassian.confluence.core.AnnotatedEntityObject
com.atlassian.confluence.links.TitleContentMapping
All Implemented Interfaces:
Serializable, Cloneable

@Entity public class TitleContentMapping extends AnnotatedEntityObject
This class represents a mapping between a title and a content ID. It extends AnnotatedEntityObject, which provides base functionality for entities in the system.
See Also:
  • Constructor Details

    • TitleContentMapping

      public TitleContentMapping()
      Default constructor. Required for Hibernate or other frameworks that use reflection to create objects.
    • TitleContentMapping

      public TitleContentMapping(String title, Long contentid)
      Parameterized constructor to initialize the title and content ID.
      Parameters:
      title - The title to be associated with this mapping.
      contentid - The content ID to be associated with this mapping.
  • Method Details

    • getId

      public long getId()
      Gets the unique identifier for this mapping.
      Overrides:
      getId in class com.atlassian.core.bean.EntityObject
      Returns:
      The ID of this mapping.
    • getTitle

      public String getTitle()
      Gets the title associated with this mapping.
      Returns:
      The title of this mapping.
    • getContentId

      public Long getContentId()
      Gets the content ID associated with this mapping.
      Returns:
      The content ID of this mapping, or null if not set.
    • setId

      public void setId(long id)
      Sets the unique identifier for this mapping.
      Overrides:
      setId in class com.atlassian.core.bean.EntityObject
      Parameters:
      id - The ID to set.
    • setContentId

      public void setContentId(Long contentId)
      Sets the content ID associated with this mapping.
      Parameters:
      contentId - The content ID to set.
    • setTitle

      public void setTitle(String title)
      Sets the title associated with this mapping.
      Parameters:
      title - The title to set.
    • equals

      public boolean equals(Object o)
      Checks if this object is equal to another object. Two objects are considered equal if: - They are of the same class. - Their `contentId` and `title` fields are equal.
      Overrides:
      equals in class com.atlassian.core.bean.EntityObject
      Parameters:
      o - The object to compare with.
      Returns:
      true if the objects are equal, false otherwise.
    • hashCode

      public int hashCode()
      Computes a hash code for this object. The hash code is based on the hash codes of the `title` and `contentId` fields.
      Overrides:
      hashCode in class com.atlassian.core.bean.EntityObject
      Returns:
      The hash code of this object.