Improve NotificationMsgConstructorImpl

This commit is contained in:
Andrii Landiak 2024-04-11 17:31:51 +03:00
parent e8c238e5a6
commit fed295017d

View File

@ -35,9 +35,7 @@ public class NotificationMsgConstructorImpl implements NotificationMsgConstructo
@Override @Override
public NotificationRuleUpdateMsg constructNotificationRuleUpdateMsg(UpdateMsgType msgType, NotificationRule notificationRule) { public NotificationRuleUpdateMsg constructNotificationRuleUpdateMsg(UpdateMsgType msgType, NotificationRule notificationRule) {
return NotificationRuleUpdateMsg.newBuilder().setMsgType(msgType).setEntity(JacksonUtil.toString(notificationRule)) return NotificationRuleUpdateMsg.newBuilder().setMsgType(msgType).setEntity(JacksonUtil.toString(notificationRule)).build();
.setIdMSB(notificationRule.getId().getId().getMostSignificantBits())
.setIdLSB(notificationRule.getId().getId().getLeastSignificantBits()).build();
} }
@Override @Override
@ -50,9 +48,7 @@ public class NotificationMsgConstructorImpl implements NotificationMsgConstructo
@Override @Override
public NotificationTargetUpdateMsg constructNotificationTargetUpdateMsg(UpdateMsgType msgType, NotificationTarget notificationTarget) { public NotificationTargetUpdateMsg constructNotificationTargetUpdateMsg(UpdateMsgType msgType, NotificationTarget notificationTarget) {
return NotificationTargetUpdateMsg.newBuilder().setMsgType(msgType).setEntity(JacksonUtil.toString(notificationTarget)) return NotificationTargetUpdateMsg.newBuilder().setMsgType(msgType).setEntity(JacksonUtil.toString(notificationTarget)).build();
.setIdMSB(notificationTarget.getId().getId().getMostSignificantBits())
.setIdLSB(notificationTarget.getId().getId().getLeastSignificantBits()).build();
} }
@Override @Override
@ -65,9 +61,7 @@ public class NotificationMsgConstructorImpl implements NotificationMsgConstructo
@Override @Override
public NotificationTemplateUpdateMsg constructNotificationTemplateUpdateMsg(UpdateMsgType msgType, NotificationTemplate notificationTemplate) { public NotificationTemplateUpdateMsg constructNotificationTemplateUpdateMsg(UpdateMsgType msgType, NotificationTemplate notificationTemplate) {
return NotificationTemplateUpdateMsg.newBuilder().setMsgType(msgType).setEntity(JacksonUtil.toString(notificationTemplate)) return NotificationTemplateUpdateMsg.newBuilder().setMsgType(msgType).setEntity(JacksonUtil.toString(notificationTemplate)).build();
.setIdMSB(notificationTemplate.getId().getId().getMostSignificantBits())
.setIdLSB(notificationTemplate.getId().getId().getLeastSignificantBits()).build();
} }
@Override @Override