public DbOrganization getMatchingOrganization ( final DbModule dbModule ) { if ( dbModule . getOrganization ( ) != null && ! dbModule . getOrganization ( ) . isEmpty ( ) ) { return getOrganization ( dbModule . getOrganization ( ) ) ; } for ( final DbOrganization organization : repositoryHandler . getAllOrganizations ( ) ) { final CorporateFilter corporateFilter = new CorporateFilter ( organization ) ; if ( corporateFilter . matches ( dbModule ) ) { return organization ; } } return null ; }
Returns an Organization that suits the Module or null if there is none