@JsonValue public String getName() { return this.name(); }
public List<Affiliation> getAffiliationsByType(AffiliationType affiliationType) { List<Affiliation> filteredAffilations = new ArrayList<Affiliation>(); if (affiliation != null && affiliationType != null) { for (Affiliation aff : affiliation) { if (affiliationType.equals(aff.getType())) { filteredAffilations.add(aff); } } } return filteredAffilations; }
public static AffiliationType fromValue(String v) { for (AffiliationType c : AffiliationType.values()) { if (c.value.equals(v)) { return c; } } throw new IllegalArgumentException(v); } }
/** * * Note that put-code is not part of hashCode or equals! This is to allow * better de-duplication. * */ @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((departmentName == null) ? 0 : departmentName.hashCode()); result = prime * result + ((endDate == null) ? 0 : endDate.hashCode()); result = prime * result + ((organization == null) ? 0 : organization.hashCode()); result = prime * result + ((roleTitle == null) ? 0 : roleTitle.hashCode()); result = prime * result + ((source == null) ? 0 : source.hashCode()); result = prime * result + ((startDate == null) ? 0 : startDate.hashCode()); result = prime * result + ((type == null) ? 0 : type.hashCode()); result = prime * result + ((visibility == null) ? 0 : visibility.hashCode()); return result; }
affiliation.setPutCode(Long.toString(orgAffiliationRelationEntity.getId())); if(orgAffiliationRelationEntity.getAffiliationType() != null) { affiliation.setType(AffiliationType.valueOf(orgAffiliationRelationEntity.getAffiliationType()));
FuzzyDate endDate = affiliation.getEndDate(); if(affiliation.getType() != null) { orgRelationEntity.setAffiliationType(affiliation.getType().name());