use of gov.ca.cwds.data.legacy.cms.entity.OtherClientName in project api-core by ca-cwds.
the class OtherClientNameService method createOtherClientName.
public void createOtherClientName(OtherClientNameDTO otherClientNameDTO) {
OtherClientName otherClientName = new OtherClientName();
otherClientName.setClientId(otherClientNameDTO.getClientId());
otherClientName.setNamePrefixDescription(Objects.toString(otherClientNameDTO.getNamePrefixDescription(), ""));
otherClientName.setFirstName(Objects.toString(otherClientNameDTO.getFirstName(), ""));
otherClientName.setLastName(Objects.toString(otherClientNameDTO.getLastName(), ""));
otherClientName.setSuffixTitleDescription(Objects.toString(otherClientNameDTO.getSuffixTitleDescription(), ""));
otherClientName.setMiddleName(Objects.toString(otherClientNameDTO.getMiddleName(), ""));
otherClientName.setThirdId(generateId());
NameType nameType = new NameType();
nameType.setSystemId(otherClientNameDTO.getNameType());
otherClientName.setNameType(nameType);
otherClientName.setLastUpdateId(PrincipalUtils.getStaffPersonId());
otherClientName.setLastUpdateTime(LocalDateTime.now());
otherClientNameDao.create(otherClientName);
createClientNameUc(otherClientName);
createPhoneticSearchKeywords(otherClientName);
}
Aggregations