public void markTranslationDocumentAsInArbeit(
     TranslationDocument td, List<String> langsToGenerate) {
   if (langsToGenerate.contains("fr")) {
     td.setStatusFr(IN_ARBEIT);
   }
   if (langsToGenerate.contains("it")) {
     td.setStatusIt(IN_ARBEIT);
   }
   if (langsToGenerate.contains("en")) {
     td.setStatusEn(IN_ARBEIT);
   }
   merge(td);
 }
 private TranslationDocument read(TranslationDocument entry) {
   switch (entry.getType()) {
     case IMAGE:
       return imageDAO.getImage(((Image) entry).getId());
     case DOCUMENT:
       return documentDAO.getDocument(((Document) entry).getId());
     default:
       return null;
   }
 }
 public TranslationDocument updateTranslationEntity(
     TranslationDocument entry, String url, String lang) {
   TranslationDocument read = read(entry);
   if ("fr".equals(lang)) {
     read.setStatusFr(calcStatus(url));
     read.setUrlFr(url);
   } else if ("it".equals(lang)) {
     read.setStatusIt(calcStatus(url));
     read.setUrlIt(url);
   } else if ("en".equals(lang)) {
     read.setStatusEn(calcStatus(url));
     read.setUrlEn(url);
   }
   return merge(read);
 }