Class HibernateTitleContentMappingDao
java.lang.Object
org.springframework.dao.support.DaoSupport
com.atlassian.confluence.core.persistence.hibernate.HibernateObjectDao<TitleContentMapping>
com.atlassian.confluence.links.persistence.dao.hibernate.HibernateTitleContentMappingDao
- All Implemented Interfaces:
TitleContentMappingDao
,org.springframework.beans.factory.InitializingBean
public class HibernateTitleContentMappingDao
extends HibernateObjectDao<TitleContentMapping>
implements TitleContentMappingDao
Hibernate implementation of the
TitleContentMappingDao
interface.
This class is responsible for interacting with the database using Hibernate to manage
TitleContentMapping
entities.-
Nested Class Summary
Nested classes/interfaces inherited from class com.atlassian.confluence.core.persistence.hibernate.HibernateObjectDao
HibernateObjectDao.Cacheability
-
Field Summary
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
create
(TitleContentMapping titleContentMapping) Creates a newTitleContentMapping
entity in the database.void
deleteByTitle
(String title, long contentId) Deletes aTitleContentMapping
entity based on the given title.getContentIdByTitle
(String title) Retrieves the content ID associated with the given title.Specifies the class of the persistent entity managed by this DAO.Retrieves a list ofTitleContentMapping
entities associated with the oldest content ID group.Methods inherited from class com.atlassian.confluence.core.persistence.hibernate.HibernateObjectDao
applyTransactionTimeout, checkDaoConfig, createHibernateTemplate, findAll, findAllSorted, findAllSorted, findNamedQuery, findNamedQuery, findNamedQuery, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findSingleObject, getByClassId, getCountResult, getHibernateTemplate, getSessionFactory, publishEvent, reIndex, remove, save, saveEntity, saveRaw, setHibernateTemplate, setSessionFactory, uniqueResult, updateModificationData
Methods inherited from class org.springframework.dao.support.DaoSupport
afterPropertiesSet, initDao
-
Constructor Details
-
HibernateTitleContentMappingDao
public HibernateTitleContentMappingDao()
-
-
Method Details
-
getPersistentClass
Specifies the class of the persistent entity managed by this DAO.- Specified by:
getPersistentClass
in classHibernateObjectDao<TitleContentMapping>
- Returns:
- The
TitleContentMapping
class.
-
getTitlesForOldestContentIdGroup
Retrieves a list ofTitleContentMapping
entities associated with the oldest content ID group. This method uses a native SQL query to find the entries with the oldest content ID (determined by ordering the IDs in ascending order and selecting the first one).- Specified by:
getTitlesForOldestContentIdGroup
in interfaceTitleContentMappingDao
- Returns:
- A list of
TitleContentMapping
entities belonging to the oldest content ID group.
-
getContentIdByTitle
Retrieves the content ID associated with the given title. This method uses a named query to fetch the content ID for a specific title.- Specified by:
getContentIdByTitle
in interfaceTitleContentMappingDao
- Parameters:
title
- The title for which the content ID is being retrieved.- Returns:
- The content ID associated with the given title, or
null
if no match is found.
-
deleteByTitle
Deletes aTitleContentMapping
entity based on the given title. This method uses a named query to delete a specific entry by its title.- Specified by:
deleteByTitle
in interfaceTitleContentMappingDao
- Parameters:
title
- The title of the entry to delete.
-
create
Creates a newTitleContentMapping
entity in the database. This method uses a native SQL query to insert a new mapping with the given title and content ID.- Specified by:
create
in interfaceTitleContentMappingDao
- Parameters:
titleContentMapping
- TheTitleContentMapping
object to persist.
-