Exemple #1
0
  public boolean hasPermission(String permissionType) {
    Set<UserProfile> a = getUserProfiles();

    for (UserProfile i : a) {
      if (permissionType.equals(i.getType())) return true;
    }

    return false;
  }
 @Transient
 public ArticleEntityDTO toDTOWithoutPages() {
   ArticleEntityDTO dto = new ArticleEntityDTO();
   dto.setAuthor(author.toDTO());
   dto.setCategory(category.toDTO());
   dto.setCreationDate(creationDate);
   dto.setFirstPublicationDate(firstPublicationDate);
   dto.setId(id);
   dto.setPublished(published);
   dto.setTitle(title);
   dto.setText(text);
   dto.setTeaser(teaser);
   return dto;
 }