@Override public ProfileSummary get(int id) { ProfileSummary profileSummary = profilePersister.getProfileSummary(id); if (profileSummary == null) { throw new NotFoundException(); } if (!authService.canRead(profileSummary.getProfile())) { throw new NotAuthorizedException(); } return profileSummary; }
@Override protected Profile retrieveConcrete() throws SQLException { ProfileSummary profileSummary = getProfileSummary(conn, input); return profileSummary == null ? null : profileSummary.getProfile(); }