Subversion Repositories SmartDukaan

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
21719 ashik.ali 1
package com.spice.profitmandi.dao.enumuration.dtr;
21545 ashik.ali 2
 
3
public enum ContentType{
4
	PDF(0),
5
	JPEG(1),
6
	PNG(2);
7
 
8
	private final int value;
9
 
10
	private ContentType(int value) {
11
		this.value = value;
12
	}
13
 
14
	public int getValue() {
15
		return value;
16
	}
17
 
18
	public static ContentType findByValue(int value) { 
19
		switch (value) {
20
		case 0:
21
			return PDF;
22
		case 1:
23
			return JPEG;
24
		case 2:
25
			return PNG;
26
		default:
27
			return null;
28
		}
29
	}
30
}