org.broadleafcommerce.openadmin.server.dao
Class DynamicEntityDaoImpl

java.lang.Object
  extended by org.broadleafcommerce.openadmin.server.dao.BaseHibernateCriteriaDao<java.io.Serializable>
      extended by org.broadleafcommerce.openadmin.server.dao.DynamicEntityDaoImpl
All Implemented Interfaces:
BaseCriteriaDao<java.io.Serializable>, DynamicEntityDao

public class DynamicEntityDaoImpl
extends BaseHibernateCriteriaDao<java.io.Serializable>
implements DynamicEntityDao

Author:
jfischer

Field Summary
protected  EJB3ConfigurationDao ejb3ConfigurationDao
           
protected  EntityConfiguration entityConfiguration
           
protected  java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.Map<java.lang.String,FieldMetadata>>> fieldMetadataOverrides
           
protected  javax.persistence.EntityManager standardEntityManager
           
 
Constructor Summary
DynamicEntityDaoImpl()
           
 
Method Summary
protected  void addClassToTree(java.lang.Class<?> clazz, ClassTree tree)
           
protected  void applyAdminPresentationOverrides(java.lang.String prefix, java.lang.Boolean isParentExcluded, java.util.Map<java.lang.String,FieldMetadata> mergedProperties, java.util.Map<java.lang.String,AdminPresentationOverride> presentationOverrides)
           
protected  void applyForeignKeyPrecedence(ForeignKey foreignField, ForeignKey[] additionalForeignFields, java.util.Map<java.lang.String,FieldMetadata> mergedProperties)
           
protected  void applyIncludesAndExcludes(java.lang.String[] includeFields, java.lang.String[] excludeFields, java.lang.String prefix, java.lang.Boolean isParentExcluded, java.util.Map<java.lang.String,FieldMetadata> mergedProperties)
           
protected  void applyMetadataOverrides(java.lang.String ceilingEntityFullyQualifiedClassname, java.lang.String configurationKey, java.lang.String prefix, java.lang.Boolean isParentExcluded, java.util.Map<java.lang.String,FieldMetadata> mergedProperties)
           
protected  void buildComponentProperties(java.lang.Class<?> targetClass, ForeignKey foreignField, ForeignKey[] additionalForeignFields, java.lang.String[] additionalNonPersistentProperties, MergedPropertyType mergedPropertyType, java.util.Map<java.lang.String,FieldMetadata> fields, java.lang.String idProperty, java.lang.Boolean populateManyToOneFields, java.lang.String[] includeFields, java.lang.String[] excludeFields, java.lang.String configurationKey, java.lang.String ceilingEntityFullyQualifiedClassname, java.lang.String propertyName, org.hibernate.type.Type type, java.lang.Class<?> returnedClass, java.lang.Boolean isParentExcluded)
           
protected  void buildEntityProperties(java.util.Map<java.lang.String,FieldMetadata> fields, ForeignKey foreignField, ForeignKey[] additionalForeignFields, java.lang.String[] additionalNonPersistentProperties, java.lang.Boolean populateManyToOneFields, java.lang.String[] includeFields, java.lang.String[] excludeFields, java.lang.String configurationKey, java.lang.String ceilingEntityFullyQualifiedClassname, java.lang.String propertyName, java.lang.Class<?> returnedClass, java.lang.Class<?> targetClass, java.lang.String prefix, java.lang.Boolean isParentExcluded)
           
protected  void buildProperties(java.lang.Class<?> targetClass, ForeignKey foreignField, ForeignKey[] additionalForeignFields, java.lang.String[] additionalNonPersistentProperties, MergedPropertyType mergedPropertyType, java.util.Map<java.lang.String,FieldPresentationAttributes> presentationAttributes, java.util.List<org.hibernate.mapping.Property> componentProperties, java.util.Map<java.lang.String,FieldMetadata> fields, java.util.List<java.lang.String> propertyNames, java.util.List<org.hibernate.type.Type> propertyTypes, java.lang.String idProperty, java.lang.Boolean populateManyToOneFields, java.lang.String[] includeFields, java.lang.String[] excludeFields, java.lang.String configurationKey, java.lang.String ceilingEntityFullyQualifiedClassname, java.lang.String prefix, java.lang.Boolean isParentExcluded)
           
protected  void buildPropertiesFromPolymorphicEntities(java.lang.Class<?>[] entities, ForeignKey foreignField, java.lang.String[] additionalNonPersistentProperties, ForeignKey[] additionalForeignFields, MergedPropertyType mergedPropertyType, java.lang.Boolean populateManyToOneFields, java.lang.String[] includeFields, java.lang.String[] excludeFields, java.lang.String configurationKey, java.lang.String ceilingEntityFullyQualifiedClassname, java.util.Map<java.lang.String,FieldMetadata> mergedProperties, java.lang.String prefix, java.lang.Boolean isParentExcluded)
           
protected  void buildProperty(java.lang.Class<?> targetClass, ForeignKey foreignField, ForeignKey[] additionalForeignFields, MergedPropertyType mergedPropertyType, java.util.List<org.hibernate.mapping.Property> componentProperties, java.util.Map<java.lang.String,FieldMetadata> fields, java.lang.String idProperty, java.lang.String prefix, java.lang.String propertyName, org.hibernate.type.Type type, boolean isPropertyForeignKey, int additionalForeignKeyIndexPosition, FieldPresentationAttributes presentationAttribute, SupportedFieldType explicitType, java.lang.Class<?> returnedClass)
           
 void clear()
           
protected  void createClassTreeFromAnnotation(java.lang.Class<?> clazz, ClassTree myTree)
           
 void detach(java.io.Serializable entity)
           
protected  int findAdditionalForeignKeyIndex(ForeignKey[] additionalForeignFields, java.lang.String prefix, java.lang.String propertyName)
           
 void flush()
           
protected  java.lang.reflect.Field[] getAllFields(java.lang.Class<?> targetClass)
           
 java.lang.Class<?>[] getAllPolymorphicEntitiesFromCeiling(java.lang.Class<?> ceilingClass)
           
protected  java.lang.String getCacheKey(ForeignKey foreignField, java.lang.String[] additionalNonPersistentProperties, ForeignKey[] additionalForeignFields, MergedPropertyType mergedPropertyType, java.lang.Boolean populateManyToOneFields, java.lang.Class<?> clazz, java.lang.String configurationKey, java.lang.Boolean isParentExcluded)
           
 ClassTree getClassTree(java.lang.Class<?>[] polymorphicClasses)
           
 ClassTree getClassTreeFromCeiling(java.lang.Class<?> ceilingClass)
           
 EJB3ConfigurationDao getEjb3ConfigurationDao()
           
 java.lang.Class<? extends java.io.Serializable> getEntityClass()
           
 EntityConfiguration getEntityConfiguration()
           
 FieldManager getFieldManager()
           
protected  FieldMetadata getFieldMetadata(java.lang.String prefix, java.lang.String propertyName, java.util.List<org.hibernate.mapping.Property> componentProperties, SupportedFieldType type, SupportedFieldType secondaryType, org.hibernate.type.Type entityType, java.lang.Class<?> targetClass, FieldPresentationAttributes presentationAttribute, MergedPropertyType mergedPropertyType)
           
protected  FieldMetadata getFieldMetadata(java.lang.String prefix, java.lang.String propertyName, java.util.List<org.hibernate.mapping.Property> componentProperties, SupportedFieldType type, org.hibernate.type.Type entityType, java.lang.Class<?> targetClass, FieldPresentationAttributes presentationAttribute, MergedPropertyType mergedPropertyType)
           
 java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.Map<java.lang.String,FieldMetadata>>> getFieldMetadataOverrides()
           
protected  java.util.Map<java.lang.String,FieldPresentationAttributes> getFieldPresentationAttributes(java.lang.Class<?> targetClass)
           
 java.util.Map<java.lang.String,java.lang.Class<?>> getIdMetadata(java.lang.Class<?> entityClass)
           
 java.util.Map<java.lang.String,FieldMetadata> getMergedProperties(java.lang.String ceilingEntityFullyQualifiedClassname, java.lang.Class<?>[] entities, ForeignKey foreignField, java.lang.String[] additionalNonPersistentProperties, ForeignKey[] additionalForeignFields, MergedPropertyType mergedPropertyType, java.lang.Boolean populateManyToOneFields, java.lang.String[] includeFields, java.lang.String[] excludeFields, java.lang.String configurationKey, java.lang.String prefix)
           
protected  java.util.Map<java.lang.String,FieldMetadata> getMergedPropertiesRecursively(java.lang.String ceilingEntityFullyQualifiedClassname, java.lang.Class<?>[] entities, ForeignKey foreignField, java.lang.String[] additionalNonPersistentProperties, ForeignKey[] additionalForeignFields, MergedPropertyType mergedPropertyType, java.lang.Boolean populateManyToOneFields, java.lang.String[] includeFields, java.lang.String[] excludeFields, java.lang.String configurationKey, java.lang.String prefix, java.lang.Boolean isParentExcluded)
           
 org.hibernate.mapping.PersistentClass getPersistentClass(java.lang.String targetClassName)
          Get the Hibernate PersistentClass instance associated with the fully-qualified class name.
protected  java.util.Map<java.lang.String,FieldMetadata> getPropertiesForEntityClass(java.lang.Class<?> targetClass, ForeignKey foreignField, java.lang.String[] additionalNonPersistentProperties, ForeignKey[] additionalForeignFields, MergedPropertyType mergedPropertyType, java.lang.Boolean populateManyToOneFields, java.lang.String[] includeFields, java.lang.String[] excludeFields, java.lang.String configurationKey, java.lang.String ceilingEntityFullyQualifiedClassname, java.lang.String prefix, java.lang.Boolean isParentExcluded)
           
 java.util.Map<java.lang.String,FieldMetadata> getPropertiesForPrimitiveClass(java.lang.String propertyName, java.lang.String friendlyPropertyName, java.lang.Class<?> targetClass, java.lang.Class<?> parentClass, MergedPropertyType mergedPropertyType)
           
 java.util.List<java.lang.String> getPropertyNames(java.lang.Class<?> entityClass)
           
 java.util.List<org.hibernate.type.Type> getPropertyTypes(java.lang.Class<?> entityClass)
           
protected  org.hibernate.SessionFactory getSessionFactory()
           
 java.util.Map<java.lang.String,FieldMetadata> getSimpleMergedProperties(java.lang.String entityName, PersistencePerspective persistencePerspective)
           
 javax.persistence.EntityManager getStandardEntityManager()
           
 java.io.Serializable merge(java.io.Serializable entity)
           
protected  java.lang.String pad(java.lang.String s, int length, char pad)
           
 java.io.Serializable persist(java.io.Serializable entity)
           
 void refresh(java.io.Serializable entity)
           
 void remove(java.io.Serializable entity)
           
 java.io.Serializable retrieve(java.lang.Class<?> entityClass, java.lang.Object primaryKey)
           
 void setEjb3ConfigurationDao(EJB3ConfigurationDao ejb3ConfigurationDao)
           
 void setEntityConfiguration(EntityConfiguration entityConfiguration)
           
 void setFieldMetadataOverrides(java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.Map<java.lang.String,FieldMetadata>>> fieldMetadataOverrides)
           
 void setStandardEntityManager(javax.persistence.EntityManager entityManager)
           
protected  boolean testForeignProperty(ForeignKey foreignField, java.lang.String prefix, java.lang.String propertyName)
           
 java.lang.Boolean testPropertyInclusion(FieldPresentationAttributes presentationAttribute)
           
protected  java.lang.Boolean testPropertyRecursion(java.lang.String prefix, java.lang.String propertyName, java.lang.Class<?> targetClass, java.lang.String ceilingEntityFullyQualifiedClassname)
           
 
Methods inherited from class org.broadleafcommerce.openadmin.server.dao.BaseHibernateCriteriaDao
count, count, createCriteria, getCriteria, query, query, rowCount
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.broadleafcommerce.openadmin.server.dao.DynamicEntityDao
createCriteria, getCriteria
 
Methods inherited from interface org.broadleafcommerce.openadmin.server.dao.BaseCriteriaDao
count, count, query, query
 

Field Detail

standardEntityManager

protected javax.persistence.EntityManager standardEntityManager

ejb3ConfigurationDao

protected EJB3ConfigurationDao ejb3ConfigurationDao

entityConfiguration

protected EntityConfiguration entityConfiguration

fieldMetadataOverrides

protected java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.Map<java.lang.String,FieldMetadata>>> fieldMetadataOverrides
Constructor Detail

DynamicEntityDaoImpl

public DynamicEntityDaoImpl()
Method Detail

getEntityClass

public java.lang.Class<? extends java.io.Serializable> getEntityClass()
Specified by:
getEntityClass in interface BaseCriteriaDao<java.io.Serializable>
Specified by:
getEntityClass in class BaseHibernateCriteriaDao<java.io.Serializable>

persist

public java.io.Serializable persist(java.io.Serializable entity)
Specified by:
persist in interface DynamicEntityDao

merge

public java.io.Serializable merge(java.io.Serializable entity)
Specified by:
merge in interface DynamicEntityDao

flush

public void flush()
Specified by:
flush in interface DynamicEntityDao

detach

public void detach(java.io.Serializable entity)
Specified by:
detach in interface DynamicEntityDao

refresh

public void refresh(java.io.Serializable entity)
Specified by:
refresh in interface DynamicEntityDao

retrieve

public java.io.Serializable retrieve(java.lang.Class<?> entityClass,
                                     java.lang.Object primaryKey)
Specified by:
retrieve in interface DynamicEntityDao

remove

public void remove(java.io.Serializable entity)
Specified by:
remove in interface DynamicEntityDao

clear

public void clear()
Specified by:
clear in interface DynamicEntityDao

getPersistentClass

public org.hibernate.mapping.PersistentClass getPersistentClass(java.lang.String targetClassName)
Description copied from interface: DynamicEntityDao
Get the Hibernate PersistentClass instance associated with the fully-qualified class name. Will return null if no persistent class is associated with this name.

Specified by:
getPersistentClass in interface DynamicEntityDao
Returns:
The PersistentClass instance

getAllPolymorphicEntitiesFromCeiling

public java.lang.Class<?>[] getAllPolymorphicEntitiesFromCeiling(java.lang.Class<?> ceilingClass)
Specified by:
getAllPolymorphicEntitiesFromCeiling in interface DynamicEntityDao

addClassToTree

protected void addClassToTree(java.lang.Class<?> clazz,
                              ClassTree tree)

createClassTreeFromAnnotation

protected void createClassTreeFromAnnotation(java.lang.Class<?> clazz,
                                             ClassTree myTree)

getClassTree

public ClassTree getClassTree(java.lang.Class<?>[] polymorphicClasses)
Specified by:
getClassTree in interface DynamicEntityDao

getClassTreeFromCeiling

public ClassTree getClassTreeFromCeiling(java.lang.Class<?> ceilingClass)
Specified by:
getClassTreeFromCeiling in interface DynamicEntityDao

getSimpleMergedProperties

public java.util.Map<java.lang.String,FieldMetadata> getSimpleMergedProperties(java.lang.String entityName,
                                                                               PersistencePerspective persistencePerspective)
                                                                        throws java.lang.ClassNotFoundException,
                                                                               java.lang.SecurityException,
                                                                               java.lang.IllegalArgumentException,
                                                                               java.lang.NoSuchMethodException,
                                                                               java.lang.IllegalAccessException,
                                                                               java.lang.reflect.InvocationTargetException,
                                                                               java.lang.NoSuchFieldException
Specified by:
getSimpleMergedProperties in interface DynamicEntityDao
Throws:
java.lang.ClassNotFoundException
java.lang.SecurityException
java.lang.IllegalArgumentException
java.lang.NoSuchMethodException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.NoSuchFieldException

getMergedProperties

public java.util.Map<java.lang.String,FieldMetadata> getMergedProperties(java.lang.String ceilingEntityFullyQualifiedClassname,
                                                                         java.lang.Class<?>[] entities,
                                                                         ForeignKey foreignField,
                                                                         java.lang.String[] additionalNonPersistentProperties,
                                                                         ForeignKey[] additionalForeignFields,
                                                                         MergedPropertyType mergedPropertyType,
                                                                         java.lang.Boolean populateManyToOneFields,
                                                                         java.lang.String[] includeFields,
                                                                         java.lang.String[] excludeFields,
                                                                         java.lang.String configurationKey,
                                                                         java.lang.String prefix)
                                                                  throws java.lang.ClassNotFoundException,
                                                                         java.lang.SecurityException,
                                                                         java.lang.IllegalArgumentException,
                                                                         java.lang.NoSuchMethodException,
                                                                         java.lang.IllegalAccessException,
                                                                         java.lang.reflect.InvocationTargetException
Specified by:
getMergedProperties in interface DynamicEntityDao
Throws:
java.lang.ClassNotFoundException
java.lang.SecurityException
java.lang.IllegalArgumentException
java.lang.NoSuchMethodException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException

getMergedPropertiesRecursively

protected java.util.Map<java.lang.String,FieldMetadata> getMergedPropertiesRecursively(java.lang.String ceilingEntityFullyQualifiedClassname,
                                                                                       java.lang.Class<?>[] entities,
                                                                                       ForeignKey foreignField,
                                                                                       java.lang.String[] additionalNonPersistentProperties,
                                                                                       ForeignKey[] additionalForeignFields,
                                                                                       MergedPropertyType mergedPropertyType,
                                                                                       java.lang.Boolean populateManyToOneFields,
                                                                                       java.lang.String[] includeFields,
                                                                                       java.lang.String[] excludeFields,
                                                                                       java.lang.String configurationKey,
                                                                                       java.lang.String prefix,
                                                                                       java.lang.Boolean isParentExcluded)
                                                                                throws java.lang.ClassNotFoundException,
                                                                                       java.lang.SecurityException,
                                                                                       java.lang.IllegalArgumentException,
                                                                                       java.lang.NoSuchMethodException,
                                                                                       java.lang.IllegalAccessException,
                                                                                       java.lang.reflect.InvocationTargetException
Throws:
java.lang.ClassNotFoundException
java.lang.SecurityException
java.lang.IllegalArgumentException
java.lang.NoSuchMethodException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException

applyForeignKeyPrecedence

protected void applyForeignKeyPrecedence(ForeignKey foreignField,
                                         ForeignKey[] additionalForeignFields,
                                         java.util.Map<java.lang.String,FieldMetadata> mergedProperties)

applyIncludesAndExcludes

protected void applyIncludesAndExcludes(java.lang.String[] includeFields,
                                        java.lang.String[] excludeFields,
                                        java.lang.String prefix,
                                        java.lang.Boolean isParentExcluded,
                                        java.util.Map<java.lang.String,FieldMetadata> mergedProperties)

applyMetadataOverrides

protected void applyMetadataOverrides(java.lang.String ceilingEntityFullyQualifiedClassname,
                                      java.lang.String configurationKey,
                                      java.lang.String prefix,
                                      java.lang.Boolean isParentExcluded,
                                      java.util.Map<java.lang.String,FieldMetadata> mergedProperties)

applyAdminPresentationOverrides

protected void applyAdminPresentationOverrides(java.lang.String prefix,
                                               java.lang.Boolean isParentExcluded,
                                               java.util.Map<java.lang.String,FieldMetadata> mergedProperties,
                                               java.util.Map<java.lang.String,AdminPresentationOverride> presentationOverrides)

pad

protected java.lang.String pad(java.lang.String s,
                               int length,
                               char pad)

getCacheKey

protected java.lang.String getCacheKey(ForeignKey foreignField,
                                       java.lang.String[] additionalNonPersistentProperties,
                                       ForeignKey[] additionalForeignFields,
                                       MergedPropertyType mergedPropertyType,
                                       java.lang.Boolean populateManyToOneFields,
                                       java.lang.Class<?> clazz,
                                       java.lang.String configurationKey,
                                       java.lang.Boolean isParentExcluded)

buildPropertiesFromPolymorphicEntities

protected void buildPropertiesFromPolymorphicEntities(java.lang.Class<?>[] entities,
                                                      ForeignKey foreignField,
                                                      java.lang.String[] additionalNonPersistentProperties,
                                                      ForeignKey[] additionalForeignFields,
                                                      MergedPropertyType mergedPropertyType,
                                                      java.lang.Boolean populateManyToOneFields,
                                                      java.lang.String[] includeFields,
                                                      java.lang.String[] excludeFields,
                                                      java.lang.String configurationKey,
                                                      java.lang.String ceilingEntityFullyQualifiedClassname,
                                                      java.util.Map<java.lang.String,FieldMetadata> mergedProperties,
                                                      java.lang.String prefix,
                                                      java.lang.Boolean isParentExcluded)
                                               throws java.lang.ClassNotFoundException,
                                                      java.lang.SecurityException,
                                                      java.lang.IllegalArgumentException,
                                                      java.lang.NoSuchMethodException,
                                                      java.lang.IllegalAccessException,
                                                      java.lang.reflect.InvocationTargetException
Throws:
java.lang.ClassNotFoundException
java.lang.SecurityException
java.lang.IllegalArgumentException
java.lang.NoSuchMethodException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException

getFieldMetadata

protected FieldMetadata getFieldMetadata(java.lang.String prefix,
                                         java.lang.String propertyName,
                                         java.util.List<org.hibernate.mapping.Property> componentProperties,
                                         SupportedFieldType type,
                                         org.hibernate.type.Type entityType,
                                         java.lang.Class<?> targetClass,
                                         FieldPresentationAttributes presentationAttribute,
                                         MergedPropertyType mergedPropertyType)
                                  throws java.lang.ClassNotFoundException,
                                         java.lang.SecurityException,
                                         java.lang.NoSuchMethodException,
                                         java.lang.IllegalArgumentException,
                                         java.lang.IllegalAccessException,
                                         java.lang.reflect.InvocationTargetException
Throws:
java.lang.ClassNotFoundException
java.lang.SecurityException
java.lang.NoSuchMethodException
java.lang.IllegalArgumentException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException

getFieldMetadata

protected FieldMetadata getFieldMetadata(java.lang.String prefix,
                                         java.lang.String propertyName,
                                         java.util.List<org.hibernate.mapping.Property> componentProperties,
                                         SupportedFieldType type,
                                         SupportedFieldType secondaryType,
                                         org.hibernate.type.Type entityType,
                                         java.lang.Class<?> targetClass,
                                         FieldPresentationAttributes presentationAttribute,
                                         MergedPropertyType mergedPropertyType)
                                  throws java.lang.ClassNotFoundException,
                                         java.lang.SecurityException,
                                         java.lang.NoSuchMethodException,
                                         java.lang.IllegalArgumentException,
                                         java.lang.IllegalAccessException,
                                         java.lang.reflect.InvocationTargetException
Throws:
java.lang.ClassNotFoundException
java.lang.SecurityException
java.lang.NoSuchMethodException
java.lang.IllegalArgumentException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException

getAllFields

protected java.lang.reflect.Field[] getAllFields(java.lang.Class<?> targetClass)

getFieldPresentationAttributes

protected java.util.Map<java.lang.String,FieldPresentationAttributes> getFieldPresentationAttributes(java.lang.Class<?> targetClass)

getPropertiesForPrimitiveClass

public java.util.Map<java.lang.String,FieldMetadata> getPropertiesForPrimitiveClass(java.lang.String propertyName,
                                                                                    java.lang.String friendlyPropertyName,
                                                                                    java.lang.Class<?> targetClass,
                                                                                    java.lang.Class<?> parentClass,
                                                                                    MergedPropertyType mergedPropertyType)
                                                                             throws java.lang.ClassNotFoundException,
                                                                                    java.lang.SecurityException,
                                                                                    java.lang.IllegalArgumentException,
                                                                                    java.lang.NoSuchMethodException,
                                                                                    java.lang.IllegalAccessException,
                                                                                    java.lang.reflect.InvocationTargetException
Specified by:
getPropertiesForPrimitiveClass in interface DynamicEntityDao
Throws:
java.lang.ClassNotFoundException
java.lang.SecurityException
java.lang.IllegalArgumentException
java.lang.NoSuchMethodException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException

getSessionFactory

protected org.hibernate.SessionFactory getSessionFactory()

getIdMetadata

public java.util.Map<java.lang.String,java.lang.Class<?>> getIdMetadata(java.lang.Class<?> entityClass)
Specified by:
getIdMetadata in interface DynamicEntityDao

getPropertyNames

public java.util.List<java.lang.String> getPropertyNames(java.lang.Class<?> entityClass)
Specified by:
getPropertyNames in interface DynamicEntityDao

getPropertyTypes

public java.util.List<org.hibernate.type.Type> getPropertyTypes(java.lang.Class<?> entityClass)
Specified by:
getPropertyTypes in interface DynamicEntityDao

getPropertiesForEntityClass

protected java.util.Map<java.lang.String,FieldMetadata> getPropertiesForEntityClass(java.lang.Class<?> targetClass,
                                                                                    ForeignKey foreignField,
                                                                                    java.lang.String[] additionalNonPersistentProperties,
                                                                                    ForeignKey[] additionalForeignFields,
                                                                                    MergedPropertyType mergedPropertyType,
                                                                                    java.lang.Boolean populateManyToOneFields,
                                                                                    java.lang.String[] includeFields,
                                                                                    java.lang.String[] excludeFields,
                                                                                    java.lang.String configurationKey,
                                                                                    java.lang.String ceilingEntityFullyQualifiedClassname,
                                                                                    java.lang.String prefix,
                                                                                    java.lang.Boolean isParentExcluded)
                                                                             throws java.lang.ClassNotFoundException,
                                                                                    java.lang.SecurityException,
                                                                                    java.lang.IllegalArgumentException,
                                                                                    java.lang.NoSuchMethodException,
                                                                                    java.lang.IllegalAccessException,
                                                                                    java.lang.reflect.InvocationTargetException
Throws:
java.lang.ClassNotFoundException
java.lang.SecurityException
java.lang.IllegalArgumentException
java.lang.NoSuchMethodException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException

buildProperties

protected void buildProperties(java.lang.Class<?> targetClass,
                               ForeignKey foreignField,
                               ForeignKey[] additionalForeignFields,
                               java.lang.String[] additionalNonPersistentProperties,
                               MergedPropertyType mergedPropertyType,
                               java.util.Map<java.lang.String,FieldPresentationAttributes> presentationAttributes,
                               java.util.List<org.hibernate.mapping.Property> componentProperties,
                               java.util.Map<java.lang.String,FieldMetadata> fields,
                               java.util.List<java.lang.String> propertyNames,
                               java.util.List<org.hibernate.type.Type> propertyTypes,
                               java.lang.String idProperty,
                               java.lang.Boolean populateManyToOneFields,
                               java.lang.String[] includeFields,
                               java.lang.String[] excludeFields,
                               java.lang.String configurationKey,
                               java.lang.String ceilingEntityFullyQualifiedClassname,
                               java.lang.String prefix,
                               java.lang.Boolean isParentExcluded)
                        throws org.hibernate.HibernateException,
                               java.lang.ClassNotFoundException,
                               java.lang.SecurityException,
                               java.lang.IllegalArgumentException,
                               java.lang.NoSuchMethodException,
                               java.lang.IllegalAccessException,
                               java.lang.reflect.InvocationTargetException
Throws:
org.hibernate.HibernateException
java.lang.ClassNotFoundException
java.lang.SecurityException
java.lang.IllegalArgumentException
java.lang.NoSuchMethodException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException

buildProperty

protected void buildProperty(java.lang.Class<?> targetClass,
                             ForeignKey foreignField,
                             ForeignKey[] additionalForeignFields,
                             MergedPropertyType mergedPropertyType,
                             java.util.List<org.hibernate.mapping.Property> componentProperties,
                             java.util.Map<java.lang.String,FieldMetadata> fields,
                             java.lang.String idProperty,
                             java.lang.String prefix,
                             java.lang.String propertyName,
                             org.hibernate.type.Type type,
                             boolean isPropertyForeignKey,
                             int additionalForeignKeyIndexPosition,
                             FieldPresentationAttributes presentationAttribute,
                             SupportedFieldType explicitType,
                             java.lang.Class<?> returnedClass)
                      throws java.lang.ClassNotFoundException,
                             java.lang.SecurityException,
                             java.lang.NoSuchMethodException,
                             java.lang.IllegalArgumentException,
                             java.lang.IllegalAccessException,
                             java.lang.reflect.InvocationTargetException
Throws:
java.lang.ClassNotFoundException
java.lang.SecurityException
java.lang.NoSuchMethodException
java.lang.IllegalArgumentException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException

testPropertyRecursion

protected java.lang.Boolean testPropertyRecursion(java.lang.String prefix,
                                                  java.lang.String propertyName,
                                                  java.lang.Class<?> targetClass,
                                                  java.lang.String ceilingEntityFullyQualifiedClassname)
                                           throws java.lang.ClassNotFoundException
Throws:
java.lang.ClassNotFoundException

testPropertyInclusion

public java.lang.Boolean testPropertyInclusion(FieldPresentationAttributes presentationAttribute)

testForeignProperty

protected boolean testForeignProperty(ForeignKey foreignField,
                                      java.lang.String prefix,
                                      java.lang.String propertyName)

findAdditionalForeignKeyIndex

protected int findAdditionalForeignKeyIndex(ForeignKey[] additionalForeignFields,
                                            java.lang.String prefix,
                                            java.lang.String propertyName)

buildEntityProperties

protected void buildEntityProperties(java.util.Map<java.lang.String,FieldMetadata> fields,
                                     ForeignKey foreignField,
                                     ForeignKey[] additionalForeignFields,
                                     java.lang.String[] additionalNonPersistentProperties,
                                     java.lang.Boolean populateManyToOneFields,
                                     java.lang.String[] includeFields,
                                     java.lang.String[] excludeFields,
                                     java.lang.String configurationKey,
                                     java.lang.String ceilingEntityFullyQualifiedClassname,
                                     java.lang.String propertyName,
                                     java.lang.Class<?> returnedClass,
                                     java.lang.Class<?> targetClass,
                                     java.lang.String prefix,
                                     java.lang.Boolean isParentExcluded)
                              throws java.lang.ClassNotFoundException,
                                     java.lang.SecurityException,
                                     java.lang.IllegalArgumentException,
                                     java.lang.NoSuchMethodException,
                                     java.lang.IllegalAccessException,
                                     java.lang.reflect.InvocationTargetException
Throws:
java.lang.ClassNotFoundException
java.lang.SecurityException
java.lang.IllegalArgumentException
java.lang.NoSuchMethodException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException

buildComponentProperties

protected void buildComponentProperties(java.lang.Class<?> targetClass,
                                        ForeignKey foreignField,
                                        ForeignKey[] additionalForeignFields,
                                        java.lang.String[] additionalNonPersistentProperties,
                                        MergedPropertyType mergedPropertyType,
                                        java.util.Map<java.lang.String,FieldMetadata> fields,
                                        java.lang.String idProperty,
                                        java.lang.Boolean populateManyToOneFields,
                                        java.lang.String[] includeFields,
                                        java.lang.String[] excludeFields,
                                        java.lang.String configurationKey,
                                        java.lang.String ceilingEntityFullyQualifiedClassname,
                                        java.lang.String propertyName,
                                        org.hibernate.type.Type type,
                                        java.lang.Class<?> returnedClass,
                                        java.lang.Boolean isParentExcluded)
                                 throws org.hibernate.MappingException,
                                        org.hibernate.HibernateException,
                                        java.lang.ClassNotFoundException,
                                        java.lang.SecurityException,
                                        java.lang.IllegalArgumentException,
                                        java.lang.NoSuchMethodException,
                                        java.lang.IllegalAccessException,
                                        java.lang.reflect.InvocationTargetException
Throws:
org.hibernate.MappingException
org.hibernate.HibernateException
java.lang.ClassNotFoundException
java.lang.SecurityException
java.lang.IllegalArgumentException
java.lang.NoSuchMethodException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException

getStandardEntityManager

public javax.persistence.EntityManager getStandardEntityManager()
Specified by:
getStandardEntityManager in interface BaseCriteriaDao<java.io.Serializable>
Specified by:
getStandardEntityManager in interface DynamicEntityDao
Specified by:
getStandardEntityManager in class BaseHibernateCriteriaDao<java.io.Serializable>

setStandardEntityManager

public void setStandardEntityManager(javax.persistence.EntityManager entityManager)
Specified by:
setStandardEntityManager in interface DynamicEntityDao

getEjb3ConfigurationDao

public EJB3ConfigurationDao getEjb3ConfigurationDao()

setEjb3ConfigurationDao

public void setEjb3ConfigurationDao(EJB3ConfigurationDao ejb3ConfigurationDao)

getFieldManager

public FieldManager getFieldManager()
Specified by:
getFieldManager in interface DynamicEntityDao

getEntityConfiguration

public EntityConfiguration getEntityConfiguration()
Specified by:
getEntityConfiguration in interface DynamicEntityDao

setEntityConfiguration

public void setEntityConfiguration(EntityConfiguration entityConfiguration)
Specified by:
setEntityConfiguration in interface DynamicEntityDao

getFieldMetadataOverrides

public java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.Map<java.lang.String,FieldMetadata>>> getFieldMetadataOverrides()
Specified by:
getFieldMetadataOverrides in interface DynamicEntityDao

setFieldMetadataOverrides

public void setFieldMetadataOverrides(java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.Map<java.lang.String,FieldMetadata>>> fieldMetadataOverrides)
Specified by:
setFieldMetadataOverrides in interface DynamicEntityDao


Copyright © 2011. All Rights Reserved.