org.openxma.dsl.dom.model.DataBaseDialect Maven / Gradle / Ivy
/**
*
*
*
* $Id$
*/
package org.openxma.dsl.dom.model;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import org.eclipse.emf.common.util.Enumerator;
/**
*
* A representation of the literals of the enumeration 'Data Base Dialect',
* and utility methods for working with them.
*
* @see org.openxma.dsl.dom.DomPackage#getDataBaseDialect()
* @model
* @generated
*/
public enum DataBaseDialect implements Enumerator {
/**
* The 'ORACLE' literal object.
*
*
* @see #ORACLE_VALUE
* @generated
* @ordered
*/
ORACLE(0, "ORACLE", "Oracle"),
/**
* The 'HSQLDB' literal object.
*
*
* @see #HSQLDB_VALUE
* @generated
* @ordered
*/
HSQLDB(1, "HSQLDB", "HsqlDb"),
/**
* The 'MYSQL' literal object.
*
*
* @see #MYSQL_VALUE
* @generated
* @ordered
*/
MYSQL(2, "MYSQL", "MySql");
/**
* The 'ORACLE' literal value.
*
*
* If the meaning of 'ORACLE' literal object isn't clear,
* there really should be more of a description here...
*
*
* @see #ORACLE
* @model literal="Oracle"
* @generated
* @ordered
*/
public static final int ORACLE_VALUE = 0;
/**
* The 'HSQLDB' literal value.
*
*
* If the meaning of 'HSQLDB' literal object isn't clear,
* there really should be more of a description here...
*
*
* @see #HSQLDB
* @model literal="HsqlDb"
* @generated
* @ordered
*/
public static final int HSQLDB_VALUE = 1;
/**
* The 'MYSQL' literal value.
*
*
* If the meaning of 'MYSQL' literal object isn't clear,
* there really should be more of a description here...
*
*
* @see #MYSQL
* @model literal="MySql"
* @generated
* @ordered
*/
public static final int MYSQL_VALUE = 2;
/**
* An array of all the 'Data Base Dialect' enumerators.
*
*
* @generated
*/
private static final DataBaseDialect[] VALUES_ARRAY =
new DataBaseDialect[] {
ORACLE,
HSQLDB,
MYSQL,
};
/**
* A public read-only list of all the 'Data Base Dialect' enumerators.
*
*
* @generated
*/
public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
/**
* Returns the 'Data Base Dialect' literal with the specified literal value.
*
*
* @generated
*/
public static DataBaseDialect get(String literal) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
DataBaseDialect result = VALUES_ARRAY[i];
if (result.toString().equals(literal)) {
return result;
}
}
return null;
}
/**
* Returns the 'Data Base Dialect' literal with the specified name.
*
*
* @generated
*/
public static DataBaseDialect getByName(String name) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
DataBaseDialect result = VALUES_ARRAY[i];
if (result.getName().equals(name)) {
return result;
}
}
return null;
}
/**
* Returns the 'Data Base Dialect' literal with the specified integer value.
*
*
* @generated
*/
public static DataBaseDialect get(int value) {
switch (value) {
case ORACLE_VALUE: return ORACLE;
case HSQLDB_VALUE: return HSQLDB;
case MYSQL_VALUE: return MYSQL;
}
return null;
}
/**
*
*
* @generated
*/
private final int value;
/**
*
*
* @generated
*/
private final String name;
/**
*
*
* @generated
*/
private final String literal;
/**
* Only this class can construct instances.
*
*
* @generated
*/
private DataBaseDialect(int value, String name, String literal) {
this.value = value;
this.name = name;
this.literal = literal;
}
/**
*
*
* @generated
*/
public int getValue() {
return value;
}
/**
*
*
* @generated
*/
public String getName() {
return name;
}
/**
*
*
* @generated
*/
public String getLiteral() {
return literal;
}
/**
* Returns the literal value of the enumerator, which is its string representation.
*
*
* @generated
*/
@Override
public String toString() {
return literal;
}
} //DataBaseDialect