protected void bindSubClasses ( HibernatePersistentEntity domainClass , PersistentClass parent , InFlightMetadataCollector mappings , String sessionFactoryBeanName ) { final java . util . Collection < PersistentEntity > subClasses = domainClass . getMappingContext ( ) . getDirectChildEntities ( domainClass ) ; for ( PersistentEntity sub : subClasses ) { final Class javaClass = sub . getJavaClass ( ) ; if ( javaClass . getSuperclass ( ) . equals ( domainClass . getJavaClass ( ) ) && ConnectionSourcesSupport . usesConnectionSource ( sub , dataSourceName ) ) { bindSubClass ( ( HibernatePersistentEntity ) sub , parent , mappings , sessionFactoryBeanName ) ; } } }
Binds the sub classes of a root class using table - per - heirarchy inheritance mapping