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-08-11 12:09:05 +02:00
|
|
|
import lombok.Data;
|
|
|
|
|
import lombok.EqualsAndHashCode;
|
|
|
|
|
|
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-08-11 12:09:05 +02:00
|
|
|
@Data
|
|
|
|
|
@EqualsAndHashCode(callSuper = true)
|
2013-04-11 10:27:20 +02:00
|
|
|
public class FeedEntryContent extends AbstractModel {
|
|
|
|
|
|
|
|
|
|
@Column(length = 2048)
|
|
|
|
|
private String title;
|
2013-08-01 11:17:45 +02:00
|
|
|
|
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
|
|
|
}
|