Beispiel #1
0
 public AuthorEntity createEntry() {
   if (getClass() == AuthorEntity.class) return (AuthorEntity) this;
   AuthorEntity entity = new AuthorEntity();
   entity.setHasUpdates(hasUpdates);
   entity.setId(id);
   entity.setHasAvatar(hasAvatar);
   entity.setHasAbout(hasAbout);
   entity.setDateBirth(dateBirth);
   entity.setRate(rate);
   entity.setSize(size);
   entity.setKudoed(kudoed);
   entity.setLink(link);
   entity.setNewest(newest);
   entity.setShortName(getShortName());
   entity.setFullName(fullName);
   entity.setAnnotation(annotation);
   entity.setEmail(email);
   entity.setWorkCount(workCount);
   entity.setSectionAnnotation(sectionAnnotation);
   entity.setGender(getGender());
   entity.setAbout(about);
   entity.setViews(views);
   entity.setAddress(address);
   entity.setParsed(parsed);
   entity.setSite(site);
   entity.setLastUpdateDate(lastUpdateDate);
   for (Category category : categories) {
     category.setAuthor(entity);
     entity.addCategory(category.createEntry());
   }
   for (Work recommendation : recommendations) {
     recommendation.setAuthor(entity);
     entity.addRecommendation(recommendation.createEntity());
   }
   for (Work rootWork : rootWorks) {
     rootWork.setRootAuthor(entity);
     entity.addRootLink(rootWork.createEntity());
   }
   for (Link rootLink : rootLinks) {
     rootLink.setRootAuthor(entity);
     entity.addRootLink(rootLink.createEntity());
   }
   for (Author author : friendList) {
     entity.addFriend(author.createEntry());
   }
   for (Author author : friendOfList) {
     entity.addFriendOf(author.createEntry());
   }
   return entity;
 }