for (PartyStruct partyStruct : partyEntity.getParentStructs()) {
PartyEntity parent = partyStruct.getParentEntity();
if (parent.getPartyType().getType() == TYPE_ORG) {
OrgDTO orgDto = new OrgDTO();
orgDto.setId(Long.toString(parent.getId()));
orgDto.setName(parent.getName());
orgDto.setTypeName(parent.getPartyType().getName());
orgDto.setType(parent.getPartyType().getType());
orgDto.setRef(parent.getRef());
orgDtos.add(orgDto);
}
}
return orgDtos;