package com.docus.server.message.enums;

import com.docus.infrastructure.core.db.enums.IIntegerEnum;

public enum DataFormatEnum implements IIntegerEnum {
    XML(1, "XML"), JSON(2, "JSON");
    Integer value;
    String display;

    DataFormatEnum(Integer value, String display) {
        this.value = value;
        this.display = display;
    }

    @Override
    public Integer getValue() {
        return this.value;
    }

    @Override
    public String getDisplay() {
        return this.display;
    }

    public static DataFormatEnum fromValue(Integer value) {
        try {
            return (DataFormatEnum) IIntegerEnum.fromValue(DataFormatEnum.class, value);
        } catch (Exception ex) {
            return null;
        }
    }
}