| 1 | |
|
| 2 | |
|
| 3 | |
|
| 4 | |
|
| 5 | |
|
| 6 | |
|
| 7 | |
|
| 8 | |
|
| 9 | |
|
| 10 | |
|
| 11 | |
|
| 12 | |
|
| 13 | |
|
| 14 | |
|
| 15 | |
|
| 16 | |
package org.kuali.rice.kim.bo.entity.dto; |
| 17 | |
|
| 18 | |
import java.util.ArrayList; |
| 19 | |
import java.util.List; |
| 20 | |
|
| 21 | |
import org.kuali.rice.kim.bo.entity.KimEntityAffiliation; |
| 22 | |
import org.kuali.rice.kim.bo.entity.KimEntityEmploymentInformation; |
| 23 | |
import org.kuali.rice.kim.bo.entity.KimEntityName; |
| 24 | |
|
| 25 | |
|
| 26 | |
|
| 27 | |
|
| 28 | |
|
| 29 | |
|
| 30 | |
|
| 31 | 0 | public class KimEntityDefaultInfo extends KimInactivatableInfo { |
| 32 | |
|
| 33 | |
private static final long serialVersionUID = 7930630152792502380L; |
| 34 | |
protected String entityId; |
| 35 | |
protected KimEntityNameInfo defaultName; |
| 36 | |
protected List<KimPrincipalInfo> principals; |
| 37 | |
protected List<KimEntityEntityTypeDefaultInfo> entityTypes; |
| 38 | |
protected List<KimEntityAffiliationInfo> affiliations; |
| 39 | |
protected KimEntityAffiliationInfo defaultAffiliation; |
| 40 | |
protected KimEntityEmploymentInformationInfo primaryEmployment; |
| 41 | |
protected List<KimEntityExternalIdentifierInfo> externalIdentifiers; |
| 42 | |
protected KimEntityPrivacyPreferencesInfo privacyPreferences; |
| 43 | |
|
| 44 | |
|
| 45 | |
|
| 46 | |
|
| 47 | |
|
| 48 | |
public String getEntityId() { |
| 49 | 0 | return this.entityId; |
| 50 | |
} |
| 51 | |
|
| 52 | |
public void setEntityId(String entityId) { |
| 53 | 0 | this.entityId = entityId; |
| 54 | 0 | } |
| 55 | |
|
| 56 | |
|
| 57 | |
|
| 58 | |
|
| 59 | |
|
| 60 | |
public KimEntityNameInfo getDefaultName() { |
| 61 | 0 | return defaultName; |
| 62 | |
} |
| 63 | |
|
| 64 | |
public void setDefaultName(KimEntityName defaultName) { |
| 65 | 0 | if (defaultName instanceof KimEntityNameInfo) { |
| 66 | 0 | this.defaultName = (KimEntityNameInfo) defaultName; |
| 67 | |
} |
| 68 | |
else { |
| 69 | 0 | this.defaultName = new KimEntityNameInfo(defaultName); |
| 70 | |
} |
| 71 | 0 | } |
| 72 | |
|
| 73 | |
public void setDefaultName(KimEntityNameInfo defaultName) { |
| 74 | 0 | this.defaultName = defaultName; |
| 75 | 0 | } |
| 76 | |
|
| 77 | |
|
| 78 | |
|
| 79 | |
|
| 80 | |
|
| 81 | |
|
| 82 | |
public List<KimEntityEntityTypeDefaultInfo> getEntityTypes() { |
| 83 | |
|
| 84 | 0 | return (entityTypes != null) ? entityTypes : (entityTypes = new ArrayList<KimEntityEntityTypeDefaultInfo>()); |
| 85 | |
} |
| 86 | |
|
| 87 | |
public void setEntityTypes(List<KimEntityEntityTypeDefaultInfo> entityTypes) { |
| 88 | 0 | this.entityTypes = entityTypes; |
| 89 | 0 | } |
| 90 | |
|
| 91 | |
|
| 92 | |
|
| 93 | |
|
| 94 | |
|
| 95 | |
|
| 96 | |
public List<KimEntityAffiliationInfo> getAffiliations() { |
| 97 | |
|
| 98 | 0 | return (affiliations != null) ? affiliations : (affiliations = new ArrayList<KimEntityAffiliationInfo>()); |
| 99 | |
} |
| 100 | |
|
| 101 | |
public void setAffiliations(List<KimEntityAffiliationInfo> affiliations) { |
| 102 | 0 | this.affiliations = affiliations; |
| 103 | 0 | } |
| 104 | |
|
| 105 | |
|
| 106 | |
|
| 107 | |
|
| 108 | |
|
| 109 | |
public KimEntityAffiliationInfo getDefaultAffiliation() { |
| 110 | 0 | return defaultAffiliation; |
| 111 | |
} |
| 112 | |
|
| 113 | |
public void setDefaultAffiliation(KimEntityAffiliation defaultAffiliation) { |
| 114 | 0 | if (defaultAffiliation != null) { |
| 115 | 0 | if (defaultAffiliation instanceof KimEntityAffiliationInfo) { |
| 116 | 0 | this.defaultAffiliation = (KimEntityAffiliationInfo) defaultAffiliation; |
| 117 | |
} |
| 118 | |
else { |
| 119 | 0 | this.defaultAffiliation = new KimEntityAffiliationInfo(defaultAffiliation); |
| 120 | |
} |
| 121 | |
} |
| 122 | 0 | } |
| 123 | |
|
| 124 | |
public void setDefaultAffiliation(KimEntityAffiliationInfo defaultAffiliation) { |
| 125 | 0 | this.defaultAffiliation = defaultAffiliation; |
| 126 | 0 | } |
| 127 | |
|
| 128 | |
|
| 129 | |
|
| 130 | |
|
| 131 | |
|
| 132 | |
public KimEntityEmploymentInformationInfo getPrimaryEmployment() { |
| 133 | 0 | return primaryEmployment; |
| 134 | |
} |
| 135 | |
|
| 136 | |
public void setPrimaryEmployment(KimEntityEmploymentInformation primaryEmployment) { |
| 137 | 0 | if (primaryEmployment != null) { |
| 138 | 0 | if (primaryEmployment instanceof KimEntityEmploymentInformationInfo) { |
| 139 | 0 | this.primaryEmployment = (KimEntityEmploymentInformationInfo) primaryEmployment; |
| 140 | |
} |
| 141 | |
else { |
| 142 | 0 | this.primaryEmployment = new KimEntityEmploymentInformationInfo(primaryEmployment); |
| 143 | |
} |
| 144 | |
} |
| 145 | 0 | } |
| 146 | |
|
| 147 | |
public void setPrimaryEmployment(KimEntityEmploymentInformationInfo primaryEmployment) { |
| 148 | 0 | this.primaryEmployment = primaryEmployment; |
| 149 | 0 | } |
| 150 | |
|
| 151 | |
|
| 152 | |
|
| 153 | |
|
| 154 | |
|
| 155 | |
|
| 156 | |
public List<KimEntityExternalIdentifierInfo> getExternalIdentifiers() { |
| 157 | |
|
| 158 | 0 | return (externalIdentifiers != null) ? |
| 159 | |
externalIdentifiers : (externalIdentifiers = new ArrayList<KimEntityExternalIdentifierInfo>()); |
| 160 | |
} |
| 161 | |
|
| 162 | |
public void setExternalIdentifiers( |
| 163 | |
List<KimEntityExternalIdentifierInfo> externalIdentifiers) { |
| 164 | 0 | this.externalIdentifiers = externalIdentifiers; |
| 165 | 0 | } |
| 166 | |
|
| 167 | |
|
| 168 | |
|
| 169 | |
|
| 170 | |
|
| 171 | |
|
| 172 | |
public List<KimPrincipalInfo> getPrincipals() { |
| 173 | |
|
| 174 | 0 | return (principals != null) ? principals : (principals = new ArrayList<KimPrincipalInfo>()); |
| 175 | |
} |
| 176 | |
|
| 177 | |
public void setPrincipals(List<KimPrincipalInfo> principals) { |
| 178 | 0 | this.principals = principals; |
| 179 | 0 | } |
| 180 | |
|
| 181 | |
|
| 182 | |
|
| 183 | |
|
| 184 | |
|
| 185 | |
|
| 186 | |
public KimEntityEntityTypeDefaultInfo getEntityType(String entityTypeCode) { |
| 187 | 0 | KimEntityEntityTypeDefaultInfo result = null; |
| 188 | 0 | if (entityTypes == null) { |
| 189 | 0 | entityTypes = new ArrayList<KimEntityEntityTypeDefaultInfo>(); |
| 190 | |
} |
| 191 | 0 | for (KimEntityEntityTypeDefaultInfo entType : entityTypes) { |
| 192 | 0 | if (entType.getEntityTypeCode().equals(entityTypeCode)) { |
| 193 | 0 | result = entType; |
| 194 | |
} |
| 195 | |
} |
| 196 | 0 | return result; |
| 197 | |
} |
| 198 | |
|
| 199 | |
|
| 200 | |
|
| 201 | |
|
| 202 | |
|
| 203 | |
public KimEntityPrivacyPreferencesInfo getPrivacyPreferences() { |
| 204 | 0 | return privacyPreferences; |
| 205 | |
} |
| 206 | |
|
| 207 | |
public void setPrivacyPreferences(KimEntityPrivacyPreferencesInfo privacyPreferences) { |
| 208 | 0 | this.privacyPreferences = privacyPreferences; |
| 209 | 0 | } |
| 210 | |
|
| 211 | |
} |