- compare usercert_tab by subject raw bytes + certtype - generate single annotated CSV report - generate merge-<timestamp>.sql in current directory for DBA execution - preserve GBK DN bytes via ATTACH + INSERT OR REPLACE / UPDATE - compatible with sqlite3 3.6.20 and JDK 1.8
29 lines
663 B
Java
29 lines
663 B
Java
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;
|
|
}
|
|
}
|