public class DynamicDaoHelperImpl extends Object implements DynamicDaoHelper
| Modifier and Type | Field and Description |
|---|---|
static String |
JAVASSIST_PROXY_KEY_PHRASE |
static Object |
LOCK_OBJECT |
static Map<org.hibernate.SessionFactory,Map<Class<?>,Class<?>[]>> |
POLYMORPHIC_ENTITY_CACHE |
static Map<org.hibernate.SessionFactory,Map<Class<?>,Class<?>[]>> |
POLYMORPHIC_ENTITY_CACHE_WO_EXCLUSIONS |
| Constructor and Description |
|---|
DynamicDaoHelperImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected Map<Class<?>,Class<?>[]> |
buildPolymorphicEntityMap(Map<Class<?>,Class<?>[]> polymorphicEntityMap,
Class<?> ceilingClass,
Class<?>[] filteredEntities) |
Class<?>[] |
getAllPolymorphicEntitiesFromCeiling(Class<?> ceilingClass,
org.hibernate.SessionFactory sessionFactory,
boolean includeUnqualifiedPolymorphicEntities,
boolean useCache)
Get all the polymorphic types known to Hibernate for the ceiling class provided.
|
protected Class<?>[] |
getCachedPolymorphicEntityList(Map<org.hibernate.SessionFactory,Map<Class<?>,Class<?>[]>> polymorphicEntityCache,
org.hibernate.SessionFactory sessionFactory,
Class<?> ceilingClass) |
Serializable |
getIdentifier(Object entity,
javax.persistence.EntityManager em)
The value of the Hibernate registered identifier property for the entity instance.
|
Serializable |
getIdentifier(Object entity,
org.hibernate.Session session)
The value of the Hibernate registered identifier property for the entity instance.
|
Field |
getIdField(Class<?> clazz,
javax.persistence.EntityManager em)
The Field that represents the Hibernate registered identifier property for the entity class.
|
Field |
getIdField(Class<?> clazz,
org.hibernate.Session session)
The Field that represents the Hibernate registered identifier property for the entity class.
|
Map<String,Object> |
getIdMetadata(Class<?> entityClass,
org.hibernate.ejb.HibernateEntityManager entityManager)
Retrieve information about the id property for the entity class and the data type of that property.
|
static Class<?> |
getNonProxyImplementationClassIfNecessary(Class<?> candidate) |
List<String> |
getPropertyNames(Class<?> entityClass,
org.hibernate.ejb.HibernateEntityManager entityManager)
Retrieve the list of property names known to Hibernate for the entity class.
|
List<org.hibernate.type.Type> |
getPropertyTypes(Class<?> entityClass,
org.hibernate.ejb.HibernateEntityManager entityManager)
Retrieve the list of property types (
Type known to Hibernate for the entity class. |
org.hibernate.SessionFactory |
getSessionFactory(org.hibernate.ejb.HibernateEntityManager entityManager)
Get the SessionFactory instance from a HibernateEntityManager instance.
|
Class<?>[] |
getUpDownInheritance(Class<?> testClass,
org.hibernate.SessionFactory sessionFactory,
boolean includeUnqualifiedPolymorphicEntities,
boolean useCache,
EJB3ConfigurationDao ejb3ConfigurationDao)
Retrieve a complete polymorphic type list for an entity class, even if the entity class is not the ceiling class (or
root of the hierarchy).
|
boolean |
isExcludeClassFromPolymorphism(Class<?> clazz)
Discover is a class should be excluded from a polymorphic list.
|
Class<?>[] |
sortEntities(Class<?> ceilingClass,
List<Class<?>> entities)
Sort a list of polymorphic types with the most derived appearing first.
|
public static final Object LOCK_OBJECT
public static final Map<org.hibernate.SessionFactory,Map<Class<?>,Class<?>[]>> POLYMORPHIC_ENTITY_CACHE
public static final Map<org.hibernate.SessionFactory,Map<Class<?>,Class<?>[]>> POLYMORPHIC_ENTITY_CACHE_WO_EXCLUSIONS
public static final String JAVASSIST_PROXY_KEY_PHRASE
public static Class<?> getNonProxyImplementationClassIfNecessary(Class<?> candidate)
public Class<?>[] getAllPolymorphicEntitiesFromCeiling(Class<?> ceilingClass, org.hibernate.SessionFactory sessionFactory, boolean includeUnqualifiedPolymorphicEntities, boolean useCache)
DynamicDaoHelpergetAllPolymorphicEntitiesFromCeiling in interface DynamicDaoHelperincludeUnqualifiedPolymorphicEntities - Some entities may be excluded from polymorphism (Abstract class and those marked with AdminPresentationClass.excludeFromPolymorphism()). Override that exlusion behavior.useCache - Cache the polymorphic types discovered for the ceilingClass.protected Class<?>[] getCachedPolymorphicEntityList(Map<org.hibernate.SessionFactory,Map<Class<?>,Class<?>[]>> polymorphicEntityCache, org.hibernate.SessionFactory sessionFactory, Class<?> ceilingClass)
protected Map<Class<?>,Class<?>[]> buildPolymorphicEntityMap(Map<Class<?>,Class<?>[]> polymorphicEntityMap, Class<?> ceilingClass, Class<?>[] filteredEntities)
public Class<?>[] getUpDownInheritance(Class<?> testClass, org.hibernate.SessionFactory sessionFactory, boolean includeUnqualifiedPolymorphicEntities, boolean useCache, EJB3ConfigurationDao ejb3ConfigurationDao)
DynamicDaoHelpergetUpDownInheritance in interface DynamicDaoHelpertestClass - An entity class to look for polymorphic types both above and belowincludeUnqualifiedPolymorphicEntities - Some entities may be excluded from polymorphism (Abstract class and those marked with AdminPresentationClass.excludeFromPolymorphism()). Override that exlusion behavior.useCache - Cache the polymorphic types discovered for the ceilingClass.public Class<?>[] sortEntities(Class<?> ceilingClass, List<Class<?>> entities)
DynamicDaoHelpersortEntities in interface DynamicDaoHelperpublic boolean isExcludeClassFromPolymorphism(Class<?> clazz)
DynamicDaoHelperAdminPresentationClass.excludeFromPolymorphism().isExcludeClassFromPolymorphism in interface DynamicDaoHelperpublic Map<String,Object> getIdMetadata(Class<?> entityClass, org.hibernate.ejb.HibernateEntityManager entityManager)
DynamicDaoHelperType instance for the property (e.g. LongType).getIdMetadata in interface DynamicDaoHelperpublic List<String> getPropertyNames(Class<?> entityClass, org.hibernate.ejb.HibernateEntityManager entityManager)
DynamicDaoHelpergetPropertyNames in interface DynamicDaoHelperpublic List<org.hibernate.type.Type> getPropertyTypes(Class<?> entityClass, org.hibernate.ejb.HibernateEntityManager entityManager)
DynamicDaoHelperType known to Hibernate for the entity class.getPropertyTypes in interface DynamicDaoHelperpublic org.hibernate.SessionFactory getSessionFactory(org.hibernate.ejb.HibernateEntityManager entityManager)
DynamicDaoHelpergetSessionFactory in interface DynamicDaoHelperpublic Serializable getIdentifier(Object entity, javax.persistence.EntityManager em)
DynamicDaoHelpergetIdentifier in interface DynamicDaoHelperpublic Serializable getIdentifier(Object entity, org.hibernate.Session session)
DynamicDaoHelpergetIdentifier in interface DynamicDaoHelperpublic Field getIdField(Class<?> clazz, javax.persistence.EntityManager em)
DynamicDaoHelpergetIdField in interface DynamicDaoHelperpublic Field getIdField(Class<?> clazz, org.hibernate.Session session)
DynamicDaoHelpergetIdField in interface DynamicDaoHelperCopyright © 2019. All rights reserved.