package com.sunyard.certcompare.model; /** * 人工合并选择。报表中显示为“主”/“备”,内部使用枚举,SQL 中只出现 MAIN/SLAVE。 */ public enum MergeChoice { MAIN("主"), SLAVE("备"); public final String label; MergeChoice(String label) { this.label = label; } public static MergeChoice fromText(String text) { if (text == null) { return null; } String t = text.trim(); for (MergeChoice c : values()) { if (c.label.equals(t) || c.name().equalsIgnoreCase(t)) { return c; } } return null; } }