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

119 lines
2.4 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-04-07 12:01:50 +02:00
import javax.persistence.JoinTable;
2013-03-20 20:33:42 +01:00
import javax.persistence.Lob;
2013-04-07 12:01:50 +02:00
import javax.persistence.ManyToMany;
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-04-07 12:01:50 +02:00
import com.google.api.client.util.Sets;
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-04-07 16:19:35 +02:00
@ManyToMany
2013-04-07 12:01:50 +02:00
@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();
2013-03-20 20:33:42 +01:00
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;
2013-04-09 11:10:26 +02:00
@Temporal(TemporalType.TIMESTAMP)
@Index(name = "inserted_index")
private Date inserted;
2013-03-20 20:33:42 +01:00
@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;
}
2013-04-07 12:01:50 +02:00
public Set<Feed> getFeeds() {
return feeds;
2013-03-20 20:33:42 +01:00
}
2013-04-07 12:01:50 +02:00
public void setFeeds(Set<Feed> feeds) {
this.feeds = feeds;
2013-03-20 20:33:42 +01:00
}
public Set<FeedEntryStatus> getStatuses() {
return statuses;
}
public void setStatuses(Set<FeedEntryStatus> statuses) {
this.statuses = statuses;
}
2013-04-09 11:10:26 +02:00
public Date getInserted() {
return inserted;
}
public void setInserted(Date inserted) {
this.inserted = inserted;
}
2013-03-20 20:33:42 +01:00
}