public interface DynamicDaoHelper
Modifier and Type | Method and Description |
---|---|
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.
|
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.
|
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.
|
Map<String,Object> getIdMetadata(Class<?> entityClass, org.hibernate.ejb.HibernateEntityManager entityManager)
Type
instance for the property (e.g. LongType
).entityClass
- entityManager
- List<String> getPropertyNames(Class<?> entityClass, org.hibernate.ejb.HibernateEntityManager entityManager)
entityClass
- entityManager
- List<org.hibernate.type.Type> getPropertyTypes(Class<?> entityClass, org.hibernate.ejb.HibernateEntityManager entityManager)
Type
known to Hibernate for the entity class.entityClass
- entityManager
- org.hibernate.SessionFactory getSessionFactory(org.hibernate.ejb.HibernateEntityManager entityManager)
entityManager
- Class<?>[] getAllPolymorphicEntitiesFromCeiling(Class<?> ceilingClass, org.hibernate.SessionFactory sessionFactory, boolean includeUnqualifiedPolymorphicEntities, boolean useCache)
ceilingClass
- sessionFactory
- includeUnqualifiedPolymorphicEntities
- 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.Class<?>[] sortEntities(Class<?> ceilingClass, List<Class<?>> entities)
ceilingClass
- entities
- boolean isExcludeClassFromPolymorphism(Class<?> clazz)
AdminPresentationClass.excludeFromPolymorphism()
.clazz
- Serializable getIdentifier(Object entity, javax.persistence.EntityManager em)
entity
- em
- Serializable getIdentifier(Object entity, org.hibernate.Session session)
entity
- session
- Field getIdField(Class<?> clazz, javax.persistence.EntityManager em)
clazz
- em
- Field getIdField(Class<?> clazz, org.hibernate.Session session)
clazz
- session
- Class<?>[] getUpDownInheritance(Class<?> testClass, org.hibernate.SessionFactory sessionFactory, boolean includeUnqualifiedPolymorphicEntities, boolean useCache, EJB3ConfigurationDao ejb3ConfigurationDao)
testClass
- An entity class to look for polymorphic types both above and belowsessionFactory
- includeUnqualifiedPolymorphicEntities
- 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.ejb3ConfigurationDao
- Copyright © 2019. All rights reserved.