Search in sources :

Example 1 with PersonBuilder

use of org.estatio.module.party.fixtures.person.builders.PersonBuilder 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();
}
Also used : PersonPartyRolesBuilder(org.estatio.module.party.fixtures.person.builders.PersonPartyRolesBuilder) PersonBuilder(org.estatio.module.party.fixtures.person.builders.PersonBuilder) ApplicationUserBuilder(org.estatio.module.party.fixtures.appuser.ApplicationUserBuilder) PersonCommsBuilder(org.estatio.module.party.fixtures.person.builders.PersonCommsBuilder) PersonRelationshipBuilder(org.estatio.module.party.fixtures.person.builders.PersonRelationshipBuilder)

Aggregations

ApplicationUserBuilder (org.estatio.module.party.fixtures.appuser.ApplicationUserBuilder)1 PersonBuilder (org.estatio.module.party.fixtures.person.builders.PersonBuilder)1 PersonCommsBuilder (org.estatio.module.party.fixtures.person.builders.PersonCommsBuilder)1 PersonPartyRolesBuilder (org.estatio.module.party.fixtures.person.builders.PersonPartyRolesBuilder)1 PersonRelationshipBuilder (org.estatio.module.party.fixtures.person.builders.PersonRelationshipBuilder)1