mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
merge push infos into feeds
This commit is contained in:
@@ -6,10 +6,8 @@ import java.util.Set;
|
||||
import javax.persistence.Cacheable;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.FetchType;
|
||||
import javax.persistence.ManyToMany;
|
||||
import javax.persistence.OneToMany;
|
||||
import javax.persistence.OneToOne;
|
||||
import javax.persistence.Table;
|
||||
import javax.persistence.Temporal;
|
||||
import javax.persistence.TemporalType;
|
||||
@@ -73,15 +71,22 @@ public class Feed extends AbstractModel {
|
||||
@Column(length = 255)
|
||||
private String etagHeader;
|
||||
|
||||
@OneToOne(fetch = FetchType.LAZY, mappedBy = "feed")
|
||||
private FeedPushInfo pushInfo;
|
||||
|
||||
@ManyToMany(mappedBy = "feeds")
|
||||
private Set<FeedEntry> entries = Sets.newHashSet();
|
||||
|
||||
@OneToMany(mappedBy = "feed")
|
||||
private Set<FeedSubscription> subscriptions;
|
||||
|
||||
@Column(length = 2048)
|
||||
private String pushHub;
|
||||
|
||||
@Column(length = 2048)
|
||||
@Index(name = "topic_index")
|
||||
private String pushTopic;
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
private Date pushLastPing;
|
||||
|
||||
public Feed() {
|
||||
|
||||
}
|
||||
@@ -186,12 +191,28 @@ public class Feed extends AbstractModel {
|
||||
this.lastUpdateSuccess = lastUpdateSuccess;
|
||||
}
|
||||
|
||||
public FeedPushInfo getPushInfo() {
|
||||
return pushInfo;
|
||||
public String getPushHub() {
|
||||
return pushHub;
|
||||
}
|
||||
|
||||
public void setPushInfo(FeedPushInfo pushInfo) {
|
||||
this.pushInfo = pushInfo;
|
||||
public void setPushHub(String pushHub) {
|
||||
this.pushHub = pushHub;
|
||||
}
|
||||
|
||||
public String getPushTopic() {
|
||||
return pushTopic;
|
||||
}
|
||||
|
||||
public void setPushTopic(String pushTopic) {
|
||||
this.pushTopic = pushTopic;
|
||||
}
|
||||
|
||||
public Date getPushLastPing() {
|
||||
return pushLastPing;
|
||||
}
|
||||
|
||||
public void setPushLastPing(Date pushLastPing) {
|
||||
this.pushLastPing = pushLastPing;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user