summaryrefslogtreecommitdiff
path: root/src/de/danoeh/antennapod/feed/FeedPreferences.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/de/danoeh/antennapod/feed/FeedPreferences.java')
-rw-r--r--src/de/danoeh/antennapod/feed/FeedPreferences.java89
1 files changed, 0 insertions, 89 deletions
diff --git a/src/de/danoeh/antennapod/feed/FeedPreferences.java b/src/de/danoeh/antennapod/feed/FeedPreferences.java
deleted file mode 100644
index 29bc5ef0c..000000000
--- a/src/de/danoeh/antennapod/feed/FeedPreferences.java
+++ /dev/null
@@ -1,89 +0,0 @@
-package de.danoeh.antennapod.feed;
-
-import android.content.Context;
-import de.danoeh.antennapod.storage.DBWriter;
-import org.apache.commons.lang3.StringUtils;
-
-/**
- * Contains preferences for a single feed.
- */
-public class FeedPreferences {
-
- private long feedID;
- private boolean autoDownload;
- private String username;
- private String password;
-
- public FeedPreferences(long feedID, boolean autoDownload, String username, String password) {
- this.feedID = feedID;
- this.autoDownload = autoDownload;
- this.username = username;
- this.password = password;
- }
-
-
- /**
- * Compare another FeedPreferences with this one. The feedID and autoDownload attribute are excluded from the
- * comparison.
- *
- * @return True if the two objects are different.
- */
- public boolean compareWithOther(FeedPreferences other) {
- if (other == null)
- return true;
- if (!StringUtils.equals(username, other.username)) {
- return true;
- }
- if (!StringUtils.equals(password, other.password)) {
- return true;
- }
- return false;
- }
-
- /**
- * Update this FeedPreferences object from another one. The feedID and autoDownload attributes are excluded
- * from the update.
- */
- public void updateFromOther(FeedPreferences other) {
- if (other == null)
- return;
- this.username = other.username;
- this.password = other.password;
- }
-
- public long getFeedID() {
- return feedID;
- }
-
- public void setFeedID(long feedID) {
- this.feedID = feedID;
- }
-
- public boolean getAutoDownload() {
- return autoDownload;
- }
-
- public void setAutoDownload(boolean autoDownload) {
- this.autoDownload = autoDownload;
- }
-
- public void save(Context context) {
- DBWriter.setFeedPreferences(context, this);
- }
-
- public String getUsername() {
- return username;
- }
-
- public void setUsername(String username) {
- this.username = username;
- }
-
- public String getPassword() {
- return password;
- }
-
- public void setPassword(String password) {
- this.password = password;
- }
-}