move utility method to service (fix #463)

This commit is contained in:
Athou
2013-07-27 13:01:28 +02:00
parent 4b080510e7
commit 1131d70645
4 changed files with 10 additions and 14 deletions

View File

@@ -1,7 +1,5 @@
package com.commafeed.backend.model;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
@@ -9,11 +7,8 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import org.apache.commons.lang3.time.DateUtils;
import org.apache.log4j.Level;
import com.fasterxml.jackson.annotation.JsonIgnore;
@Entity
@Table(name = "APPLICATIONSETTINGS")
@SuppressWarnings("serial")
@@ -45,12 +40,6 @@ public class ApplicationSettings extends AbstractModel {
@Column(length = 255)
private String announcement;
@JsonIgnore
public Date getUnreadThreshold() {
int keepStatusDays = getKeepStatusDays();
return keepStatusDays > 0 ? DateUtils.addDays(new Date(), -1 * keepStatusDays) : null;
}
/* getters and setters below */
public String getPublicUrl() {