private void buildMultiJoinTree ( TableAlias left , ClassDescriptor cld , String name , boolean useOuterJoin ) { DescriptorRepository repository = cld . getRepository ( ) ; Class [ ] multiJoinedClasses = repository . getSubClassesMultipleJoinedTables ( cld , false ) ; for ( int i = 0 ; i < multiJoinedClasses . length ; i ++ ) { ClassDescriptor subCld = repository . getDescriptorFor ( multiJoinedClasses [ i ] ) ; SuperReferenceDescriptor srd = subCld . getSuperReference ( ) ; if ( srd != null ) { FieldDescriptor [ ] leftFields = subCld . getPkFields ( ) ; FieldDescriptor [ ] rightFields = srd . getForeignKeyFieldDescriptors ( subCld ) ; TableAlias base_alias = getTableAliasForPath ( name , null , null ) ; String aliasName = String . valueOf ( getAliasChar ( ) ) + m_aliasCount ++ ; TableAlias right = new TableAlias ( subCld , aliasName , false , null ) ; Join join1to1 = new Join ( left , leftFields , right , rightFields , useOuterJoin , "subClass" ) ; base_alias . addJoin ( join1to1 ) ; buildMultiJoinTree ( right , subCld , name , useOuterJoin ) ; } } }
build the Join - Information for Subclasses having a super reference to this class