mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
set parameters for delete query
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package com.commafeed.backend.model;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Table;
|
||||
@@ -7,6 +9,7 @@ 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;
|
||||
|
||||
@Entity
|
||||
@@ -40,6 +43,13 @@ public class ApplicationSettings extends AbstractModel {
|
||||
@Column(length = 255)
|
||||
private String announcement;
|
||||
|
||||
public Date getUnreadThreshold() {
|
||||
int keepStatusDays = getKeepStatusDays();
|
||||
return keepStatusDays > 0 ? DateUtils.addDays(new Date(), -1 * keepStatusDays) : null;
|
||||
}
|
||||
|
||||
/* getters and setters below */
|
||||
|
||||
public String getPublicUrl() {
|
||||
return publicUrl;
|
||||
}
|
||||
@@ -124,8 +134,7 @@ public class ApplicationSettings extends AbstractModel {
|
||||
return googleAnalyticsTrackingCode;
|
||||
}
|
||||
|
||||
public void setGoogleAnalyticsTrackingCode(
|
||||
String googleAnalyticsTrackingCode) {
|
||||
public void setGoogleAnalyticsTrackingCode(String googleAnalyticsTrackingCode) {
|
||||
this.googleAnalyticsTrackingCode = googleAnalyticsTrackingCode;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user