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

Permission.java « 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: f0c46787bc06221ef5cb8527912dcd657595d900 (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
package it.niedermann.nextcloud.deck.model;

import android.arch.persistence.room.Entity;
import android.arch.persistence.room.PrimaryKey;

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

@Entity(inheritSuperIndices = true)
public class Permission {
    @PrimaryKey(autoGenerate = true)
    long id;

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public PermissionType getType() {
        return PermissionType.findById(id);
    }

    public void setType(PermissionType type) {
        this.id = type.getId();
    }
}