diff options
author | desperateCoder <echotodevnull@gmail.com> | 2018-12-22 00:44:38 +0300 |
---|---|---|
committer | desperateCoder <echotodevnull@gmail.com> | 2018-12-22 00:44:38 +0300 |
commit | ad49ba195084f884f88e211e1f81765ac710ff52 (patch) | |
tree | e72d28e154f7d530c68c632a794e99bab2a6548e /app/src/main/java/it/niedermann/nextcloud/deck/model/Card.java | |
parent | 18a3805c1c7f785f46062d8df31205aef1a586cb (diff) |
More DAOs and refactoring
Diffstat (limited to 'app/src/main/java/it/niedermann/nextcloud/deck/model/Card.java')
-rw-r--r-- | app/src/main/java/it/niedermann/nextcloud/deck/model/Card.java | 46 |
1 files changed, 5 insertions, 41 deletions
diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/model/Card.java b/app/src/main/java/it/niedermann/nextcloud/deck/model/Card.java index 5a3e349e5..2d8cff0b7 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/model/Card.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/model/Card.java @@ -4,45 +4,40 @@ import android.arch.persistence.room.Entity; import android.arch.persistence.room.Index; import android.support.annotation.NonNull; -import java.util.ArrayList; import java.util.Date; -import java.util.List; import it.niedermann.nextcloud.deck.model.enums.DBStatus; import it.niedermann.nextcloud.deck.model.interfaces.RemoteEntity; -@Entity(inheritSuperIndices = true, indices = {@Index("accountId")}) +@Entity(inheritSuperIndices = true, indices = {@Index(value = "accountId", name = "card_acc")}) public class Card extends RemoteEntity { - private String title; private String description; @NonNull // @Index private long stackId; -// @ToOne(joinProperty = "stackId") + // @ToOne(joinProperty = "stackId") // protected Stack stack; private String type; - private Date lastModified; private Date createdAt; private Date deletedAt; -// @ToMany + // @ToMany // @JoinEntity(entity = JoinCardWithLabel.class, sourceProperty = "cardId", targetProperty = "labelId") // private List<Label> labels = new ArrayList<>(); // @ToMany // @JoinEntity(entity = JoinCardWithUser.class, sourceProperty = "cardId", targetProperty = "userId") - private List<User> assignedUsers = new ArrayList<>(); private String attachments; private int attachmentCount; private Long userId; -// @ToOne(joinProperty = "userId") + // @ToOne(joinProperty = "userId") // private User owner; // @Index @NonNull private int order; -// @Index + // @Index private boolean archived; private Date dueDate; private boolean notified; @@ -50,9 +45,6 @@ public class Card extends RemoteEntity { private int commentsUnread; - public void setAssignedUsers(List<User> assignedUsers) { - this.assignedUsers = assignedUsers; - } public boolean isNotified() { return notified; @@ -62,14 +54,6 @@ public class Card extends RemoteEntity { this.notified = notified; } - public Long getLocalId() { - return localId; - } - - public void setLocalId(Long localId) { - this.localId = localId; - } - public Long getId() { return id; } @@ -118,14 +102,6 @@ public class Card extends RemoteEntity { this.type = type; } - public Date getLastModified() { - return lastModified; - } - - public void setLastModified(Date lastModified) { - this.lastModified = lastModified; - } - public Date getCreatedAt() { return createdAt; } @@ -142,10 +118,6 @@ public class Card extends RemoteEntity { this.deletedAt = deletedAt; } - public void addAssignedUser(User user) { - this.assignedUsers.add(user); - } - public String getAttachments() { return attachments; } @@ -202,10 +174,6 @@ public class Card extends RemoteEntity { this.status = status; } - public boolean getArchived() { - return this.archived; - } - public int getStatus() { return this.status; } @@ -221,8 +189,4 @@ public class Card extends RemoteEntity { public int getOrder() { return this.order; } - - public boolean getNotified() { - return this.notified; - } } |