Project

General

Profile

1
package eu.dnetlib.uoamonitorservice.entities;
2

    
3
import java.util.HashMap;
4
import java.util.Map;
5

    
6
public enum Visibility {
7
    // Do not rename or remove existring values. This may cause problems with already stored values in DB
8
    // PUBLIC("public"), RESTRICTED("restricted"), PRIVATE("private");
9

    
10
    PUBLIC, RESTRICTED, PRIVATE
11
//    private String label;
12
//
13
//    private Visibility(String label) {
14
//        this.label = label;
15
//    }
16
//
17
//    public String getLabel() {
18
//        return this.label;
19
//    }
20
//
21
//    //Lookup table
22
//    private static final Map<String, Visibility> lookup = new HashMap<>();
23
//
24
//    //Populate the lookup table on loading time
25
//    static
26
//    {
27
//        for(Visibility visibility : Visibility.values())
28
//        {
29
//            lookup.put(visibility.getLabel(), visibility);
30
//        }
31
//    }
32
//
33
//    //This method can be used for reverse lookup purpose
34
//    public static Visibility get(String visibility)
35
//    {
36
//        return lookup.get(visibility);
37
//    }
38
}
(8-8/8)