Collection repositoryLanguages = repositoryRead.getRepositoryLanguages();
Iterator repositoryLanguagesIterator = repositoryLanguages.iterator();
while(repositoryLanguagesIterator.hasNext())
{
RepositoryLanguage repositoryLanguage = (RepositoryLanguage)repositoryLanguagesIterator.next();
Language originalLanguage = repositoryLanguage.getLanguage();
Language language = LanguageController.getController().getLanguageWithCode(originalLanguage.getLanguageCode(), db);
if(language == null)
{
db.create(originalLanguage);
language = originalLanguage;
}
repositoryLanguage.setLanguage(language);
repositoryLanguage.setRepository(repositoryRead);
db.create(repositoryLanguage);
logger.info("language:" + language);
logger.info("language.getRepositoryLanguages():" + language.getRepositoryLanguages());
language.getRepositoryLanguages().add(repositoryLanguage);
}
}
db.commit();
}
catch (Exception e)