Subversion Repositories SmartDukaan

Rev

Rev 36413 | Blame | Compare with Previous | Last modification | View Log | RSS feed

package com.spice.profitmandi.dao.entity.catalog;

public enum MonitorType {
    focused,
    base;

    public static MonitorType fromString(String value) {
        if (value == null) return null;
        String trimmed = value.trim().toLowerCase();
        try {
            return MonitorType.valueOf(trimmed);
        } catch (IllegalArgumentException e) {
            return null;
        }
    }

    public String dbValue() {
        return name().toLowerCase();
    }
}