mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
check if the feed has changed by using publishDate of the feed or the first entry
This commit is contained in:
@@ -31,19 +31,44 @@ public class Feed extends AbstractModel {
|
||||
@Index(name = "urlHash_index")
|
||||
private String urlHash;
|
||||
|
||||
/**
|
||||
* title of the feed, used only when fetching, not stored
|
||||
*/
|
||||
@Transient
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* time it took to fetch the feed, used only when fetching, not stored
|
||||
*/
|
||||
@Transient
|
||||
private long fetchDuration;
|
||||
|
||||
/**
|
||||
* extracted published date from the feed, used only when fetching, not
|
||||
* stored
|
||||
*/
|
||||
@Transient
|
||||
private Date publishedDate;
|
||||
|
||||
/**
|
||||
* The url of the website, extracted from the feed
|
||||
*/
|
||||
@Column(length = 2048)
|
||||
private String link;
|
||||
|
||||
/**
|
||||
* Last time we tried to fetch the feed
|
||||
*/
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Index(name = "lastupdated_index")
|
||||
private Date lastUpdated;
|
||||
|
||||
/**
|
||||
* Last time we successfully refreshed the feed
|
||||
*/
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
private Date lastUpdateSuccess;
|
||||
|
||||
@Column(length = 1024)
|
||||
private String message;
|
||||
|
||||
@@ -169,4 +194,28 @@ public class Feed extends AbstractModel {
|
||||
this.etagHeader = etagHeader;
|
||||
}
|
||||
|
||||
public long getFetchDuration() {
|
||||
return fetchDuration;
|
||||
}
|
||||
|
||||
public void setFetchDuration(long fetchDuration) {
|
||||
this.fetchDuration = fetchDuration;
|
||||
}
|
||||
|
||||
public Date getPublishedDate() {
|
||||
return publishedDate;
|
||||
}
|
||||
|
||||
public void setPublishedDate(Date publishedDate) {
|
||||
this.publishedDate = publishedDate;
|
||||
}
|
||||
|
||||
public Date getLastUpdateSuccess() {
|
||||
return lastUpdateSuccess;
|
||||
}
|
||||
|
||||
public void setLastUpdateSuccess(Date lastUpdateSuccess) {
|
||||
this.lastUpdateSuccess = lastUpdateSuccess;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user