diff options
author | David Development <david-dev@live.de> | 2014-07-28 13:52:21 +0400 |
---|---|---|
committer | David Development <david-dev@live.de> | 2014-07-28 13:53:03 +0400 |
commit | d378e2bba063852a463c8a554afe1566043502ac (patch) | |
tree | 6b85c4b258ccdd86bfad718101df2bd704532951 /News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/database/model/RssItem.java | |
parent | bffef458cb3079ef928486ab7e7b2fb4ef454b15 (diff) |
Update Backend to ORM/Remove abs -> appcompat
Diffstat (limited to 'News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/database/model/RssItem.java')
-rw-r--r-- | News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/database/model/RssItem.java | 269 |
1 files changed, 269 insertions, 0 deletions
diff --git a/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/database/model/RssItem.java b/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/database/model/RssItem.java new file mode 100644 index 00000000..9bfb859b --- /dev/null +++ b/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/database/model/RssItem.java @@ -0,0 +1,269 @@ +package de.luhmer.owncloudnewsreader.database.model; + +import de.greenrobot.dao.DaoException; +import de.luhmer.owncloudnewsreader.adapter.HasId; + +// THIS CODE IS GENERATED BY greenDAO, EDIT ONLY INSIDE THE "KEEP"-SECTIONS + +// KEEP INCLUDES - put your custom includes here +// KEEP INCLUDES END +/** + * Entity mapped to table RSS_ITEM. + */ +public class RssItem implements HasId<Long> { + + private long id; + private long feedId; + private String link; + private String title; + private String body; + private Boolean read; + private Boolean starred; + /** Not-null value. */ + private String author; + /** Not-null value. */ + private String guid; + /** Not-null value. */ + private String guidHash; + private Boolean read_temp; + private Boolean starred_temp; + private java.util.Date lastModified; + private java.util.Date pubDate; + private String enclosureLink; + private String enclosureMime; + + /** Used to resolve relations */ + private transient DaoSession daoSession; + + /** Used for active entity operations. */ + private transient RssItemDao myDao; + + private Feed feed; + private Long feed__resolvedKey; + + + // KEEP FIELDS - put your custom fields here + // KEEP FIELDS END + + public RssItem() { + } + + public RssItem(long id) { + this.id = id; + } + + public RssItem(long id, long feedId, String link, String title, String body, Boolean read, Boolean starred, String author, String guid, String guidHash, Boolean read_temp, Boolean starred_temp, java.util.Date lastModified, java.util.Date pubDate, String enclosureLink, String enclosureMime) { + this.id = id; + this.feedId = feedId; + this.link = link; + this.title = title; + this.body = body; + this.read = read; + this.starred = starred; + this.author = author; + this.guid = guid; + this.guidHash = guidHash; + this.read_temp = read_temp; + this.starred_temp = starred_temp; + this.lastModified = lastModified; + this.pubDate = pubDate; + this.enclosureLink = enclosureLink; + this.enclosureMime = enclosureMime; + } + + /** called by internal mechanisms, do not call yourself. */ + public void __setDaoSession(DaoSession daoSession) { + this.daoSession = daoSession; + myDao = daoSession != null ? daoSession.getRssItemDao() : null; + } + + public Long getId() { + return id; + } + + public void setId(long id) { + this.id = id; + } + + public long getFeedId() { + return feedId; + } + + public void setFeedId(long feedId) { + this.feedId = feedId; + } + + public String getLink() { + return link; + } + + public void setLink(String link) { + this.link = link; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getBody() { + return body; + } + + public void setBody(String body) { + this.body = body; + } + + public Boolean getRead() { + return read; + } + + public void setRead(Boolean read) { + this.read = read; + } + + public Boolean getStarred() { + return starred; + } + + public void setStarred(Boolean starred) { + this.starred = starred; + } + + /** Not-null value. */ + public String getAuthor() { + return author; + } + + /** Not-null value; ensure this value is available before it is saved to the database. */ + public void setAuthor(String author) { + this.author = author; + } + + /** Not-null value. */ + public String getGuid() { + return guid; + } + + /** Not-null value; ensure this value is available before it is saved to the database. */ + public void setGuid(String guid) { + this.guid = guid; + } + + /** Not-null value. */ + public String getGuidHash() { + return guidHash; + } + + /** Not-null value; ensure this value is available before it is saved to the database. */ + public void setGuidHash(String guidHash) { + this.guidHash = guidHash; + } + + public Boolean getRead_temp() { + return read_temp; + } + + public void setRead_temp(Boolean read_temp) { + this.read_temp = read_temp; + } + + public Boolean getStarred_temp() { + return starred_temp; + } + + public void setStarred_temp(Boolean starred_temp) { + this.starred_temp = starred_temp; + } + + public java.util.Date getLastModified() { + return lastModified; + } + + public void setLastModified(java.util.Date lastModified) { + this.lastModified = lastModified; + } + + public java.util.Date getPubDate() { + return pubDate; + } + + public void setPubDate(java.util.Date pubDate) { + this.pubDate = pubDate; + } + + public String getEnclosureLink() { + return enclosureLink; + } + + public void setEnclosureLink(String enclosureLink) { + this.enclosureLink = enclosureLink; + } + + public String getEnclosureMime() { + return enclosureMime; + } + + public void setEnclosureMime(String enclosureMime) { + this.enclosureMime = enclosureMime; + } + + /** To-one relationship, resolved on first access. */ + public Feed getFeed() { + long __key = this.feedId; + if (feed__resolvedKey == null || !feed__resolvedKey.equals(__key)) { + if (daoSession == null) { + throw new DaoException("Entity is detached from DAO context"); + } + FeedDao targetDao = daoSession.getFeedDao(); + Feed feedNew = targetDao.load(__key); + synchronized (this) { + feed = feedNew; + feed__resolvedKey = __key; + } + } + return feed; + } + + public void setFeed(Feed feed) { + if (feed == null) { + throw new DaoException("To-one property 'feedId' has not-null constraint; cannot set to-one to null"); + } + synchronized (this) { + this.feed = feed; + feedId = feed.getId(); + feed__resolvedKey = feedId; + } + } + + /** Convenient call for {@link AbstractDao#delete(Object)}. Entity must attached to an entity context. */ + public void delete() { + if (myDao == null) { + throw new DaoException("Entity is detached from DAO context"); + } + myDao.delete(this); + } + + /** Convenient call for {@link AbstractDao#update(Object)}. Entity must attached to an entity context. */ + public void update() { + if (myDao == null) { + throw new DaoException("Entity is detached from DAO context"); + } + myDao.update(this); + } + + /** Convenient call for {@link AbstractDao#refresh(Object)}. Entity must attached to an entity context. */ + public void refresh() { + if (myDao == null) { + throw new DaoException("Entity is detached from DAO context"); + } + myDao.refresh(this); + } + + // KEEP METHODS - put your custom methods here + // KEEP METHODS END + +} |