Set roleTypes = new HashSet();
if (roleTypesObject instanceof SourceBean) {
SourceBean roleTypeSB = (SourceBean) roleTypesObject;
String roleTypeCd = (String) roleTypeSB.getAttribute("roleType");
roleTypesStrBuffer.append(roleTypeCd);
SbiDomains domainRoleType = findDomain(aSession, roleTypeCd, "ROLE_TYPE");
roleTypes.add(domainRoleType);
} else if (roleTypesObject instanceof List) {
List roleTypesSB = (List) roleTypesObject;
Iterator roleTypesIt = roleTypesSB.iterator();
while (roleTypesIt.hasNext()) {
SourceBean roleTypeSB = (SourceBean) roleTypesIt.next();
String roleTypeCd = (String) roleTypeSB.getAttribute("roleType");
roleTypesStrBuffer.append(roleTypeCd);
if (roleTypesIt.hasNext()) {
roleTypesStrBuffer.append(";");
}
SbiDomains domainRoleType = findDomain(aSession, roleTypeCd, "ROLE_TYPE");
roleTypes.add(domainRoleType);
}
}
aUserFunctionality.setRoleType(roleTypes);