This commit is contained in:
Athou
2013-04-09 09:03:52 +02:00
parent ea8a5def8c
commit 7b9bfeb816
8 changed files with 29 additions and 3 deletions

View File

@@ -66,6 +66,7 @@ public class FeedEntryService extends GenericDAO<FeedEntry> {
feed.setLastUpdated(Calendar.getInstance().getTime());
feed.setMessage(null);
feed.setErrorCount(0);
feedService.update(feed);
}

View File

@@ -49,6 +49,7 @@ public class FeedUpdater {
+ e.getMessage());
feed.setLastUpdated(Calendar.getInstance().getTime());
feed.setMessage("Unable to refresh feed: " + e.getMessage());
feed.setErrorCount(feed.getErrorCount() + 1);
feedService.update(feed);
}
}

View File

@@ -34,6 +34,8 @@ public class Feed extends AbstractModel {
@Column(length = 1024)
private String message;
private int errorCount;
@ManyToMany(mappedBy = "feeds")
private Set<FeedEntry> entries = Sets.newHashSet();
@@ -104,4 +106,12 @@ public class Feed extends AbstractModel {
this.link = link;
}
public int getErrorCount() {
return errorCount;
}
public void setErrorCount(int errorCount) {
this.errorCount = errorCount;
}
}