Class HibernateMetadataHelper
- java.lang.Object
-
- com.atlassian.confluence.impl.backuprestore.hibernate.HibernateMetadataHelper
-
public class HibernateMetadataHelper extends Object
Helps to retrieve all information about Hibernate entities.- Since:
- 7.20.0
-
-
Constructor Summary
Constructors Constructor Description HibernateMetadataHelper(org.hibernate.SessionFactory sessionFactory)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String[]buildColumnNames(Class<?> clazz, org.hibernate.type.Type[] hibernateTypes, String[] fieldNames)Map<javax.persistence.metamodel.EntityType<?>,ExportableEntityInfo>getAllExportableEntities()static Class<?>getClassByClassName(String entityClassName)StringgetColumnName(Class<?> clazz, String fieldName)ExportableEntityInfogetEntityInfoByClass(Class<?> clazz)String[]getFieldNames(Class<?> clazz)org.hibernate.type.Type[]getHibernateTypes(Class<?> clazz)StringgetIdColumnName(Class<?> clazz)StringgetIdPropertyName(Class<?> clazz)org.hibernate.type.TypegetIdType(Class<?> clazz)org.hibernate.persister.entity.AbstractEntityPersistergetPersister(Class<?> clazz)Get Hibernate persister for the class and caches it temporarily (in the instance of the helper).StringgetTableName(Class<?> entityClass)
-
-
-
Method Detail
-
getAllExportableEntities
public Map<javax.persistence.metamodel.EntityType<?>,ExportableEntityInfo> getAllExportableEntities()
-
getPersister
public org.hibernate.persister.entity.AbstractEntityPersister getPersister(Class<?> clazz)
Get Hibernate persister for the class and caches it temporarily (in the instance of the helper).- Parameters:
clazz- class- Returns:
- persister
-
getIdType
public org.hibernate.type.Type getIdType(Class<?> clazz)
-
getHibernateTypes
public org.hibernate.type.Type[] getHibernateTypes(Class<?> clazz)
-
buildColumnNames
public String[] buildColumnNames(Class<?> clazz, org.hibernate.type.Type[] hibernateTypes, String[] fieldNames)
-
getEntityInfoByClass
public ExportableEntityInfo getEntityInfoByClass(Class<?> clazz)
-
-