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, HibernateObjectDao.HibernateOperations -
Field Summary
Fields inherited from class org.springframework.dao.support.DaoSupport
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreate(TitleContentMapping titleContentMapping) Creates a newTitleContentMappingentity in the database.voiddeleteByTitle(String title, long contentId) Deletes aTitleContentMappingentity 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 ofTitleContentMappingentities 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, hibernate, publishEvent, reIndex, remove, save, saveEntity, saveRaw, setHibernateTemplate, setSessionFactory, uniqueResult, updateModificationDataMethods 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:
getPersistentClassin classHibernateObjectDao<TitleContentMapping>- Returns:
- The
TitleContentMappingclass.
-
getTitlesForOldestContentIdGroup
Retrieves a list ofTitleContentMappingentities 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:
getTitlesForOldestContentIdGroupin interfaceTitleContentMappingDao- Returns:
- A list of
TitleContentMappingentities 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:
getContentIdByTitlein interfaceTitleContentMappingDao- Parameters:
title- The title for which the content ID is being retrieved.- Returns:
- The content ID associated with the given title, or
nullif no match is found.
-
deleteByTitle
Deletes aTitleContentMappingentity based on the given title. This method uses a named query to delete a specific entry by its title.- Specified by:
deleteByTitlein interfaceTitleContentMappingDao- Parameters:
title- The title of the entry to delete.
-
create
Creates a newTitleContentMappingentity in the database. This method uses a native SQL query to insert a new mapping with the given title and content ID.- Specified by:
createin interfaceTitleContentMappingDao- Parameters:
titleContentMapping- TheTitleContentMappingobject to persist.
-