BirthCertificateCommandConverterImpl.java 1.2 KB

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * Copyright (c) Andrew Grant of Carrick Software 24/03/2025, 17:45. All rights reserved.
  3. *
  4. */
  5. package scot.carricksoftware.grants.converters.certificates.birthcertificates;
  6. import org.springframework.stereotype.Component;
  7. import scot.carricksoftware.grants.commands.certificates.birthcertificates.BirthCertificateCommand;
  8. import scot.carricksoftware.grants.domains.certificates.BirthCertificate;
  9. @Component
  10. public class BirthCertificateCommandConverterImpl implements BirthCertificateCommandConverter {
  11. @SuppressWarnings("DuplicatedCode")
  12. @Override
  13. public BirthCertificate convert(BirthCertificateCommand source) {
  14. BirthCertificate target = new BirthCertificate();
  15. target.setId(source.getId());
  16. target.setNewBorn(source.getNewBorn());
  17. target.setCertificateNumber(source.getCertificateNumber());
  18. target.setCertificateDate(source.getCertificateDate());
  19. target.setCertificateSource(source.getCertificateSource());
  20. target.setCertificateType(source.getCertificateType());
  21. target.setRegistrationAuthority(source.getRegistrationAuthority());
  22. target.setVolume(source.getVolume());
  23. target.setNumber(source.getNumber());
  24. return target;
  25. }
  26. }