forked from gooddata/gooddata-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRestriction.java
More file actions
40 lines (30 loc) · 793 Bytes
/
Copy pathRestriction.java
File metadata and controls
40 lines (30 loc) · 793 Bytes
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
package com.gooddata.md;
/**
* Metadata query restriction
*/
public class Restriction {
private final Type type;
private final String value;
private Restriction(Type type, String value) {
this.type = type;
this.value = value;
}
public Type getType() {
return type;
}
public String getValue() {
return value;
}
public static Restriction identifier(String value) {
return new Restriction(Type.IDENTIFIER, value);
}
public static Restriction title(String value) {
return new Restriction(Type.TITLE, value);
}
public static Restriction summary(String value) {
return new Restriction(Type.SUMMARY, value);
}
static enum Type {
IDENTIFIER, TITLE, SUMMARY
}
}