@@ -0,0 +1,1998 @@
+package de.nschwalbe.postoffice.mongodb;%0A%0Aimport java.time.LocalDateTime;%0A%0Aimport org.springframework.data.annotation.CreatedDate;%0Aimport org.springframework.data.annotation.Id;%0Aimport org.springframework.data.annotation.LastModifiedDate;%0Aimport org.springframework.data.annotation.PersistenceConstructor;%0Aimport org.springframework.data.mongodb.core.index.Indexed;%0Aimport org.springframework.data.mongodb.core.mapping.Document;%0A%0Aimport de.nschwalbe.postoffice.MailProcessState;%0Aimport de.nschwalbe.postoffice.PersistedMail;%0A%0A/**%0A * A mail persisted with mongodb. Mails will be automatically removed after 3 days if send or not.%0A *%0A * @author Nathanael Schwalbe%0A * @since 05.04.2017%0A */%0A@Document(collection = %22mails%22)%0Aclass MailDocument implements PersistedMail %7B%0A%0A    @Id%0A    private String id;%0A%0A    @Indexed(expireAfterSeconds = 259200)%0A    @CreatedDate%0A    private LocalDateTime createdDate;%0A%0A    @LastModifiedDate%0A    private LocalDateTime lastModifiedDate;%0A%0A    private MailProcessState state = MailProcessState.NOT_SENT;%0A    private String errorMessage;%0A%0A    private final byte%5B%5D mimeMessageContent;%0A%0A    @PersistenceConstructor%0A    MailDocument(byte%5B%5D mimeMessageContent) %7B%0A        this.mimeMessageContent = mimeMessageContent;%0A    %7D%0A%0A    @Override%0A    public String getId() %7B%0A        return id;%0A    %7D%0A%0A    @Override%0A    public LocalDateTime getLastModifiedDate() %7B%0A        return lastModifiedDate;%0A    %7D%0A%0A    @Override%0A    public MailProcessState getState() %7B%0A        return state;%0A    %7D%0A%0A    @Override%0A    public void setState(MailProcessState state) %7B%0A        this.state = state;%0A    %7D%0A%0A    @Override%0A    public String getErrorMessage() %7B%0A        return errorMessage;%0A    %7D%0A%0A    @Override%0A    public void setErrorMessage(String errorMessage) %7B%0A        this.errorMessage = errorMessage;%0A    %7D%0A%0A    @Override%0A    public byte%5B%5D getMimeMessageContent() %7B%0A        return mimeMessageContent;%0A    %7D%0A%0A    @Override%0A    public LocalDateTime getCreatedDate() %7B%0A        return createdDate;%0A    %7D%0A%7D%0A

Add MongoDB implementation