com.mycomm.dao.dao4comm.annotation.dialect.UniversalEngine Maven / Gradle / Ivy
The newest version!
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.mycomm.dao.dao4comm.annotation.dialect;
/**
*
* @author jw362j
*/
public enum UniversalEngine {
EngineFEDERATED("FEDERATED"),
EngineMRGMYISAM("MRG_MYISAM"),
EngineMyISAM("MyISAM"),
EngineBLACKHOLE("BLACKHOLE"),
EngineCSV("CSV"),
EngineMEMORY("MEMORY"),
EngineARCHIVE("ARCHIVE"),
EnginePERFORMANCESCHEMA("PERFORMANCE_SCHEMA"),
EngineInnoDB("InnoDB"),
EngineDEFAULT("InnoDB");
@Override
public String toString() {
return value;
}
@SuppressWarnings("FieldMayBeFinal")
private String value;
private UniversalEngine(String value) {
this.value = value;
}
public String getValue() {
return value;
}
public static UniversalEngine fromValue(String v) {
if ("".equals(v) || v == null) {
return UniversalEngine.EngineDEFAULT;
}
for (UniversalEngine c : values()) {
if (c.value.equals(v)) {
return c;
}
}
throw new IllegalArgumentException(v);
}
}