Subversion Repositories SmartDukaan

Rev

Rev 21545 | Rev 22124 | Go to most recent revision | View as "text/plain" | Blame | Compare with Previous | Last modification | View Log | RSS feed

package com.spice.profitmandi.dao.enumuration.dtr;

public enum ContentType{
        PDF(0),
        JPEG(1),
        PNG(2);

        private final int value;

        private ContentType(int value) {
                this.value = value;
        }

        public int getValue() {
                return value;
        }

        public static ContentType findByValue(int value) { 
                switch (value) {
                case 0:
                        return PDF;
                case 1:
                        return JPEG;
                case 2:
                        return PNG;
                default:
                        return null;
                }
        }
}