Subversion Repositories SmartDukaan

Rev

Rev 24407 | Rev 27112 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 24407 Rev 27107
Line 1... Line 1...
1
/**
1
/**
2
 * 
2
 * 
3
 */
3
 */
4
package com.spice.profitmandi.dao.enumuration.cs;
4
package com.spice.profitmandi.dao.enumuration.cs;
5
 
5
 
-
 
6
import java.util.Arrays;
-
 
7
import java.util.List;
-
 
8
 
6
/**
9
/**
7
 * @author govind
10
 * @author govind
8
 *
11
 *
9
 */
12
 */
10
public enum EscalationType {
13
public enum EscalationType {
11
	
-
 
12
	L1("l1"),
14
	L1("l1"),
13
	L2("l2"),
15
	L2("l2"),
14
	L3("l3"),
16
	L3("l3"),
15
	L4("l4");
17
	L4("l4"),
-
 
18
	L5("l5");
16
 
19
 
17
	private final String value;
20
	private final String value;
18
 
21
 
-
 
22
	private static List<EscalationType> escalations = Arrays.asList(EscalationType.L1, EscalationType.L2, EscalationType.L3, EscalationType.L4, EscalationType.L5);
-
 
23
 
19
	private EscalationType(String value) {
24
	private EscalationType(String value) {
20
		this.value = value;
25
		this.value = value;
21
	}
26
	}
22
 
27
 
23
	public String getValue() {
28
	public String getValue() {
24
		return value;
29
		return value;
25
	}
30
	}
-
 
31
	public EscalationType next(EscalationType escalationType) {
-
 
32
		if(EscalationType.L5.equals(escalationType)) {
-
 
33
			return escalationType;
-
 
34
		}
-
 
35
		return escalations.get(escalations.indexOf(escalationType)+1);
-
 
36
	}
26
 
37
 
27
}
38
}