private UpdatedRepresentation createUpdatedDocumentPartFromUpdatedFlags(Mailbox mailbox, UpdatedFlags updatedFlags) { try { return new UpdatedRepresentation( indexIdFor(mailbox, updatedFlags.getUid()), messageToElasticSearchJson.getUpdatedJsonMessagePart( updatedFlags.getNewFlags(), updatedFlags.getModSeq())); } catch (JsonProcessingException e) { throw new RuntimeException("Error while creating updatedDocumentParts", e); } }
public UpdatedFlagsDataTransferObject(UpdatedFlags updatedFlags) { this.uid = updatedFlags.getUid().asLong(); this.modseq = updatedFlags.getModSeq(); this.oldFlags = new FlagsDataTransferObject(updatedFlags.getOldFlags()); this.newFlags = new FlagsDataTransferObject(updatedFlags.getNewFlags()); }