@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((educations == null) ? 0 : educations.hashCode()); result = prime * result + ((employments == null) ? 0 : employments.hashCode()); result = prime * result + ((fundings == null) ? 0 : fundings.hashCode()); result = prime * result + ((peerReviews == null) ? 0 : peerReviews.hashCode()); result = prime * result + ((works == null) ? 0 : works.hashCode()); return result; }
@Override public Collection<? extends Group> retrieveGroups() { return getPeerReviewGroup(); }
public Fundings getFundings() { if (fundings == null) fundings = new Fundings(); return fundings; }
public static void calculateLastModified(ActivitiesSummary activitiesSummary) { if(activitiesSummary != null) { calculateLastModified(activitiesSummary.getEducations()); calculateLastModified(activitiesSummary.getEmployments()); calculateLastModified(activitiesSummary.getFundings()); calculateLastModified(activitiesSummary.getPeerReviews()); calculateLastModified(activitiesSummary.getWorks()); LastModifiedDate l1 = activitiesSummary.getEducations() == null ? null : activitiesSummary.getEducations().getLastModifiedDate(); LastModifiedDate l2= activitiesSummary.getEmployments() == null ? null : activitiesSummary.getEmployments().getLastModifiedDate(); LastModifiedDate l3 = activitiesSummary.getFundings() == null ? null : activitiesSummary.getFundings().getLastModifiedDate(); LastModifiedDate l4 = activitiesSummary.getPeerReviews() == null ? null : activitiesSummary.getPeerReviews().getLastModifiedDate(); LastModifiedDate l5 = activitiesSummary.getWorks() == null ? null : activitiesSummary.getWorks().getLastModifiedDate(); LastModifiedDate globalLatest = calculateLatest(l1, l2, l3, l4, l5); activitiesSummary.setLastModifiedDate(globalLatest); } }
public static void cleanEmptyFields(ActivitiesSummary summaries) { if(summaries != null) { if(summaries.getWorks() != null && summaries.getWorks().getWorkGroup() != null) { for(WorkGroup group : summaries.getWorks().getWorkGroup()) { if(group.getWorkSummary() != null) { for(WorkSummary summary : group.getWorkSummary()) { cleanEmptyFields(summary); } } } } } }
public static void cleanEmptyFields(Works works) { if(works != null) { if(works.getWorkGroup() != null) { for(WorkGroup group : works.getWorkGroup()) { if(group.getWorkSummary() != null) { for(WorkSummary summary : group.getWorkSummary()) { cleanEmptyFields(summary); } } } } } }
public void setSourceName(Fundings fundings) { if (fundings != null) { for (FundingGroup group : fundings.getFundingGroup()) { for (FundingSummary summary : group.getFundingSummary()) { setSourceName(summary); } } } }
public void setSourceName(PeerReviews peerReviews) { if (peerReviews != null) { for (PeerReviewGroup group : peerReviews.getPeerReviewGroup()) { for (PeerReviewSummary summary : group.getPeerReviewSummary()) { setSourceName(summary); } } } } }
@Override public Collection<? extends GroupableActivity> getActivities() { return getWorkSummary(); }
@Override public Collection<? extends Group> retrieveGroups() { return getWorkGroup(); }
@Override public Collection<? extends GroupableActivity> getActivities() { return getFundingSummary(); }
@Override public Collection<? extends GroupableActivity> getActivities() { return getPeerReviewSummary(); }
public Collection<? extends Group> retrieveGroups() { return getFundingGroup(); }
public void setSourceName(Employments employments) { if (employments != null) { for (EmploymentSummary summary : employments.getSummaries()) { setSourceName(summary); } } }
public void setSourceName(Educations educations) { if (educations != null) { for (EducationSummary summary : educations.getSummaries()) { setSourceName(summary); } } }
public PeerReviews getPeerReviews() { if (peerReviews == null) peerReviews = new PeerReviews(); return peerReviews; }
public Works getWorks() { if (works == null) works = new Works(); return works; }
/** * From database to model object */ @Override public void mapBtoA(MinimizedWorkEntity b, WorkSummary a, MappingContext context) { a.setType(getWorkType(b.getWorkType())); }
public void setSourceName(Works works) { if (works != null) { for (WorkGroup group : works.getWorkGroup()) { for (WorkSummary summary : group.getWorkSummary()) { setSourceName(summary); } } } }
/** * From database to model object */ @Override public void mapBtoA(WorkEntity b, WorkSummary a, MappingContext context) { a.setType(getWorkType(b.getWorkType())); }