Subversion Repositories SmartDukaan

Rev

Rev 23780 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
23780 ashik.ali 1
package com.spice.profitmandi.common.enumuration;
2
 
3
public enum ItemType {
32952 amit.gupta 4
	SERIALIZED(1), NON_SERIALIZED(2);
5
 
6
	private final int value;
7
 
8
	private ItemType(int value) {
9
		this.value = value;
10
	}
11
 
12
	/**
13
	 * Get the integer value of this enum value, as defined in the Thrift IDL.
14
	 */
15
	public int getValue() {
16
		return value;
17
	}
18
 
19
	/**
20
	 * Find a the enum type by its integer value, as defined in the Thrift IDL.
21
	 * @return null if the value is not found.
22
	 */
23
	public static ItemType findByValue(int value) {
24
		switch (value) {
25
			case 1:
26
				return SERIALIZED;
27
			case 2:
28
				return NON_SERIALIZED;
29
			default:
30
				return null;
31
		}
32
	}
23780 ashik.ali 33
}