Interface DynamicEntityDao
- All Known Implementing Classes:
DynamicEntityDaoImpl
public interface DynamicEntityDao
- Author:
- jfischer
-
Method Summary
Modifier and TypeMethodDescriptionvoidclear()org.hibernate.CriteriacreateCriteria(Class<?> entityClass) voiddetach(Serializable entity) voidflush()Field[]getAllFields(Class<?> targetClass) Class<?>[]getAllPolymorphicEntitiesFromCeiling(Class<?> ceilingClass) Class<?>[]getAllPolymorphicEntitiesFromCeiling(Class<?> ceilingClass, boolean includeUnqualifiedPolymorphicEntities) Class<?>getCeilingImplClass(String className) getClassTree(Class<?>[] polymorphicClasses) getClassTreeFromCeiling(Class<?> ceilingClass) getFieldManager(boolean cleanFieldManger) getIdentifier(Object entity) Retrieve the identifier from the Hibernate entity (the entity must reside in the current session)getIdMetadata(Class<?> entityClass) Class<?>getImplClass(String className) getMergedProperties(Class<?> cls) Convenience method that obtains all of theMergedPropertyType.PRIMARYproperties for a given class.getMergedProperties(String ceilingEntityFullyQualifiedClassname, Class<?>[] entities, ForeignKey foreignField, String[] additionalNonPersistentProperties, ForeignKey[] additionalForeignFields, MergedPropertyType mergedPropertyType, Boolean populateManyToOneFields, String[] includeManyToOneFields, String[] excludeManyToOneFields, String configurationKey, String prefix) org.hibernate.mapping.PersistentClassgetPersistentClass(String targetClassName) Get the Hibernate PersistentClass instance associated with the fully-qualified class name.getPropertiesForPrimitiveClass(String propertyName, String friendlyPropertyName, Class<?> targetClass, Class<?> parentClass, MergedPropertyType mergedPropertyType) getPropertyNames(Class<?> entityClass) List<org.hibernate.type.Type>getPropertyTypes(Class<?> entityClass) getSimpleMergedProperties(String entityName, PersistencePerspective persistencePerspective) jakarta.persistence.EntityManagergetTabAndGroupMetadata(Class<?>[] clazz, ClassMetadata cmd) Class<?>[]getUpDownInheritance(Class<?> testClass) <T> Tmerge(T entity) <T> Tpersist(T entity) readOtherEntitiesWithPropertyValue(Serializable instance, String propertyName, String value) Returns a list of ids for entities that share the property value of the entity passed invoidrefresh(Serializable entity) voidremove(Serializable entity) voidsetEntityConfiguration(EntityConfiguration entityConfiguration) voidsetMetadata(Metadata metadata) voidsetStandardEntityManager(jakarta.persistence.EntityManager entityManager) booleanuseCache()
-
Method Details
-
getAllPolymorphicEntitiesFromCeiling
-
getAllPolymorphicEntitiesFromCeiling
-
getUpDownInheritance
-
getImplClass
-
getCeilingImplClass
-
getClassTreeFromCeiling
-
getClassTree
-
getPropertiesForPrimitiveClass
Map<String,FieldMetadata> getPropertiesForPrimitiveClass(String propertyName, String friendlyPropertyName, Class<?> targetClass, Class<?> parentClass, MergedPropertyType mergedPropertyType) -
getMergedProperties
Map<String,FieldMetadata> getMergedProperties(String ceilingEntityFullyQualifiedClassname, Class<?>[] entities, ForeignKey foreignField, String[] additionalNonPersistentProperties, ForeignKey[] additionalForeignFields, MergedPropertyType mergedPropertyType, Boolean populateManyToOneFields, String[] includeManyToOneFields, String[] excludeManyToOneFields, String configurationKey, String prefix) -
getMergedProperties
Convenience method that obtains all of theMergedPropertyType.PRIMARYproperties for a given class. Delegates togetMergedProperties(String, Class[], ForeignKey, String[], ForeignKey[], MergedPropertyType, Boolean, String[], String[], String, String)- Parameters:
cls-- Returns:
-
persist
<T> T persist(T entity) -
merge
<T> T merge(T entity) -
retrieve
-
remove
-
clear
void clear() -
flush
void flush() -
detach
-
refresh
-
find
-
getStandardEntityManager
jakarta.persistence.EntityManager getStandardEntityManager() -
setStandardEntityManager
void setStandardEntityManager(jakarta.persistence.EntityManager entityManager) -
getPersistentClass
Get the Hibernate PersistentClass instance associated with the fully-qualified class name. Will return null if no persistent class is associated with this name.- Parameters:
targetClassName-- Returns:
- The PersistentClass instance
-
getSimpleMergedProperties
Map<String,FieldMetadata> getSimpleMergedProperties(String entityName, PersistencePerspective persistencePerspective) -
getFieldManager
FieldManager getFieldManager() -
getFieldManager
-
getEntityConfiguration
EntityConfiguration getEntityConfiguration() -
setEntityConfiguration
-
getIdMetadata
-
getPropertyTypes
-
getPropertyNames
-
createCriteria
-
getAllFields
-
getMetadata
Metadata getMetadata() -
setMetadata
-
getDefaultFieldMetadataProvider
FieldMetadataProvider getDefaultFieldMetadataProvider() -
useCache
boolean useCache() -
getDynamicDaoHelper
DynamicDaoHelper getDynamicDaoHelper() -
getTabAndGroupMetadata
-
readOtherEntitiesWithPropertyValue
List<Long> readOtherEntitiesWithPropertyValue(Serializable instance, String propertyName, String value) Returns a list of ids for entities that share the property value of the entity passed in- Parameters:
instance-propertyName-value-- Returns:
-
getIdentifier
Retrieve the identifier from the Hibernate entity (the entity must reside in the current session)- Parameters:
entity-- Returns:
-