diff options
author | Stefan Niedermann <info@niedermann.it> | 2020-07-17 16:09:06 +0300 |
---|---|---|
committer | Stefan Niedermann <info@niedermann.it> | 2020-07-17 16:09:06 +0300 |
commit | 9a54264b44049d30ecc610c1810d29e819d8fb93 (patch) | |
tree | 25152aab5c49ca77edbb2ddfc9d45a77da7def4c /app/src/main/java/it/niedermann/nextcloud/deck/model | |
parent | bba2396ab3679802cbfbdf4e47dac835eb96127a (diff) |
#515 Reduce amount of data which is queried by the database - Remove generics from RemoteEntity stuff
Diffstat (limited to 'app/src/main/java/it/niedermann/nextcloud/deck/model')
5 files changed, 8 insertions, 8 deletions
diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/model/full/FullBoard.java b/app/src/main/java/it/niedermann/nextcloud/deck/model/full/FullBoard.java index 279609c1f..95875d5a3 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/model/full/FullBoard.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/model/full/FullBoard.java @@ -14,7 +14,7 @@ import it.niedermann.nextcloud.deck.model.Stack; import it.niedermann.nextcloud.deck.model.User; import it.niedermann.nextcloud.deck.model.interfaces.IRemoteEntity; -public class FullBoard implements IRemoteEntity<Board> { +public class FullBoard implements IRemoteEntity { @Embedded public Board board; diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/model/full/FullCard.java b/app/src/main/java/it/niedermann/nextcloud/deck/model/full/FullCard.java index 895093d61..398ac9ccb 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/model/full/FullCard.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/model/full/FullCard.java @@ -20,7 +20,7 @@ import it.niedermann.nextcloud.deck.model.User; import it.niedermann.nextcloud.deck.model.interfaces.IRemoteEntity; import it.niedermann.nextcloud.deck.model.ocs.comment.DeckComment; -public class FullCard implements IRemoteEntity<Card>, DragAndDropModel { +public class FullCard implements IRemoteEntity, DragAndDropModel { @Ignore private transient boolean isAttachmentsSorted = false; diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/model/full/FullStack.java b/app/src/main/java/it/niedermann/nextcloud/deck/model/full/FullStack.java index 36501a72c..1c9e94899 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/model/full/FullStack.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/model/full/FullStack.java @@ -10,7 +10,7 @@ import it.niedermann.nextcloud.deck.model.Card; import it.niedermann.nextcloud.deck.model.Stack; import it.niedermann.nextcloud.deck.model.interfaces.IRemoteEntity; -public class FullStack implements IRemoteEntity<Stack> { +public class FullStack implements IRemoteEntity { @Embedded public Stack stack; diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/model/interfaces/AbstractRemoteEntity.java b/app/src/main/java/it/niedermann/nextcloud/deck/model/interfaces/AbstractRemoteEntity.java index 5055c88ab..c19e52970 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/model/interfaces/AbstractRemoteEntity.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/model/interfaces/AbstractRemoteEntity.java @@ -26,7 +26,7 @@ import it.niedermann.nextcloud.deck.model.enums.DBStatus; ) } ) -public abstract class AbstractRemoteEntity implements IRemoteEntity<AbstractRemoteEntity> { +public abstract class AbstractRemoteEntity implements IRemoteEntity{ @PrimaryKey(autoGenerate = true) protected Long localId; @@ -53,7 +53,7 @@ public abstract class AbstractRemoteEntity implements IRemoteEntity<AbstractRemo @Ignore @Override - public AbstractRemoteEntity getEntity() { + public IRemoteEntity getEntity() { return this; } diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/model/interfaces/IRemoteEntity.java b/app/src/main/java/it/niedermann/nextcloud/deck/model/interfaces/IRemoteEntity.java index e7e9433e4..b7af4592c 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/model/interfaces/IRemoteEntity.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/model/interfaces/IRemoteEntity.java @@ -6,10 +6,10 @@ import java.util.List; import it.niedermann.nextcloud.deck.model.enums.DBStatus; -public interface IRemoteEntity<T extends IRemoteEntity<?>> { +public interface IRemoteEntity { - default T getEntity() { - return (T) this; + default IRemoteEntity getEntity() { + return this; } default Long getLocalId() { |