org.broadleafcommerce.openadmin.server.dao
Class DynamicEntityDaoImpl

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

public class DynamicEntityDaoImpl
extends BaseHibernateCriteriaDao<Serializable>
implements DynamicEntityDao

Author:
jfischer

Field Summary
protected  EJB3ConfigurationDao ejb3ConfigurationDao
           
protected  EntityConfiguration entityConfiguration
           
protected  Map<String,Map<String,Map<String,FieldMetadata>>> fieldMetadataOverrides
           
protected static Object LOCK_OBJECT
           
protected static Map METADATA_CACHE
           
protected static Map POLYMORPHIC_ENTITY_CACHE
           
protected  javax.persistence.EntityManager standardEntityManager
           
 
Constructor Summary
DynamicEntityDaoImpl()
           
 
Method Summary
protected  void addClassToTree(Class<?> clazz, ClassTree tree)
           
protected  void applyAdminPresentationOverrides(String prefix, Boolean isParentExcluded, Map<String,FieldMetadata> mergedProperties, Map<String,AdminPresentationOverride> presentationOverrides)
           
protected  void applyForeignKeyPrecedence(ForeignKey foreignField, ForeignKey[] additionalForeignFields, Map<String,FieldMetadata> mergedProperties)
           
protected  void applyIncludesAndExcludes(String[] includeFields, String[] excludeFields, String prefix, Boolean isParentExcluded, Map<String,FieldMetadata> mergedProperties)
           
protected  void applyMetadataOverrides(String ceilingEntityFullyQualifiedClassname, String configurationKey, String prefix, Boolean isParentExcluded, Map<String,FieldMetadata> mergedProperties)
           
protected  void buildComponentProperties(Class<?> targetClass, ForeignKey foreignField, ForeignKey[] additionalForeignFields, String[] additionalNonPersistentProperties, MergedPropertyType mergedPropertyType, Map<String,FieldMetadata> fields, String idProperty, Boolean populateManyToOneFields, String[] includeFields, String[] excludeFields, String configurationKey, String ceilingEntityFullyQualifiedClassname, String propertyName, org.hibernate.type.Type type, Class<?> returnedClass, List<Class<?>> parentClasses, Boolean isParentExcluded)
           
protected  void buildEntityProperties(Map<String,FieldMetadata> fields, ForeignKey foreignField, ForeignKey[] additionalForeignFields, String[] additionalNonPersistentProperties, Boolean populateManyToOneFields, String[] includeFields, String[] excludeFields, String configurationKey, String ceilingEntityFullyQualifiedClassname, String propertyName, Class<?> returnedClass, Class<?> targetClass, List<Class<?>> parentClasses, String prefix, Boolean isParentExcluded)
           
protected  void buildProperties(Class<?> targetClass, ForeignKey foreignField, ForeignKey[] additionalForeignFields, String[] additionalNonPersistentProperties, MergedPropertyType mergedPropertyType, Map<String,FieldPresentationAttributes> presentationAttributes, List<org.hibernate.mapping.Property> componentProperties, Map<String,FieldMetadata> fields, List<String> propertyNames, List<org.hibernate.type.Type> propertyTypes, String idProperty, Boolean populateManyToOneFields, String[] includeFields, String[] excludeFields, String configurationKey, String ceilingEntityFullyQualifiedClassname, List<Class<?>> parentClasses, String prefix, Boolean isParentExcluded)
           
protected  void buildPropertiesFromPolymorphicEntities(Class<?>[] entities, ForeignKey foreignField, String[] additionalNonPersistentProperties, ForeignKey[] additionalForeignFields, MergedPropertyType mergedPropertyType, Boolean populateManyToOneFields, String[] includeFields, String[] excludeFields, String configurationKey, String ceilingEntityFullyQualifiedClassname, Map<String,FieldMetadata> mergedProperties, List<Class<?>> parentClasses, String prefix, Boolean isParentExcluded)
           
protected  void buildProperty(Class<?> targetClass, ForeignKey foreignField, ForeignKey[] additionalForeignFields, MergedPropertyType mergedPropertyType, List<org.hibernate.mapping.Property> componentProperties, Map<String,FieldMetadata> fields, String idProperty, String prefix, String propertyName, org.hibernate.type.Type type, boolean isPropertyForeignKey, int additionalForeignKeyIndexPosition, FieldPresentationAttributes presentationAttribute, SupportedFieldType explicitType, Class<?> returnedClass)
           
 void clear()
           
protected  void createClassTreeFromAnnotation(Class<?> clazz, ClassTree myTree)
           
 void detach(Serializable entity)
           
protected  int findAdditionalForeignKeyIndex(ForeignKey[] additionalForeignFields, String prefix, String propertyName)
           
 void flush()
           
protected  Field[] getAllFields(Class<?> targetClass)
           
 Class<?>[] getAllPolymorphicEntitiesFromCeiling(Class<?> ceilingClass)
           
protected  String getCacheKey(ForeignKey foreignField, String[] additionalNonPersistentProperties, ForeignKey[] additionalForeignFields, MergedPropertyType mergedPropertyType, Boolean populateManyToOneFields, Class<?> clazz, String configurationKey, Boolean isParentExcluded)
           
 ClassTree getClassTree(Class<?>[] polymorphicClasses)
           
 ClassTree getClassTreeFromCeiling(Class<?> ceilingClass)
           
 EJB3ConfigurationDao getEjb3ConfigurationDao()
           
 Class<? extends Serializable> getEntityClass()
           
 EntityConfiguration getEntityConfiguration()
           
 FieldManager getFieldManager()
           
protected  FieldMetadata getFieldMetadata(String prefix, String propertyName, List<org.hibernate.mapping.Property> componentProperties, SupportedFieldType type, SupportedFieldType secondaryType, org.hibernate.type.Type entityType, Class<?> targetClass, FieldPresentationAttributes presentationAttribute, MergedPropertyType mergedPropertyType)
           
protected  FieldMetadata getFieldMetadata(String prefix, String propertyName, List<org.hibernate.mapping.Property> componentProperties, SupportedFieldType type, org.hibernate.type.Type entityType, Class<?> targetClass, FieldPresentationAttributes presentationAttribute, MergedPropertyType mergedPropertyType)
           
 Map<String,Map<String,Map<String,FieldMetadata>>> getFieldMetadataOverrides()
           
protected  Map<String,FieldPresentationAttributes> getFieldPresentationAttributes(Class<?> targetClass)
           
 Map<String,Class<?>> getIdMetadata(Class<?> entityClass)
           
 Map<String,FieldMetadata> getMergedProperties(String ceilingEntityFullyQualifiedClassname, Class<?>[] entities, ForeignKey foreignField, String[] additionalNonPersistentProperties, ForeignKey[] additionalForeignFields, MergedPropertyType mergedPropertyType, Boolean populateManyToOneFields, String[] includeFields, String[] excludeFields, String configurationKey, String prefix)
           
protected  Map<String,FieldMetadata> getMergedPropertiesRecursively(String ceilingEntityFullyQualifiedClassname, Class<?>[] entities, ForeignKey foreignField, String[] additionalNonPersistentProperties, ForeignKey[] additionalForeignFields, MergedPropertyType mergedPropertyType, Boolean populateManyToOneFields, String[] includeFields, String[] excludeFields, String configurationKey, List<Class<?>> parentClasses, String prefix, Boolean isParentExcluded)
           
 org.hibernate.mapping.PersistentClass getPersistentClass(String targetClassName)
          Get the Hibernate PersistentClass instance associated with the fully-qualified class name.
protected  Map<String,FieldMetadata> getPropertiesForEntityClass(Class<?> targetClass, ForeignKey foreignField, String[] additionalNonPersistentProperties, ForeignKey[] additionalForeignFields, MergedPropertyType mergedPropertyType, Boolean populateManyToOneFields, String[] includeFields, String[] excludeFields, String configurationKey, String ceilingEntityFullyQualifiedClassname, List<Class<?>> parentClasses, String prefix, Boolean isParentExcluded)
           
 Map<String,FieldMetadata> getPropertiesForPrimitiveClass(String propertyName, String friendlyPropertyName, Class<?> targetClass, Class<?> parentClass, MergedPropertyType mergedPropertyType)
           
 List<String> getPropertyNames(Class<?> entityClass)
           
 List<org.hibernate.type.Type> getPropertyTypes(Class<?> entityClass)
           
protected  org.hibernate.SessionFactory getSessionFactory()
           
 Map<String,FieldMetadata> getSimpleMergedProperties(String entityName, PersistencePerspective persistencePerspective)
           
 javax.persistence.EntityManager getStandardEntityManager()
           
 Serializable merge(Serializable entity)
           
protected  String pad(String s, int length, char pad)
           
 Serializable persist(Serializable entity)
           
 void refresh(Serializable entity)
           
 void remove(Serializable entity)
           
 Serializable retrieve(Class<?> entityClass, Object primaryKey)
           
 void setEjb3ConfigurationDao(EJB3ConfigurationDao ejb3ConfigurationDao)
           
 void setEntityConfiguration(EntityConfiguration entityConfiguration)
           
 void setFieldMetadataOverrides(Map<String,Map<String,Map<String,FieldMetadata>>> fieldMetadataOverrides)
           
 void setStandardEntityManager(javax.persistence.EntityManager entityManager)
           
protected  void setupBroadleafEnumeration(String broadleafEnumerationClass, FieldMetadata fieldMetadata)
           
protected  boolean testForeignProperty(ForeignKey foreignField, String prefix, String propertyName)
           
 Boolean testPropertyInclusion(FieldPresentationAttributes presentationAttribute)
           
protected  Boolean testPropertyRecursion(String prefix, List<Class<?>> parentClasses, String propertyName, Class<?> targetClass, 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

LOCK_OBJECT

protected static final Object LOCK_OBJECT

METADATA_CACHE

protected static final Map METADATA_CACHE

POLYMORPHIC_ENTITY_CACHE

protected static final Map POLYMORPHIC_ENTITY_CACHE

standardEntityManager

protected javax.persistence.EntityManager standardEntityManager

ejb3ConfigurationDao

protected EJB3ConfigurationDao ejb3ConfigurationDao

entityConfiguration

protected EntityConfiguration entityConfiguration

fieldMetadataOverrides

protected Map<String,Map<String,Map<String,FieldMetadata>>> fieldMetadataOverrides
Constructor Detail

DynamicEntityDaoImpl

public DynamicEntityDaoImpl()
Method Detail

getEntityClass

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

persist

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

merge

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

flush

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

detach

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

refresh

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

retrieve

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

remove

public void remove(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(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 Class<?>[] getAllPolymorphicEntitiesFromCeiling(Class<?> ceilingClass)
Specified by:
getAllPolymorphicEntitiesFromCeiling in interface DynamicEntityDao

addClassToTree

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

createClassTreeFromAnnotation

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

getClassTree

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

getClassTreeFromCeiling

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

getSimpleMergedProperties

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

getMergedProperties

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

getMergedPropertiesRecursively

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

applyForeignKeyPrecedence

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

applyIncludesAndExcludes

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

applyMetadataOverrides

protected void applyMetadataOverrides(String ceilingEntityFullyQualifiedClassname,
                                      String configurationKey,
                                      String prefix,
                                      Boolean isParentExcluded,
                                      Map<String,FieldMetadata> mergedProperties)
                               throws InvocationTargetException,
                                      ClassNotFoundException,
                                      NoSuchMethodException,
                                      IllegalAccessException
Throws:
InvocationTargetException
ClassNotFoundException
NoSuchMethodException
IllegalAccessException

applyAdminPresentationOverrides

protected void applyAdminPresentationOverrides(String prefix,
                                               Boolean isParentExcluded,
                                               Map<String,FieldMetadata> mergedProperties,
                                               Map<String,AdminPresentationOverride> presentationOverrides)
                                        throws InvocationTargetException,
                                               ClassNotFoundException,
                                               NoSuchMethodException,
                                               IllegalAccessException
Throws:
InvocationTargetException
ClassNotFoundException
NoSuchMethodException
IllegalAccessException

pad

protected String pad(String s,
                     int length,
                     char pad)

getCacheKey

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

buildPropertiesFromPolymorphicEntities

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

getFieldMetadata

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

getFieldMetadata

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

setupBroadleafEnumeration

protected void setupBroadleafEnumeration(String broadleafEnumerationClass,
                                         FieldMetadata fieldMetadata)
                                  throws ClassNotFoundException,
                                         NoSuchMethodException,
                                         IllegalAccessException,
                                         InvocationTargetException
Throws:
ClassNotFoundException
NoSuchMethodException
IllegalAccessException
InvocationTargetException

getAllFields

protected Field[] getAllFields(Class<?> targetClass)

getFieldPresentationAttributes

protected Map<String,FieldPresentationAttributes> getFieldPresentationAttributes(Class<?> targetClass)

getPropertiesForPrimitiveClass

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

getSessionFactory

protected org.hibernate.SessionFactory getSessionFactory()

getIdMetadata

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

getPropertyNames

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

getPropertyTypes

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

getPropertiesForEntityClass

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

buildProperties

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

buildProperty

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

testPropertyRecursion

protected Boolean testPropertyRecursion(String prefix,
                                        List<Class<?>> parentClasses,
                                        String propertyName,
                                        Class<?> targetClass,
                                        String ceilingEntityFullyQualifiedClassname)
                                 throws ClassNotFoundException
Throws:
ClassNotFoundException

testPropertyInclusion

public Boolean testPropertyInclusion(FieldPresentationAttributes presentationAttribute)

testForeignProperty

protected boolean testForeignProperty(ForeignKey foreignField,
                                      String prefix,
                                      String propertyName)

findAdditionalForeignKeyIndex

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

buildEntityProperties

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

buildComponentProperties

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

getStandardEntityManager

public javax.persistence.EntityManager getStandardEntityManager()
Specified by:
getStandardEntityManager in interface BaseCriteriaDao<Serializable>
Specified by:
getStandardEntityManager in interface DynamicEntityDao
Specified by:
getStandardEntityManager in class BaseHibernateCriteriaDao<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 Map<String,Map<String,Map<String,FieldMetadata>>> getFieldMetadataOverrides()
Specified by:
getFieldMetadataOverrides in interface DynamicEntityDao

setFieldMetadataOverrides

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


Copyright © 2012. All Rights Reserved.