use of org.estatio.module.party.fixtures.person.builders.PersonRelationshipBuilder in project estatio by estatio.
the class PersonAndRolesBuilder method execute.
@Override
public void execute(ExecutionContext executionContext) {
object = new PersonBuilder().setReference(reference).setFirstName(firstName).setInitials(initials).setLastName(lastName).setAtPath(atPath).setPersonGenderType(personGenderType).build(this, executionContext).getObject();
if (securityUsername != null) {
applicationUser = new ApplicationUserBuilder().setPerson(object).setSecurityUsername(securityUsername).setSecurityUserAccountCloneFrom(securityUserAccountCloneFrom).build(this, executionContext).getObject();
}
if (emailAddress != null || phoneNumber != null) {
new PersonCommsBuilder().setPerson(object).setEmailAddress(emailAddress).setPhoneNumber(phoneNumber).build(this, executionContext);
}
if (relationshipType != null && fromParty != null) {
partyRelationship = new PersonRelationshipBuilder().setPerson(object).setRelationshipType(relationshipType.fromTitle()).setFromParty(fromParty).build(this, executionContext).getObject();
}
partyRoles = new PersonPartyRolesBuilder().setPerson(object).addPartyRoleTypes(partyRoleTypes).build(this, executionContext).getObject();
fixedAssetRoles = new PersonFixedAssetRolesBuilder().setPerson(object).setFixedAssetRoleSpecs(fixedAssetRoleSpecs).build(this, executionContext).getObject();
}
Aggregations