mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
index hashes
This commit is contained in:
@@ -21,12 +21,22 @@ import com.google.common.collect.Sets;
|
||||
@SuppressWarnings("serial")
|
||||
public class Feed extends AbstractModel {
|
||||
|
||||
/**
|
||||
* The url of the feed
|
||||
*/
|
||||
@Column(length = 2048, nullable = false)
|
||||
private String url;
|
||||
|
||||
@Column(length = 40, nullable = false)
|
||||
@Index(name = "urlHash_index")
|
||||
private String urlHash;
|
||||
|
||||
@Transient
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* The url of the website, extracted from the feed
|
||||
*/
|
||||
@Column(length = 2048)
|
||||
private String link;
|
||||
|
||||
@@ -129,4 +139,12 @@ public class Feed extends AbstractModel {
|
||||
this.disabledUntil = disabledUntil;
|
||||
}
|
||||
|
||||
public String getUrlHash() {
|
||||
return urlHash;
|
||||
}
|
||||
|
||||
public void setUrlHash(String urlHash) {
|
||||
this.urlHash = urlHash;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -28,6 +28,10 @@ public class FeedEntry extends AbstractModel {
|
||||
@Column(length = 2048, nullable = false)
|
||||
private String guid;
|
||||
|
||||
@Column(length = 40, nullable = false)
|
||||
@Index(name = "guidHash_index")
|
||||
private String guidHash;
|
||||
|
||||
@ManyToMany
|
||||
@JoinTable(name = "FEED_FEEDENTRIES", joinColumns = { @JoinColumn(name = "FEED_ID", nullable = false, updatable = false) }, inverseJoinColumns = { @JoinColumn(name = "FEEDENTRY_ID", nullable = false, updatable = false) })
|
||||
private Set<Feed> feeds = Sets.newHashSet();
|
||||
@@ -106,4 +110,12 @@ public class FeedEntry extends AbstractModel {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public String getGuidHash() {
|
||||
return guidHash;
|
||||
}
|
||||
|
||||
public void setGuidHash(String guidHash) {
|
||||
this.guidHash = guidHash;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user