|
|
@@ -12,7 +12,6 @@ import org.springframework.stereotype.Component;
|
|
|
import scot.carricksoftware.grants.commands.certificates.birthcertificates.BirthCertificateCommand;
|
|
|
import scot.carricksoftware.grants.commands.certificates.birthcertificates.BirthCertificateCommandImpl;
|
|
|
import scot.carricksoftware.grants.domains.certificates.DeathCertificate;
|
|
|
-import scot.carricksoftware.grants.domains.people.Person;
|
|
|
import scot.carricksoftware.grants.domains.places.Organisation;
|
|
|
import scot.carricksoftware.grants.enums.general.Sex;
|
|
|
import scot.carricksoftware.grants.enums.certificates.CertificateType;
|
|
|
@@ -53,9 +52,7 @@ public class DataLoadCertificates {
|
|
|
|
|
|
private void loadBirthCertificates() {
|
|
|
BirthCertificateCommand birthCertificateCommand = new BirthCertificateCommandImpl();
|
|
|
- Person newBorn = new Person();
|
|
|
- newBorn.setFirstName("new born");
|
|
|
- birthCertificateCommand.setNewBorn(newBorn);
|
|
|
+ birthCertificateCommand.setNewBorn(personService.findById(3L));
|
|
|
birthCertificateCommand.setCertificateDate("25/01/1953");
|
|
|
birthCertificateCommand.setCertificateNumber("999");
|
|
|
birthCertificateCommand.setCertificateType(CertificateType.EXTRACT);
|
|
|
@@ -70,14 +67,9 @@ public class DataLoadCertificates {
|
|
|
birthCertificateCommand.setWhereBorn("where born");
|
|
|
birthCertificateCommand.setDateAndPlaceOfMarriage("date and place of marriage");
|
|
|
birthCertificateCommand.setFatherRank("fatherRank");
|
|
|
-
|
|
|
- Person father = new Person();
|
|
|
- father.setFirstName("father");
|
|
|
- birthCertificateCommand.setFather(father);
|
|
|
+ birthCertificateCommand.setFather(personService.findById(1L));
|
|
|
birthCertificateCommand.setUntrackedFather("untrackedFather");
|
|
|
- Person mother = new Person();
|
|
|
- mother.setFirstName("mother");
|
|
|
- birthCertificateCommand.setMother(mother);
|
|
|
+ birthCertificateCommand.setMother(personService.findById(2L));
|
|
|
|
|
|
birthCertificateService.saveBirthCertificateCommand(birthCertificateCommand);
|
|
|
}
|