Class HibernateMetadataHelper
java.lang.Object
com.atlassian.confluence.impl.backuprestore.hibernate.HibernateMetadataHelper
Helps to retrieve all information about Hibernate entities.
- Since:
- 7.20.0
-
Constructor Summary
ConstructorsConstructorDescriptionHibernateMetadataHelper(ExportableEntityInfoFactory exportableEntityInfoFactory, org.hibernate.SessionFactory sessionFactory, boolean realReferenceClassesUsedInExport) -
Method Summary
Modifier and TypeMethodDescriptionMap<jakarta.persistence.metamodel.EntityType<?>, ExportableEntityInfo> static Class<?> getClassByClassName(String entityClassName) getColumnName(Class<?> clazz, String fieldName) getEntityInfoByClass(Class<?> clazz) getEntityInfoByClassName(String className) String[]getFieldNames(Class<?> clazz) org.hibernate.type.Type[]getHibernateTypes(Class<?> clazz) getIdColumnName(Class<?> clazz) getIdPropertyName(Class<?> clazz) org.hibernate.type.Typeorg.hibernate.persister.entity.AbstractEntityPersistergetPersister(Class<?> clazz) Get Hibernate persister for the class and caches it temporarily (in the instance of the helper).Class<?> getRealContentEntityObjectSubclass(Object id, Class<?> clazz) Returns content entity subclass by entity id jira.atlassian.com/browse/CONFSRVDEV-23863getTableName(Class<?> entityClass) voidregisterContentEntityObject(Object id, Class<?> clazz) static StringremoveQuotes(String name)
-
Constructor Details
-
HibernateMetadataHelper
public HibernateMetadataHelper(ExportableEntityInfoFactory exportableEntityInfoFactory, org.hibernate.SessionFactory sessionFactory, boolean realReferenceClassesUsedInExport) - Parameters:
realReferenceClassesUsedInExport- set true when external references have to have proper subclasses (like Page instead of ContentEntityObject) which is required for space backup; and false when it is not required (for site backups)
-
-
Method Details
-
getRealContentEntityObjectSubclass
Returns content entity subclass by entity id jira.atlassian.com/browse/CONFSRVDEV-23863 -
registerContentEntityObject
-
getAllExportableEntities
public Map<jakarta.persistence.metamodel.EntityType<?>,ExportableEntityInfo> getAllExportableEntities() -
getClassByClassName
-
getTableName
-
getPersister
Get Hibernate persister for the class and caches it temporarily (in the instance of the helper).- Parameters:
clazz- class- Returns:
- persister
-
getAllExportableEntitiesByClass
-
getIdType
-
getIdColumnName
-
getIdPropertyName
-
getFieldNames
-
getHibernateTypes
-
getColumnName
-
removeQuotes
-
getEntityInfoByClass
-
getEntityInfoByClassName
-
getAdditionalExportableEntitiesByClass
-
getAllSpaceImportableEntities
-
getAllSiteImportableEntities
-
getAllEntitiesForSpaceDeletion
-