Files
Athou_commafeed/src/main/java/com/commafeed/backend/model/FeedEntry.java

104 lines
1.9 KiB
Java
Raw Normal View History

2013-03-23 16:17:19 +01:00
package com.commafeed.backend.model;
2013-03-20 20:33:42 +01:00
import java.util.Date;
import java.util.Set;
2013-03-20 20:33:42 +01:00
import javax.persistence.Column;
import javax.persistence.Entity;
2013-03-29 11:51:27 +01:00
import javax.persistence.JoinColumn;
2013-03-20 20:33:42 +01:00
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
2013-03-20 20:33:42 +01:00
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
2013-03-29 11:51:27 +01:00
import org.hibernate.annotations.Index;
2013-03-20 20:33:42 +01:00
@Entity
@Table(name = "FEEDENTRIES")
2013-03-21 08:55:53 +01:00
@SuppressWarnings("serial")
2013-03-23 01:49:39 +01:00
public class FeedEntry extends AbstractModel {
2013-03-20 20:33:42 +01:00
2013-03-31 08:45:55 +02:00
@Column(length = 2048, nullable = false)
2013-03-20 20:33:42 +01:00
private String guid;
2013-03-27 10:46:30 +01:00
@ManyToOne
2013-03-29 11:51:27 +01:00
@JoinColumn(nullable = false)
2013-03-20 20:33:42 +01:00
private Feed feed;
2013-03-25 12:24:00 +01:00
@Column(length = 2048)
2013-03-20 20:33:42 +01:00
private String title;
@Lob
2013-04-03 13:33:33 +02:00
@Column(length = Integer.MAX_VALUE)
private String content;
2013-03-20 20:33:42 +01:00
@Column(length = 2048)
private String url;
@Temporal(TemporalType.TIMESTAMP)
2013-03-29 11:51:27 +01:00
@Index(name = "updated_index")
2013-03-20 20:33:42 +01:00
private Date updated;
@OneToMany(mappedBy = "entry")
private Set<FeedEntryStatus> statuses;
2013-03-20 20:33:42 +01:00
public String getGuid() {
return guid;
}
public void setGuid(String guid) {
this.guid = guid;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
2013-03-23 01:15:35 +01:00
public String getContent() {
2013-04-03 13:33:33 +02:00
return content;
2013-03-23 01:15:35 +01:00
}
public void setContent(String content) {
2013-04-03 13:33:33 +02:00
this.content = content;
2013-03-23 01:15:35 +01:00
}
2013-03-20 20:33:42 +01:00
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public Date getUpdated() {
return updated;
}
public void setUpdated(Date updated) {
this.updated = updated;
}
public Feed getFeed() {
return feed;
}
public void setFeed(Feed feed) {
this.feed = feed;
}
public Set<FeedEntryStatus> getStatuses() {
return statuses;
}
public void setStatuses(Set<FeedEntryStatus> statuses) {
this.statuses = statuses;
}
2013-03-20 20:33:42 +01:00
}