Changed unimportant stuff

This commit is contained in:
DieGurke 2020-04-28 20:08:33 +02:00 committed by kske
parent c2775af8cf
commit a94caede85
2 changed files with 23 additions and 1 deletions

View File

@ -5,6 +5,8 @@ import java.util.Map;
import javax.persistence.*;
import envoy.data.MessageBuilder;
/**
* Project: <strong>envoy-server-standalone</strong><br>
* File: <strong>GroupMessage.java</strong><br>
@ -74,7 +76,26 @@ public class GroupMessage {
// YET
}
// TODO Implement GroupMessageBuilder and add toCommonGroupMessage method here
/**
* Converts this groupMessage into an instance of
* {@link envoy.data.GroupMessage}.
*
* @return a {@link envoy.data.GroupMessage} containing the same values as this
* groupMessage
* @since Envoy Server Standalone v0.1-beta
*/
public envoy.data.GroupMessage toCommonGroupMessage() {
// TODO: Attachment
envoy.data.GroupMessage groupMessage = new MessageBuilder(sender.getID(), group.getID(), id).setDate(creationDate)
.setForwarded(forwarded)
.setStatus(status)
.setText(text)
// .setAttachment(attachment) TODO make this work
.buildGroupMessage(group.toCommon(), memberMessageStatus);
groupMessage.setReceivedDate(receivedDate);
groupMessage.setReadDate(readDate);
return groupMessage;
}
/**
* @return the id

View File

@ -105,6 +105,7 @@ public class Message {
.setDate(creationDate)
.setStatus(status)
.setForwarded(forwarded)
// .setAttachment(attachment) TODO make this work
.build();
message.setReceivedDate(receivedDate);
message.setReadDate(readDate);