2013-04-11 10:27:20 +02:00
|
|
|
package com.commafeed.backend.model;
|
|
|
|
|
|
2013-07-24 15:39:20 +02:00
|
|
|
import java.util.Set;
|
|
|
|
|
|
2013-06-19 18:44:56 +02:00
|
|
|
import javax.persistence.Cacheable;
|
2013-04-11 10:27:20 +02:00
|
|
|
import javax.persistence.Column;
|
|
|
|
|
import javax.persistence.Entity;
|
|
|
|
|
import javax.persistence.Lob;
|
2013-07-24 15:39:20 +02:00
|
|
|
import javax.persistence.OneToMany;
|
2013-04-11 10:27:20 +02:00
|
|
|
import javax.persistence.Table;
|
|
|
|
|
|
2013-06-19 18:44:56 +02:00
|
|
|
import org.hibernate.annotations.Cache;
|
|
|
|
|
import org.hibernate.annotations.CacheConcurrencyStrategy;
|
|
|
|
|
|
2013-04-11 10:27:20 +02:00
|
|
|
@Entity
|
|
|
|
|
@Table(name = "FEEDENTRYCONTENTS")
|
|
|
|
|
@SuppressWarnings("serial")
|
2013-06-19 18:44:56 +02:00
|
|
|
@Cacheable
|
|
|
|
|
@Cache(usage = CacheConcurrencyStrategy.TRANSACTIONAL)
|
2013-04-11 10:27:20 +02:00
|
|
|
public class FeedEntryContent extends AbstractModel {
|
|
|
|
|
|
|
|
|
|
@Column(length = 2048)
|
|
|
|
|
private String title;
|
2013-07-26 08:15:23 +02:00
|
|
|
|
|
|
|
|
@Column(length = 40)
|
|
|
|
|
private String titleHash;
|
2013-04-11 10:27:20 +02:00
|
|
|
|
|
|
|
|
@Lob
|
|
|
|
|
@Column(length = Integer.MAX_VALUE)
|
|
|
|
|
private String content;
|
|
|
|
|
|
2013-07-24 15:39:20 +02:00
|
|
|
@Column(length = 40)
|
|
|
|
|
private String contentHash;
|
|
|
|
|
|
|
|
|
|
@Column(name = "author", length = 128)
|
|
|
|
|
private String author;
|
|
|
|
|
|
2013-04-11 10:27:20 +02:00
|
|
|
@Column(length = 2048)
|
|
|
|
|
private String enclosureUrl;
|
|
|
|
|
|
|
|
|
|
@Column(length = 255)
|
|
|
|
|
private String enclosureType;
|
|
|
|
|
|
2013-07-24 15:39:20 +02:00
|
|
|
@OneToMany(mappedBy = "content")
|
|
|
|
|
private Set<FeedEntry> entries;
|
|
|
|
|
|
2013-04-11 10:27:20 +02:00
|
|
|
public String getContent() {
|
|
|
|
|
return content;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setContent(String content) {
|
|
|
|
|
this.content = content;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getEnclosureUrl() {
|
|
|
|
|
return enclosureUrl;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setEnclosureUrl(String enclosureUrl) {
|
|
|
|
|
this.enclosureUrl = enclosureUrl;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getEnclosureType() {
|
|
|
|
|
return enclosureType;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setEnclosureType(String enclosureType) {
|
|
|
|
|
this.enclosureType = enclosureType;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getTitle() {
|
|
|
|
|
return title;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setTitle(String title) {
|
|
|
|
|
this.title = title;
|
|
|
|
|
}
|
|
|
|
|
|
2013-07-24 15:39:20 +02:00
|
|
|
public String getContentHash() {
|
|
|
|
|
return contentHash;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setContentHash(String contentHash) {
|
|
|
|
|
this.contentHash = contentHash;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getAuthor() {
|
|
|
|
|
return author;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setAuthor(String author) {
|
|
|
|
|
this.author = author;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Set<FeedEntry> getEntries() {
|
|
|
|
|
return entries;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setEntries(Set<FeedEntry> entries) {
|
|
|
|
|
this.entries = entries;
|
|
|
|
|
}
|
|
|
|
|
|
2013-07-26 08:15:23 +02:00
|
|
|
public String getTitleHash() {
|
|
|
|
|
return titleHash;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setTitleHash(String titleHash) {
|
|
|
|
|
this.titleHash = titleHash;
|
|
|
|
|
}
|
|
|
|
|
|
2013-04-11 10:27:20 +02:00
|
|
|
}
|