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 Image getImage(long imageId) {
   return imageDAO.getImage(imageId);
 }