Welcome to mirror list, hosted at ThFree Co, Russian Federation.

IRemoteEntity.java « interfaces « model « deck « nextcloud « niedermann « it « java « main « src « app - github.com/stefan-niedermann/nextcloud-deck.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f197c0d304d03785c6ca6aefa1c0374b43308891 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
package it.niedermann.nextcloud.deck.model.interfaces;

import java.time.Instant;
import java.util.ArrayList;
import java.util.List;

import it.niedermann.nextcloud.deck.model.enums.DBStatus;

public interface IRemoteEntity {

    default IRemoteEntity getEntity() {
        return this;
    }

    default Long getLocalId() {
        return getEntity().getLocalId();
    }

    default void setLocalId(Long localId) {
        getEntity().setLocalId(localId);
    }

    default long getAccountId() {
        return getEntity().getAccountId();
    }

    default void setAccountId(long accountId) {
        getEntity().setAccountId(accountId);
    }

    default Long getId() {
        return getEntity().getId();
    }

    default void setId(Long id) {
        getEntity().setId(id);
    }

    default int getStatus() {
        return getEntity().getStatus();
    }

    default void setStatus(int status) {
        getEntity().setStatus(status);
    }

    default Instant getLastModified() {
        return getEntity().getLastModified();
    }

    default void setLastModified(Instant lastModified) {
        getEntity().setLastModified(lastModified);
    }

    default Instant getLastModifiedLocal() {
        return getEntity().getLastModifiedLocal();
    }

    default void setLastModifiedLocal(Instant lastModifiedLocal) {
        getEntity().setLastModifiedLocal(lastModifiedLocal);
    }

    default DBStatus getStatusEnum() {
        return getEntity().getStatusEnum();
    }

    default void setStatusEnum(DBStatus status) {
        getEntity().setStatusEnum(status);
    }

    default String getEtag() {
        return getEntity().getEtag();
    }

    default void setEtag(String etag) {
        getEntity().setEtag(etag);
    }

    default <T> List<T> copyList(List<T> listToCopy) {
        if (listToCopy == null) {
            return null;
        }
        List<T> list = new ArrayList<>(listToCopy.size());
        list.addAll(listToCopy);
        return list;
    }
}