Package com.atlassian.confluence.links
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
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 Summary
ConstructorsConstructorDescriptionDefault constructor.TitleContentMapping(String title, Long contentid) Parameterized constructor to initialize the title and content ID. -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if this object is equal to another object.Gets the content ID associated with this mapping.longgetId()Gets the unique identifier for this mapping.getTitle()Gets the title associated with this mapping.inthashCode()Computes a hash code for this object.voidsetContentId(Long contentId) Sets the content ID associated with this mapping.voidsetId(long id) Sets the unique identifier for this mapping.voidSets the title associated with this mapping.Methods inherited from class com.atlassian.confluence.core.AnnotatedEntityObject
getCreationDate, getLastModificationDateMethods inherited from class com.atlassian.core.bean.EntityObject
clone, getCurrentDate, setClock, setCreationDate, setLastModificationDate
-
Constructor Details
-
TitleContentMapping
public TitleContentMapping()Default constructor. Required for Hibernate or other frameworks that use reflection to create objects. -
TitleContentMapping
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:
getIdin classcom.atlassian.core.bean.EntityObject- Returns:
- The ID of this mapping.
-
getTitle
Gets the title associated with this mapping.- Returns:
- The title of this mapping.
-
getContentId
Gets the content ID associated with this mapping.- Returns:
- The content ID of this mapping, or
nullif not set.
-
setId
public void setId(long id) Sets the unique identifier for this mapping.- Overrides:
setIdin classcom.atlassian.core.bean.EntityObject- Parameters:
id- The ID to set.
-
setContentId
Sets the content ID associated with this mapping.- Parameters:
contentId- The content ID to set.
-
setTitle
Sets the title associated with this mapping.- Parameters:
title- The title to set.
-
equals
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:
equalsin classcom.atlassian.core.bean.EntityObject- Parameters:
o- The object to compare with.- Returns:
trueif the objects are equal,falseotherwise.
-
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:
hashCodein classcom.atlassian.core.bean.EntityObject- Returns:
- The hash code of this object.
-